Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > cd84248822088e9e86a3095d5bb6d1d7 > files > 8

fdm-1.7-3.fc18.x86_64.rpm

#set delete-oversized
#set default-user "nicholas"
#set allow-multiple
set purge-after 50
#set proxy "socks://localhost:1080/"
set timeout 120
set parallel-accounts 2

# My fdm configuration base path.
$base = "%h/.fdm.d"

# Lock file path.
set lock-file "${base}/lock"

# Maximum mail size.
set maximum-size 31 MB

# Verify SSL certificates.
set verify-certificates

# These seem to vaguely work okay for me.
set queue-high 5
set queue-low 3

# Use dotlock locking, since FreeBSD doesn't like anything else on NFS.
#set lock-types dotlock

# Macro holding the path where the maildirs are.
$path = "%h/mail"

# My main inbox and junk mail directories.
action "inbox" maildir "${path}/_inbox"
action "junk" maildir "${path}/_junk"

# Account definitions. All passwords and most usernames are read from .netrc.
account "ntlworld" pop3s server "pop.ntlworld.com" port 995

account "gmail.nicholas.marriott" imaps server "imap.googlemail.com"
	port 993 user "nicholas.marriott@gmail.com"

account "gmail.nicm321" pop3s server "pop.googlemail.com" port 995
	user "nicm321@gmail.com"
account "gmail.nicm123" imaps server "imap.googlemail.com"
	port 993 user "nicm123@gmail.com"

account "yahoo" pop3s server "pop.mail.yahoo.com" port 995

account "gmx" pop3 server "pop.gmx.net"

# The stdin account is disabled: it will be ignored unless explicitly requested
# using the -a switch on the command line.
account "stdin" disabled stdin

# RSS feed account for RATM, http://lfod.us/sw/ratm/.
account "rss" disabled stdin

# ------------------------------------------------------------------------------
# These two definitions are part of killfiling - the action appends the
# message-id to my block list and the macro is used to check that no message-id
# in the references or in-reply-to headers matches any in the file, if it does
# the mail is dropped later. This means I not only don't need to read mail from
# idiots, I also don't have to read many of the hundred follow-ups telling them
# they are an idiot. Use with care: this can be slow.
# ------------------------------------------------------------------------------
action "dead" maildir "${path}/diediedie"
action "diediedie" { exec "echo '%[message_id]' >>${base}/ignore" action "dead" }
$is_dead = "echo '%1'|grep -Fqif ${base}/ignore"
# ------------------------------------------------------------------------------

# ------------------------------------------------------------------------------
# Archive mail to mailboxes.
# ------------------------------------------------------------------------------
account "archive" disabled maildirs {
	"${path}/blug"
	"${path}/linux-rdma"
	"${path}/linux-rt-users"
	"${path}/openbsd-{misc,ports,www,bugs,source-changes,ports-changes}"
	"${path}/openssh-unix-dev"
	"${path}/rss"
}
#action "archive" mbox "${path}/%[maildir]-archives/%[maildir]-%yq%Q" compress
action "archive" drop

match account "archive" {
	# Archive mail with invalid dates or older than 30 days.
	match age invalid or age > 30 days action "archive"

	# Don't let any other mail get to the normal rules.
	match all action keep
}
# ------------------------------------------------------------------------------

# ------------------------------------------------------------------------------
# RSS.
# ------------------------------------------------------------------------------
match account "rss" {
	$crap = "football|sport|prince harry|horse|jockey|royal family|" +
		"britney spears|cricket|tennis|snooker|motorsport|rugby|" +
		"princess diana|heather mills|paul mccartney|jamie oliver|" +
		"music award|candle-lit|in memory|concert|celtic|the queen|" +
		"richard and judy|madeleine mccann|motoring costs|john crace|" +
		"richard branson|commonwealth games|olympic games|jill dando|" +
		"vigil|day of mourning|war dead|amy winehouse|prince charles|" +
		"remembrance day"
	match "(${crap})" action drop

	# Never worth reading...
	match "^From:.*overheard in new york" in headers {
	      match "^Subject:.*Wednesday.*" in headers action drop
	      match "^Subject:.*One-Liner.*" in headers action drop
	}
	match "From:.*techdirt" in headers {
		match "Subject:.*DailyDirt:.*" in headers action drop
		match "Subject:.*Of The Week.*" in headers action drop
	}
	match "^From:.*tom's hardware" in headers {
		match "^Subject:.*Presented By:$" in headers action drop
	}
	match "^From:.*wired" in headers {
		match "^Subject:.*Google-a-Day Puzzle.*" in headers action drop
	}

	match all action maildir "${path}/rss"
}
# ------------------------------------------------------------------------------

# ------------------------------------------------------------------------------
# Newsgroups. These are disabled so I can run them using a "fdm -anews f" from
# a seperate cronjob less often than normal mail accounts.
# ------------------------------------------------------------------------------
account "news" disabled nntp
        server "infosun2.rus.uni-stuttgart.de"
        groups {
                "comp.unix.bsd.openbsd.misc"
#               "comp.unix.programmer"
        }
        cache "${base}/news"

