HOME=/home/madhatter PATH=$HOME/bin:/usr/bin:/bin:/usr/local/bin:/usr/local/etc:. LOCKFILE=$HOME/.lockmail FORMAIL=/usr//bin/formail MAILDIR=$HOME/mail LOGFILE=$HOME/mail/procmaillog SENDMAIL=/usr/sbin/sendmail #VERBOSE=on # Change to 'on' to get _long_ procmail log. # NB: if this is short, I don't want to see long: I get # a one-line summary for every email procmail looks at! # ----------------------------------------------------------------------------- # # # Virus scan section ... # # # ----------------------------------------------------------------------------- # # :0 * !^X-Virus-Scan: | $HOME/bin/trashscan # 2. Filter tagged virus mails :0: * ^X-Virus-Scan: Suspicious virus ## SpamAssassin # # Pipe the mail through spamassassin (replace 'spamassassin' with 'spamc' # if you use the spamc/spamd combination) # # The condition line ensures that only messages smaller than 250 kB # (250 * 1024 = 256000 bytes) are processed by SpamAssassin. Most spam # isn't bigger than a few k and working with big messages can bring # SpamAssassin to its knees. # # The lock file ensures that only 1 spamassassin invocation happens # at 1 time, to keep the load down. # :0fw: spamassassin.lock * < 256000 | /usr/local/bin/spamassassin # Mails with a score of 15 or higher are almost certainly spam (with 0.05% # false positives according to rules/STATISTICS.txt). Let's put them in a # different mbox. (This one is optional.) :0: * ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* almost-certainly-spam # All mail tagged as spam (eg. with a score higher than the set threshold) # is moved to "probably-spam". :0: * ^X-Spam-Status: Yes probably-spam # Work around procmail bug: any output on stderr will cause the "F" in # "From" to be dropped. This will re-add it. :0 * ^^rom[ ] { LOG="*** Dropped F off From_ header! Fixing up. " :0 fhw | sed -e '1s/^/F/' } ## Mail2News ## First invoke mail2news for some MLs :0: * ^Sender: owner-de-bsd-questions_at_de.freebsd.org | $HOME/bin/mail2news.py :0: * ^Sender: owner-de-bsd-test_at_de.freebsd.org | $HOME/bin/mail2news.py :0: * ^Sender: owner-de-bsd-chat_at_de.freebsd.org | $HOME/bin/mail2news.py :0: * ^Sender: owner-de-bsd-translators_at_de.freebsd.org | $HOME/bin/mail2news.py :0: * ^Sender: owner-freebsd-advocacy_at_freebsd.org | $HOME/bin/mail2news.py :0: * ^Sender: owner-freebsd-announce_at_freebsd.org | $HOME/bin/mail2news.py :0: * ^Sender: owner-freebsd-chat_at_freebsd.org | $HOME/bin/mail2news.py :0: * ^Sender: owner-freebsd-ports_at_freebsd.org | $HOME/bin/mail2news.py :0: * ^Sender: owner-freebsd-ports-bugs_at_freebsd.org | $HOME/bin/mail2news.py :0: * ^Sender: owner-freebsd-security-notifications_at_freebsd.org | $HOME/bin/mail2news.py :0: * ^TOblackbox_at_asgardsrealm.net | $HOME/bin/mail2news.py :0: * ^TOopenbox_at_icculus.org | $HOME/bin/mail2news.py :0: * ^TOzork_at_yahoogroups.com | $HOME/bin/mail2news.py :0c * ^Subject:.*TVinfo.de | $HOME/bin/mail2news.py ## Autoreply's: ## ------------- # set the path where autoreplies are located AUTOREPLY=$HOME/texte/replytexts FROM=`/usr/local/bin/formail -zxFrom:` TO=`/usr/local/bin/formail -zxTo:` ## Send PGP-Key if requested :0c * !^FROM_DAEMON * !^X-Loop: arvid.warnecke_at_tu-clausthal.de * ^Subject: get pgp key | (/usr/local/bin/formail -rt -A "From: $TO" \ -I "Subject: The PGP/GPG-Key you requested"; \ cat $AUTOREPLY/pgp.msg) | $SENDMAIL -t ## Send Geek-Code if requested :0c * !^FROM_DAEMON * !^X-Loop: arvid.warnecke_at_tu-clausthal.de * ^Subject: get geek code | (/usr/local/bin/formail -rt -A "From: $TO" \ -I "Subject: My GEEK-Code you requested"; \ cat $AUTOREPLY/geek.msg) | $SENDMAIL -t ## Remove ppl from address-book ## it's just fake :0c * !^FROM_DAEMON * !^X-Loop: arvid.warnecke_at_tu-clausthal.de * ^Subject: REMOVE | (/usr/local/bin/formail -rt -A "From: $TO"; \ echo $TO; cat $AUTOREPLY/remove.msg) | $SENDMAIL -t ## an testing autoreply for vacation or something :0c * !^FROM_DAEMON * !^X-Loop: arvid.warnecke_at_tu-clausthal.de * ^From: arvid_at_mad-hatter.de | (/usr/bin/formail -rt -A "From: $TO" \ -I "Subject: Message from hasseroeder_at_heim2"; \ cat $AUTOREPLY/auto.msg) | $SENDMAIL -t # maybe the auto.msg should be changed before using in realtime ## The happy happy killfile :-) ## look if the $FROM is in the killfile, if so send the mail to /dev/null ## The killfile gets the $FROM by a mutt-macro -> $HOME/.mutt.macros # # Grep $FROM FROM=`formail -zxFrom:` :0: # grep for it in the killfile * ? grep -i `formail -rtzxTo:` $HOME/.mutt.killfile /dev/null # Myrna's Fernsehpragramm :0: * ^Subject:.*Fernsehprogramm TV-Programm # Vip-Mails :0: * ^Subject:.*VIP-Mail TV-Programm :0: * ^Subject:.*TVinfo.de TV-Programm ## Newsletter :0: * ^TOnewsletter_at_* Newsletter :0: * ^From:.*newsletter Newsletter :0: * ^Subject:.*Newsletter Newsletter :0: * ^Subject:.*newsletter Newsletter :0: * ^Subject:\[Slashdot\] Newsletter ## Mailinglists :0: * ^Subject:.*FreshPorts freshports :0: * ^TOLanfordUSA_at_yahoogroups.com lanfordusa.list :0: * ^TOsaragilbert_at_yahoogroups.com saragilbert :0: * ^TOroseannenetwork_at_yahoogroups.com roseanne.list :0: * ^TOHeyDad_at_yahoogroups.de heydad.liste :0: * ^TOalstertal_at_yahoogroups.de alstertal.liste :0: * ^TOfink-users_at_lists.sourceforge.net fink-users.liste :0: * ^TOfan-mjh_at_thur.de mjh.liste ## Mailboxes for several accounts ## Mad-Hatter ## First change the Header #:0 fhw #* To.*arvid_at_godwin.copyleft.de #| formail -i "To: arvid_at_mad-hatter.de" ## formail rewrites the Header (To:) # Then sort it :0: * ^TOarvid_at_mad-hatter.de IN.mad-hatter :0: * ^TOthe.sleepwalker_at_gmx.net IN.sleepwalker :0: * ^TOarvid.warnecke_at_heim2.tu-clausthal.de IN.heim2 :0: * ^TOmadhatter_at_geekshell.net IN.geekshell :0: * ^TOmadhatter_at_geekpr0n.org IN.geekpr0n # those Virus-Warnings are annoying :0: * ^From:.*antivirus_at_vegesack.de virus.warning