This is in HTML at http://canonical.org/~kragen/sw/minimilter.html.
This is a very simple milter implementation in pure Python, including a sample milter. I'm using this to filter spam under Postfix on panacea.canonical.org, which is Bad and Wrong for several reasons:
Milters are a way to reject or modify mail before it goes into the mail queue. I care about this because it lets me bounce spam to its real sender, not the forged from-address on the mail, so I don't become part of the backscatter problem.
MTAs that support milters include Sendmail, Postfix, and qpsmtpd.
Sendmail includes libmilter
, which lets you write milters in C.
I'm using the sample milter to bounce unauthorized mail to some Mailman mailing lists, on a machine with Postfix, so that our server doesn't generate backscatter. I'm probably going to switch away from it shortly because it turns out Postfix has a built-in feature that does more or less the same thing.
Backscatter is when spam sent from a forged From
address gets
bounced back to that address, effectively turning the spam's first
recipient into an inadvertent spam source. To avoid creating
backscatter, don't bounce mail after accepting it; instead, refuse the
mail at SMTP-time.
git clone http://canonical.org/~kragen/mailman-milter.git
Kragen Javier Sitaker kragen@canonical.org