OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: spamassassin spampref problem with alias

From: mouss (moussnetoyen.net)
Date: Thu Nov 13 2008 - 10:08:34 CST


nik600 wrote:
> Hi to all.
>
> I've go a problem:
> i've set up postfix to call a script in master.cf:
>
> smtp inet n - n - - smtpd
> -o content_filter=filter:dummy
> filter unix - n n - 20 pipe
> flags=Rq user=filter argv=/var/antispam/myscript -f ${sender}
> -- ${recipient}
>
> /var/antispam/myscript
>
> is a script shell that submit the mail using spamc to spamd.
>
> Spamc is invoked using spamc -u $4 where $4 is the destination user.
>
> Now, suppose that $4 is userfoo.com and userfoo.com is an alias to
> user2foo.com
>
> user2foo.com has a spam score of 4 in the spampref table.
>
> with these configuration, user2foo.com receives the email, but these
> email has been checked with a default spam score, and not with the
> spam score of 4.
>
> I'd like to scan the email with the preference of the real user that
> receives the email, is it possibile?
>
> Is it possible to scan the email AFTER postfix has determined the real
> user/users associated to the email? (even if this can imply to re-scan
> the email multiple times one for each user associated to the alias).
>

unless you disable address rewrite, the filter should get the address
after it was expanded. so your problem doesn't match your description.

show your master.cf and the output of 'psoctonf -n'.