[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: mail filtering techniques



On Thu, 27 Jan 2000, Ethan Benson wrote:

>=I am wondering what different methods people here are using to filter 
>=your mail?   (ie each mailing list to its own mailbox or other such 
>=techniques of dealing with several high volume lists)

I am using fetchmail+procmail+pine+postfix.

fetchmail - get mail from POP3 accounts
procmail - filter/place mails to right folders
pine - read/create mail
postfix - local delivery on machine and delivery my mail directly to MX hosts.

My ~/.procmail file looks like:

===cut===
# $Id: .procmailrc,v 1.25 2000/01/28 20:53:46 xxx $

# system
VERBOSE=on
LOGFILE=/var/log/mail/procmail.user
TODAYSDATE=`date +%c`
 
# log
LOG = "..New"

# create copy of all mail before processing
:0 c
/var/log/mail-backup

# spam (no To: field)
# exception: CityCat
:0 H
* !^TO
* !^From: Citycat
mail/spam

# anacron (in From:)
:0 H
* ^From:.*\(Anacron\)
mail/noteroot

# JobServe
:0 H
* ^From:.*jobs\@jobserve\.com
mail/jobs

# Debian-Russian
:0 H
* ^X-Loop: debian-russian
* ^Precedence: list
mail/Deb-RU

# The rest of CityCat
:0 H
* ^From: CityCat 
mail/CityCat

# confirmation for mails
# not DAEMON, CityCat, Me
# with Return-Receipt ON
:0 Hhcw
* !^FROM_DAEMON
* !^X-Loop: epv@ibm\.net
* !^From: Citycat
* !^From:.*\<epv\@.*
* ^Return-Receipt-To.*
* ^Subject: \/.*
| (formail -rt \
   -A "Precedence: junk" \
   -A "X-Loop: epv@localhost" \
   -I "Subject: Receipt: $MATCH" ; \
   echo "Dear Sir/Madam, "; \
   echo " "; \
   echo "Your message <$MATCH> "; \
   echo "  has been delivered to <$LOGNAME> at <$TODAYSDATE>."; \
   echo " "; \
   echo "-- "; \
   echo " PROCMAIL confirmation routine at <$HOST> "; \
   )  | $SENDMAIL -oi -t

# MIME uncompressing	
:0
* ^Content-Type: *text/plain
{
  :0 fbw
  * ^Content-Transfer-Encoding: *quoted-printable
  | mimencode -u -q

  :0 Afhw
  | formail -I "Content-Transfer-Encoding: 8bit"

  :0 fbw
  * ^Content-Transfer-Encoding: *base64
  | mimencode -u -b
  
  :0 Afhw
  | formail -I "Content-Transfer-Encoding: 8bit"
}
===cut===

---
Regards,
Pavel Epifanov.

epv@casema.net , pavel_e@yahoo.com



Reply to: