| |||||||||||||||||||||||||||||||
|
.Spam maildir. In current delivery spam and non-spam come into postfix, which is then forwarded if there is a virtual_alias_maps entry and passed onto maildrop if there is no virtual_alias_maps entry. Maildrop calls SpamAssassin and filters spam into the .Spam maildir and normal mail into the normal maildir. (Pretty standard setup). However, I want to be able to filter spam before Postfix ever has the opportunity to forward it. The reason for doing this is to avoid problems I'm having with some ISPs because I'm forwarding spam onto their accounts without filtering it. In order to do this I have set up spampd to call SpamAssassin, which then passes the email back to Postfix. Postfix then runs a header_checks to see if SpamAssassin filtered the mail as spam. After that I am at a loss. It seems that there is no way to prevent Postfix from forwarding the spam on to the forwarding address. I tried passing the spam to the virtual delivery agent via a FILTER command. However, the virtual delivery agent cannot do anything other than deliver the spam email to the local maildir or bounce it back (bounce then takes the bounceback spam, sends it to the original sender which is then forwarded onto the recipient, which is rather humorous). The spam email is ultimately forwarded, so this does not work. I tried passing the spam to the local delivery agent via a FILTER command, and then using luser_relay to pass the email onto a local account. I setup a spamluser user on my box and it seems to work fine. Problem is that all spam is passed to the spamluser and never reaches the user maildir in the case of non-forwarded email. I could use .forward or procmail to send the spam back to the user but that creates a forwarding loop. The local .forward or procmail cannot deliver to the user maildir. I investigated perhaps sending the spam to another smtpd agent, but this seems to create more forwarding loop problems. Basically I have to somehow rewrite the spam email in real-time so that it is not forwarded after it has been filtered. I was wondering if this is possible, and if it is not then what Postfix users would recommend for solving this problem.
| ||||||||||||||||||||||||||||||
© 2004-2008 readlist.com