Skip to content

Instantly share code, notes, and snippets.

@kgaughan
Created December 29, 2010 23:02
Show Gist options
  • Save kgaughan/759186 to your computer and use it in GitHub Desktop.
Save kgaughan/759186 to your computer and use it in GitHub Desktop.
Annotated copy of my .fdm.conf file.
# 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:.*[email protected]" in headers
or "^Sender:.*[email protected]" 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):.*[email protected]" in headers
or "^(Sender|Reply-To):.*[email protected]" in headers
or "^(Sender|Reply-To):.*[email protected]" in headers
or "^(Sender|Reply-To):.*[email protected]" in headers
or "^Sender:.*[email protected]" in headers
or "^Sender:.*[email protected]" in headers
or "^Reply-To:.*[email protected]" in headers
or "^Sender:.*[email protected]" in headers
action "lists"
match all action "inbox"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment