MailScanner SPAM Forward & Postfix Problem
Drew Marshall
drew at THEMARSHALLS.CO.UK
Thu Apr 7 16:44:42 IST 2005
[ The following text is in the "iso-8859-1" character set. ]
[ Your display is set for the "US-ASCII" character set. ]
[ Some characters may be displayed incorrectly. ]
Kennedy Clark said:
> I installed MailScanner/SpamAssassin/ClamAV last week. I used Johnny
Hughes' excellent guide at
> http://www.hughesjr.com/content/category/1/14/30/Guides (see Part 4).
>
> I'm using RHEL 3/CentOS 3.4. On the MTA side, I am using Postfix with a
virtual alias table. I want to have MailScanner use the "forward" "Spam
Actions" option to put all spam in a central email account (it's a local
account on the same server). I can email to this central spam account
no problem (both locally and from outside accounts such as gmail). The
"Spam Actions = forward blah at blah.com" works if
> blah at blah.com is an account on a separate system (such as this account
on gmail). However, no matter what I do, I cannot make it work with a
local account -- I always get the following postfix error in
> /var/log/maillog:
>
> ..., status=bounced (user unknown in virtual alias table).
>
> I'm guessing it has something to do with the fact that I'm using a
virtual alias table, but I don't want to get rid of that (even for
testing purposes) because it's obviously being used for live email. :-)
This is a Postfix err, 'feature'. Because of the way that Postfix and
MailScanner work, you can't forward spam to a virtual user.
The why: Postfix uses the cleanup agent to do the virtual aliasing,
unfortunately this happens _before_ MailScanner sees the message. So when
you re-inject a spam message to a virtual user, it's after Postfix would
have alised it to it's real destination, hence the bounce.
The solution: Forward spam to a local account that is alised to your
virual user e.g. forward spam to localuser at box.domain.tld then in the
aliases table put localuser: virtual at virtual.tld and then $newaliases
That will then do the job for you.
HTH
Drew
--
In line with our policy, this message has
been scanned for viruses and dangerous
content by MailScanner, and is believed to be clean.
www.themarshalls.co.uk/policy
------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the MAQ (http://www.mailscanner.biz/maq/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).
Support MailScanner development - buy the book off the website!
More information about the MailScanner
mailing list