You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Euroka <ba...@gmail.com> on 2008/03/18 12:33:29 UTC

remove spam before forwarding

Hi all,

I have a postfix with a couple of virtual hosts and a /etc/postfix/virtual
file with my users
.

some users prefer that mail from my postfix server mail.domain1.com gets
forwarded to an exchange server at mail.domain2.com

Now all users have a .procmailrc file in their home directory that moves al
tagged spam to /dev/null But users who also forward mail to domain2 still
get the full load of spam traffic to domain2.

How can I remove all incoming spam directely instead of first processing it
via procmail, so domain2 doesn't get all the spam traffic that arrived first
at domain2?

Biggest problem atm is that I see that all the spam traffic that gets
forwarded create too many connections and so things get into a loop...

Mar 18 14:52:14 SOKA2 postfix/smtp[23477]: 30B79A401A:
to=<greet.ruidt@domain2.be
<http://mail.studioo.be/src/compose.php?send_to=greet.dequidt%40arteveldehs.be>>,
orig_to=<greet.ruidt@domain1.be
<http://mail.studioo.be/src/compose.php?send_to=greet.dequidt%40sovoarte.be>>,
relay=mail2.domain2.be[193.181.138.107], delay=0, status=deferred
(host mail2.domain2.be[193.181.138.107] said: 452 Too many recipients
received this hour (in reply to RCPT TO command))

Re: remove spam before forwarding

Posted by Euroka <ba...@gmail.com>.
2008/3/18, McDonald, Dan <Da...@austinenergy.com>:
>
>
> On Tue, 2008-03-18 at 12:33 +0100, Euroka wrote:
>
> > How can I remove all incoming spam directely instead of first
> > processing it via procmail, so domain2 doesn't get all the spam
> > traffic that arrived first at domain1?
>
>
> Use a product designed for a forwarding MTA like amavisd-new.  It will
> quarantine the spam and viruses and forward on all of the ham.


Thanks for the suggestion Dan but it's just for a couple of accounts, most
accounts don't use or need forwarding.
Is there any other way to move all incoming spam directely  to /dev/null

Now I have a .procmailrc in each $HOME with the following

MAILDIR=$HOME/Mail
LOGFILE=$HOME/Mail/log
:0:
* ^X-Spam-Status: Yes

But this only deletes it locally, so the spam is not deleted if it's being
forwarded to another email address

Re: remove spam before forwarding

Posted by "McDonald, Dan" <Da...@austinenergy.com>.
On Tue, 2008-03-18 at 12:33 +0100, Euroka wrote:

> How can I remove all incoming spam directely instead of first
> processing it via procmail, so domain2 doesn't get all the spam
> traffic that arrived first at domain2?

Use a product designed for a forwarding MTA like amavisd-new.  It will
quarantine the spam and viruses and forward on all of the ham.

-- 
Daniel J McDonald, CCIE #2495, CISSP #78281, CNX
Austin Energy
http://www.austinenergy.com


Re: remove spam before forwarding

Posted by mouss <mo...@netoyen.net>.
Euroka wrote:
> Hi all,
>
> I have a postfix with a couple of virtual hosts and a /etc/postfix/virtual
> file with my users
> .
>
> some users prefer that mail from my postfix server mail.domain1.com gets
> forwarded to an exchange server at mail.domain2.com
>
> Now all users have a .procmailrc file in their home directory that moves al
> tagged spam to /dev/null But users who also forward mail to domain2 still
> get the full load of spam traffic to domain2.
>
> How can I remove all incoming spam directely instead of first processing it
> via procmail, so domain2 doesn't get all the spam traffic that arrived first
> at domain2?
>
> Biggest problem atm is that I see that all the spam traffic that gets
> forwarded create too many connections and so things get into a loop...
>
> Mar 18 14:52:14 SOKA2 postfix/smtp[23477]: 30B79A401A:
> to=<greet.ruidt@domain2.be
> <http://mail.studioo.be/src/compose.php?send_to=greet.dequidt%40arteveldehs.be>>,
> orig_to=<greet.ruidt@domain1.be
> <http://mail.studioo.be/src/compose.php?send_to=greet.dequidt%40sovoarte.be>>,
> relay=mail2.domain2.be[193.181.138.107], delay=0, status=deferred
> (host mail2.domain2.be[193.181.138.107] said: 452 Too many recipients
> received this hour (in reply to RCPT TO command))
>
>   

one approach would be to use header_checks in the "after the filter" 
postfix (you need a specific cleanup service)
/^X-Spam-Flag: Yes/         HOLD
This applies to _all_ mail.

Using amavisd-new is a better approach.

This is a question for the postfix-users list, so followups there please.