match account "news" {
        match "\\<HTML\\>" in body action "junk"

        # comp.unix.programmer pointless argument usual suspects.
        match "^From:.*rweikusat@mssgmbh.com" in headers action drop
        match "^From:.*davids@webmaster.com" in headers action drop

        # Idiots.
        match "^From:.*MI5-?Victim@mi5.gov.uk" in headers action drop
        match "^Organization:.*www.altopia.com" in headers action drop
        match "^From:.*robin_carey5@yahoo.co.uk" in headers action drop

	# Spammers.
	match "^From:.*jak@isp2dial.com" in headers action drop
	match "^From:.*doctor@doctor.nl2k.ab.ca" in headers action drop

        # Match based on the group name.
        match all action maildir "${path}/news-%[group]"
}
# ------------------------------------------------------------------------------

# Catch local mail early.
match account "stdin" action "inbox"

# Catch duplicate messages using a message-id cache.
$db = "${base}/duplicates"
$key = "%[message_id]"
cache $db expire 1 week

match not string $key to "" {
	# Filter messages already in the cache.
	match in-cache $db key $key {
	      # Stupid Google Groups sends me everything twice.
	      match "List-Id:.*belfastlinux.googlegroups.com" in headers
	      	    action drop

	      match all action maildir "${path}/_duplicates"
	}

	# Add message-ids to the cache.
	match all action to-cache $db key $key continue
}

# Junk (eejits).
match ".*YAHOO.*BOOTER.*" in body action drop

# Junk (spam).
match "^From:.*ezine@recruitni.com" in headers action drop
match "^From:.*@*.chase.com" in headers action drop
match "^From:.*@*.chaseonline.com" in headers action drop
match "^From:.*@citi-bank.com" in headers action drop
match "^From:.*@emaillabs.com" in headers action drop
match "^From:.*baypos@gmail.com" in headers action drop
match "^From:.*E-Greeting" in headers action drop
match "^From:.*@postcard.org" in headers action drop
match "^From:.*@mail.itp.net" in headers action drop
match "^From:.*@faith-h.net" in headers action drop
match "^From:.*reponse@altech-france.fr" in headers action drop
match "^From:.*ecards@americangreetings.com" in headers action drop

# Junk (ISP/website garbage).
match "^From:.*@newsletter.ntlworld.com" in headers action drop
match "^From:.*@newsletter.virginmedia.com" in headers action drop
match "^From:.*mailings@(gmxnet.de|gmx.net|gmx-gmbh.de)" in headers action drop
match "^From:.*@friendsreunited.co.uk" in headers action drop
match "^From:.*offers@dabs.com" in headers action drop

# AWAD uninteresting crap.
match "^Subject:[ \t]*AWADmail Issue [0-9]+" in headers action drop

# Copy invalid dates to a special action so I can inspect them.
match age invalid action maildir "${path}/_invalid" continue

# Copy HTML mail to special action to test attachment parsing.
#match attachment any-type "*/html" action maildir "${path}/_html" continue

# Test rewriting through cat.
#match all action rewrite "cat" continue

# Test mbox delivery.
#match size > 1K and size < 4K action mbox "${path}/_mbox" compress continue

# Add line count header.
match all action add-header "Lines" value "%[lines]" continue

# Add rule number header.
#match all action add-header "Rule" value "%[rule]" continue

# BLUG mailing list.
match "^X-Apparently-To:.*belfastlinux@googlegroups.com" in headers or
	"List-ID:.*belfastlinux.googlegroups.com" in headers
	action maildir "${path}/blug"

