I've got postfix setup so that mail coming in from smtpd is automatically filtered through spamassassin (which reinjects it into the mailqueue with added headers)
Now I want to do 2 things with messages that are considered spam:
- If the mail is outbound again (because of aliases) discard the mail on the spot
- If the mail is for a local virtual user hand it off to Dovecot which puts it in the Spam folder.
Can I configure postfix this way? All my alias and user information are in MySQL. Currently I discard all spam mail (with a header_checks in main.cf) but I would prefer the above situation.