jYopp.com
|
Maildrop and Spamassassin
iPhone / iPod Touch Page
Sending Mail with Pear from PHP
New Server, Again...
Time for some updates!
C-E Dictionary Bookmarklet
J-E Dictionary Bookmarklet
New Server Coming Up...
Getting back into Anime?
Awesome and more Awesome...
Happy Anniversary, Baby
Mario and Luigi: Partners in Crime
Very Cool Flash Drive
Vikuiti
Power-Friendly USB
Refactoring ... Not a party anymore
The Mobile Phone Fiasco
Life is ... good.
Returning to the United States
Arrival in Japan
Day of a Million and One Stairs
Day of a Dozen Sleepless Nights
Departure
Shanghai Trip
Tech Shopping
Beijing Summer Palace
Firefly! On TV Again!
Arrival in China
A few more hours to go...
Stereo Update
The Storm Before The Calm
|
Maildrop and Spamassassin02/17/2008 12:54amI have used SpamAssassin before, but the junk mail filtering in OS X's mail client (which I use) is good enough that I didn't bother reconfiguring everything when I switched mail servers. However, now that I have the iPod Touch, I find myself awash in a flood of SPAM unless my home computer is awake and connected to the server at all times. I need spam filtering on the server again. After looking through a number of tutorials and manual pages, I wrote this script for Courier's maildroprc, which is serving me beautifully:
This script may not be exactly what you want for your own mail, but it serves as a near-perfect example of how to deliver mail in three tiers: Definitely SPAM, Almost certainly SPAM, and Normal. My server uses global configurations for SpamAssassin; If you want per-user spam settings, each user must have a valid UNIX account on the machine. Replace the first line with "spamc -u $LOGNAME". It's worth noting that the $SPAMSCORE variable will be NULL unless the message is classified as spam by SpamAssassin. Comparing it to values lower than SpamAssassin's threshold is useless, so if you want to work with borderline cases, you may need to lower SpamAssassin's threshold or modify the regular expression for Spam-Status. |