# ------------------------------------------------------------------------------
# OpenBSD.
# ------------------------------------------------------------------------------
match "^Sender:.*owner-([a-z-]*)@openbsd.org" in headers {
	# Tag the mail.
	match all action tag "list" value "%1" continue

	# Drop any mail which is replying to a message-id on the ignore list.
	match "^References:[ \t]*(.*)" in headers and
		exec ${is_dead} returns (0, ) action "dead"
	match "^In-Reply-To:[ \t]*([^()]*)" in headers and
		exec ${is_dead} returns (0, ) action "dead"

	# Drop a selection of eejits/trolls/time wasters/whiners/pompous
	# twits/uninteresting persons and add to ignore list.
	match "^From:.*john@johntate.org" in headers action "diediedie"
	match "^From:.*billitch@gmail.com" in headers action "diediedie"
	match "^From:.*rms@1407.org" in headers action "diediedie"
	match "^From:.*clock@twibright.com" in headers action "diediedie"
	match "^From:.*dfeustel@mindspring.com" in headers action "diediedie"
	match "^From:.*peter_philipp@freenet.de" in headers action "diediedie"
	match "^From:.*philipp.peter@freenet.de" in headers action "diediedie"
	match "^From:.*suck@my-balls.com" in headers action "diediedie"
	match "^From:.*chefren@pi.net" in headers action "diediedie"
	match "^From:.*demuel@thephinix.org" in headers action "diediedie"
	match "^From:.*lvl@omnitec.net" in headers action "diediedie"
	match "^From:.*timo.schoeler@riscworks.net" in headers action "diediedie"
	match "^From:.*ropers@gmail.com" in headers action "diediedie"
	match "^From:.*leonleon77@gmail.com" in headers action "diediedie"
	match "^From:.*af.gourmet@videotron.ca" in headers action "diediedie"
	match "^From:.*nicedaemon@googlemail.com" in headers action "diediedie"
	match "^From:.*vim.unix@googlemail.com" in headers action "diediedie"
	match "^From:.*emaillistemail@gmail.com" in headers action "diediedie"
	match "^From:.*4625khz@gmail.com" in headers action "diediedie"
	match "^From:.*Rhubbell@iHubbell.com" in headers action "diediedie"
	match "^From:.*donaldcallen@gmail.com" in headers action "diediedie"
	match "^From:.*nealhogan@gmail.com" in headers action "diediedie"
	match "^From:.*glisten@witworx.com" in headers action "diediedie"
	match "^From:.*ma1l1ists@yahoo.co.uk" in headers action "diediedie"
	match "^From:.*yclwebmaster@gmail.com" in headers action "diediedie"
	match "^From:.*fritz@.*.rodent.frell.theremailer.net" in headers action "diediedie"

	# Special-case announce.
	match string "%[list]" to "announce" action "inbox"

	# Special-case gnats.
	match string "%[list]" to "gnats" action "${path}/openbsd-bugs"

 	# Deliver to openbsd-%1.
	match all action maildir "${path}/openbsd-%[list]"
}
# ------------------------------------------------------------------------------

# ------------------------------------------------------------------------------
# NetBSD.
# ------------------------------------------------------------------------------
#match "^List-Id: ([a-z-]*).NetBSD.org" in headers
#	action maildir "${path}/netbsd-%1"
# ------------------------------------------------------------------------------

# ------------------------------------------------------------------------------
# FreeBSD.
# ------------------------------------------------------------------------------
#match "^Sender:.*owner-([a-z-]*)@freebsd.org" in headers
#	action maildir "${path}/freebsd-%1"
# ------------------------------------------------------------------------------

# ------------------------------------------------------------------------------
# GNU Screen.
# ------------------------------------------------------------------------------
match "^X-BeenThere:.*screen-users@gnu.org" in headers
	action maildir "${path}/screen-users"
match "^X-BeenThere:.*screen-devel@gnu.org" in headers
	action maildir "${path}/screen-devel"
# ------------------------------------------------------------------------------

# ------------------------------------------------------------------------------
# GNU ncurses.
# ------------------------------------------------------------------------------
match "^X-BeenThere:.*bug-ncurses@gnu.org" in headers
	action maildir "${path}/bug-ncurses"
# ------------------------------------------------------------------------------

# ------------------------------------------------------------------------------
# libevent
# ------------------------------------------------------------------------------
match "^Sender: owner-libevent-users@freehaven.net" in headers
	action maildir "${path}/libevent-users"
# ------------------------------------------------------------------------------

# ------------------------------------------------------------------------------
# btpd
# ------------------------------------------------------------------------------
match "^Sender: btpd-users@googlegroups.com" in headers
	action maildir "${path}/btpd-users"
# ------------------------------------------------------------------------------

# ------------------------------------------------------------------------------
# Linux
# ------------------------------------------------------------------------------
match "^X-Mailing-List:.*linux-rdma@vger.kernel.org" in headers
	action maildir "${path}/linux-rdma"
match "^X-Mailing-List:.*linux-rt-users@vger.kernel.org" in headers
	action maildir "${path}/linux-rt-users"
# ------------------------------------------------------------------------------

# ------------------------------------------------------------------------------
# OpenSSH.
# ------------------------------------------------------------------------------
match "^X-BeenThere:.*openssh-unix-dev@mindrot.org" in headers
	action maildir "${path}/openssh-unix-dev"
# ------------------------------------------------------------------------------

# ------------------------------------------------------------------------------
# OSS Security.
# ------------------------------------------------------------------------------
match "^List-Post:.*oss-security@lists.openwall.com" in headers
	action maildir "${path}/oss-security"
# ------------------------------------------------------------------------------

# ------------------------------------------------------------------------------
# OSS Security.
# ------------------------------------------------------------------------------
match "^X-Mailing-List:.*austin-group-l" in headers
	action maildir "${path}/austin-group-l"
# ------------------------------------------------------------------------------

# ------------------------------------------------------------------------------
# Poem-A-Day
# ------------------------------------------------------------------------------
match "^To:.*poetnews@poets.org" in headers
	action maildir "${path}/poems"

# ------------------------------------------------------------------------------
# OpenMAMA
# ------------------------------------------------------------------------------
match "^List-Id:.*openmama-dev.lists.openmama.org" in headers
	action maildir "${path}/openmama-dev"
match "^List-Id:.*openmama-users.lists.openmama.org" in headers
	action maildir "${path}/openmama-users"

# Default action.
match all action "inbox"