You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Evgeni Vachkov <ev...@orthogonsystems.com> on 2005/06/28 12:29:41 UTC
Spamassassin and external forwarding from /etc/aliases
Hi,
I am using Spamassassin with Sendmail and procmail;
The /etc/procmailrc is:
--------------------------------------------
DROPPRIVS=yes
:0fw
* < 256000
| /usr/bin/spamc -f
:0
* ^X-Spam-Status: Yes
$HOME/spam
--------------------------------------------
Mail delivery to system local mailboxes is placed in $HOME/spam if marked with '[SPAM]' in the header, which is fine.
The problem!:- I have a number of external accounts in /etc/aliases and all spam mail is forwarded to them without the [SPAM] in the header.
I believe this is because sendmail relays to external accounts without actually passing mail through procmail and spamassassin...
What I am trying to achieve is that all [SPAM] mail is delivered locally to $HOME/spam and not forwarded to any external accounts (from /etc/aliases).
...and only non-spam mail is delivered to internal and external accounts.
Your help is muchly appreciated.
Cheers,
Evgeni Vachkov
Re: Spamassassin and external forwarding from /etc/aliases
Posted by Matt Kettler <mk...@evi-inc.com>.
Evgeni Vachkov wrote:
> Hi,
>
> I am using Spamassassin with Sendmail and procmail;
> The /etc/procmailrc is:
>
> --------------------------------------------
> DROPPRIVS=yes
>
> :0fw
> * < 256000
> | /usr/bin/spamc -f
>
> :0
> * ^X-Spam-Status: Yes
> $HOME/spam
> --------------------------------------------
>
> Mail delivery to system local mailboxes is placed in $HOME/spam if
> marked with '[SPAM]' in the header, which is fine.
>
> The problem!:- I have a number of external accounts in /etc/aliases and
> all spam mail is forwarded to them without the [SPAM] in the header.
>
> I believe this is because sendmail relays to external accounts without
> actually passing mail through procmail and spamassassin...
>
> What I am trying to achieve is that all [SPAM] mail is delivered locally
> to $HOME/spam and not forwarded to any external accounts (from
> /etc/aliases).
At minimum, you'll have to switch to a MTA layer integration to do that.
The forwarding in /etc/aliases is done without calling procmail, so there's
nothing you can do about it at that point. Procmail is only called as mail is
delivered locally. Forwarded/relayed messages aren't being delivered, so there's
no procmail call.
Also, I don't know of any MTA layer integration that can modify forwarding
behaviors based on tag vs no tag. However, to have *any* shot at scanning a
message that will be forwarded via /etc/aliases you'll need to scan at the MTA
layer. (using a milter, qmail-scanner, mimedefang, mailscanner, amavis, etc)