I’m on Ubuntu Intrepid, using Postfix and SpamAssassin. I’ve seen approaches using procmail (like the one suggested @ Apache), but I’m looking for a solution that does not use procmail.
This is a programming question because the correct answer will be some form of code that accomplishes the task at hand (my response to the negative votes).
UPDATE to the situation: I used this tutorial and it worked out excellently: https://help.ubuntu.com/community/PostfixAmavisNew
It really depends at which level you want to delete the spam:
At the mail client level, using Email client rules (like the ones available in Thunderbird) is easy: just set a rule that delete any email marked as SPAM in the subject.
At the user level, if mail is received automatically by the machine, you could set some cron job that periodically inspect the local mailbox and again delete mails marked as SPAM.
It’s easy if your local store uses
maildirsince each email is just a file, as opposed to themboxformat which would require some more work since it’s a single file.Setting up
maildirfor postfix is trivial.At the server level, using
Amavisdwill allow you to have more control over how mail is handled.Amavisdhas threshold settings where you can define an evasive action depending on the spam score given by spamassassin.For instance, anything above 15 points is put in quarantine and anything above 30 points is deleted.
There are some instructions for installing Amavisd on Ubuntu.
The point is, as far as I know,
spamassassin‘s job is to identify and give spam points to emails. How you want these to be handled is not up tospamassassinbut the other modules down the chain.