Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Constants
- $path = "%h/Mail"
- # Used for processing mail from Postfix. Here's how we tell Postfix to invoke
- # this from main.cf:
- #
- # mailbox_command = /usr/local/bin/fdm -l -m -astdin fetch
- #
- account "stdin" disabled stdin
- # These accounts are used if fdm is told to fetch but no account is specified
- # using the '-a' switch. Usernames and passwords from from the .netrc in my
- # home directory. I use a cron job to pull this stuff down that runs every
- # quarter-hour:
- #
- # 1/15 * * * * nice -n 19 /usr/local/bin/fdm -l fetch
- #
- account "eircom.net" pop3 server "mail.eircom.net" no-apop
- account "gmail" pop3s server "pop.gmail.com" port 995
- # Two boilerplate actions for keeping and dropping mail.
- action "keep" keep
- action "drop" drop
- # Mail folders.
- action "inbox" maildir "${path}/inbox"
- action "junk" mbox "${path}/junk"
- action "sundry" maildir "${path}/sundry"
- action "reference" maildir "${path}/reference"
- action "lists" maildir "${path}/lists"
- # Housekeeping: this account, action and ruleset are used to archive mail in
- # the three given maildirs at the start of every month. Here's the cron job
- # spec that does the work:
- #
- # 0 0 1 * * nice -n 19 /usr/local/bin/fdm -l -aarchive fetch
- #
- account "archive" disabled maildirs {
- "${path}/inbox"
- "${path}/sundry"
- "${path}/lists"
- }
- action "archive" mbox "${path}/archive/%[maildir]-%y-%m" compress
- match account "archive" and age > 90 days action "archive"
- match account "archive" action "keep"
- # This removes junk headers. 'Experimental' headers in the wild tend to be just
- # noise and clutter, so I kill them off. You'd be surprised by the amount of
- # space this saves!
- action "crap" remove-headers { "X-*" }
- match all action "crap" continue
- # List filtering
- match "^Precedence:[ \t](bulk|list)" in headers
- or "^Sender:.*metacl-bounces@conlang.org" in headers
- or "^Sender:.*kragen-tol-bounces@canonical.org" in headers
- or "^(Sender|Reply-To|Mailing-list):.*(langsmiths|celticonlang|concatenative|conculture|rest-discuss|testdrivendevelopment)@yahoogroups.com" in headers
- or "^(Sender|Reply-To|Mailing-list):.*(gevent|listyland|ossdev-ireland|python-ireland)@googlegroups.com" in headers
- or "^(Sender|Reply-To):.*CONLANG@listserv.brown.edu" in headers
- or "^(Sender|Reply-To):.*ilug-bounces@linux.ie" in headers
- or "^(Sender|Reply-To):.*ilug@linux.ie" in headers
- or "^(Sender|Reply-To):.*open@webnet.ie" in headers
- or "^Sender:.*phpug-bounces@lists.iephpug.org" in headers
- or "^Sender:.*pycrypto-bounces@lists.dlitz.net" in headers
- or "^Reply-To:.*pycrypto@lists.dlitz.net" in headers
- or "^Sender:.*ubuntu-ie-bounces@lists.ubuntu.com" in headers
- action "lists"
- match all action "inbox"
Add Comment
Please, Sign In to add comment