Postfix with spamassassin. Acts as an anti-spam gateway for a domain. Scans and then relays.

I want to take mail that has been tagged as spam by spamassassin, and send it to a different mail server than non-spam. Both servers will accept mail for the same domain, but one is just a quarantine. All addressing stays intact.

Therefore I need to get postfix or spamassassin to route spam to one server and ham to another server. How can I achieve this?

link|improve this question
feedback

1 Answer

If you are already using amavis to work along with your postfix setup. Read on spam_quarantine_to settings for amavisd. For clean emails you can probably use relay_host in postfix itself, or the clean_quarantine_to method in amavisd (I personally have not used it though), just stating that there is such an option there.

link|improve this answer
Thanks. I got it working using spampd (proxy daemon) and a postfix content filter. spampd acts as a before-queue filter and calls spamass. when finished it passes the mail back to postfix on a secondary listener and a header check is used. If there's a hit it uses a FILTER argument to send the mail somewhere else via smtp. Otherwise the mail goes out using the relay domain address specified in the transport map. – Jason Nov 4 '11 at 7:51
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.