How to forward all spam to a single mailbox
How to forward all spam to a single mailbox
am 15.09.2005 20:07:30 von recpharm
I have a freebsd box running Postfix 2.2, amavisd-new and SpamAssassin
3.02.
All email is spam-checked by the freebsd box, then relayed to my
exchange server.
Is there a way to take all the email marked as SPAM and forward it to a
single mailbox on the exchange server? Something like
spam@mydomain.com if an email scores 10.0 or higher?
TIA!
Re: How to forward all spam to a single mailbox
am 15.09.2005 22:53:29 von AK
recpharm@hotmail.com wrote:
> I have a freebsd box running Postfix 2.2, amavisd-new and SpamAssassin
> 3.02.
>
> All email is spam-checked by the freebsd box, then relayed to my
> exchange server.
>
> Is there a way to take all the email marked as SPAM and forward it to a
> single mailbox on the exchange server? Something like
> spam@mydomain.com if an email scores 10.0 or higher?
>
>
> TIA!
>
In Short Yes, but would depend on the manner in which your setup handles
the mailing.
how is spamassasin envoked in your setup? During the SMTP session or
during a "local" delivery?
Ak
Re: How to forward all spam to a single mailbox
am 15.09.2005 22:57:48 von recpharm
Postfix sends the email to amavisd on port 10024, which sends it back
to postfix on port 10025, which then forwards the email (via a
transport config file in postfix) to the IP of my exchange server.
Amavisd is handling the email virus scan + calling spamassassin. I
actually do not need the virus scanning at all, and would not mind
switching to using spamd directly if that helped with forwarding spam
to a single box on the exchange server.
AK wrote:
> recpharm@hotmail.com wrote:
> > I have a freebsd box running Postfix 2.2, amavisd-new and SpamAssassin
> > 3.02.
> >
> > All email is spam-checked by the freebsd box, then relayed to my
> > exchange server.
> >
> > Is there a way to take all the email marked as SPAM and forward it to a
> > single mailbox on the exchange server? Something like
> > spam@mydomain.com if an email scores 10.0 or higher?
> >
> >
> > TIA!
> >
>
> In Short Yes, but would depend on the manner in which your setup handles
> the mailing.
>
> how is spamassasin envoked in your setup? During the SMTP session or
> during a "local" delivery?
>
> Ak
Re: How to forward all spam to a single mailbox
am 16.09.2005 01:35:57 von gretchen
wrote in message
news:1126817868.585316.277920@g44g2000cwa.googlegroups.com
> Amavisd is handling the email virus scan + calling spamassassin. I
> actually do not need the virus scanning at all, and would not mind
> switching to using spamd directly if that helped with forwarding spam
> to a single box on the exchange server.
Accepting spam does nothing to discourage the spammers. You should reject it
without accepting delivery, otherwise you're part of the problem instead of
the solution.
Re: How to forward all spam to a single mailbox
am 16.09.2005 19:28:28 von Stelian
"gretchen" wrote in message
> Accepting spam does nothing to discourage the spammers. You should reject
it
> without accepting delivery, otherwise you're part of the problem instead
of
> the solution.
Bouncing spam is not making the life of spammers any difficult. In fact, it
gives them an instant feedback on the efficacy of their filter evasion
tricks.
OTOH, rejecting at the SMTP level has the nice effect that if the message is
a false positive, the original sender is at least notified that the message
was not received, instead of it just disappearing into a black hole.
Re: How to forward all spam to a single mailbox
am 16.09.2005 21:28:50 von recpharm
None of this helps with my query, which is how I can take email tagged
as {SPAM} and forward it to a single mailbox.
But, to satisfy the non-topic replys to my thread, I am working on
integrating SPAMD (from OpenBSD) into my spam control system. It is
still in the testing phase, however. The slow-down effect should bug
spammers a lot.
Anyways, is there a method to do the fowarding of {SPAM} tagged email
to a single mailbox?
Stelian wrote:
> "gretchen" wrote in message
> > Accepting spam does nothing to discourage the spammers. You should reject
> it
> > without accepting delivery, otherwise you're part of the problem instead
> of
> > the solution.
>
> Bouncing spam is not making the life of spammers any difficult. In fact, it
> gives them an instant feedback on the efficacy of their filter evasion
> tricks.
> OTOH, rejecting at the SMTP level has the nice effect that if the message is
> a false positive, the original sender is at least notified that the message
> was not received, instead of it just disappearing into a black hole.
Re: How to forward all spam to a single mailbox
am 16.09.2005 23:15:47 von AK
recpharm@hotmail.com wrote:
> Postfix sends the email to amavisd on port 10024, which sends it back
> to postfix on port 10025, which then forwards the email (via a
> transport config file in postfix) to the IP of my exchange server.
>
> Amavisd is handling the email virus scan + calling spamassassin. I
> actually do not need the virus scanning at all, and would not mind
> switching to using spamd directly if that helped with forwarding spam
> to a single box on the exchange server.
>
>
>
> AK wrote:
>
>>recpharm@hotmail.com wrote:
>>
>>>I have a freebsd box running Postfix 2.2, amavisd-new and SpamAssassin
>>>3.02.
>>>
>>>All email is spam-checked by the freebsd box, then relayed to my
>>>exchange server.
>>>
>>>Is there a way to take all the email marked as SPAM and forward it to a
>>>single mailbox on the exchange server? Something like
>>>spam@mydomain.com if an email scores 10.0 or higher?
>>>
>>>
>>>TIA!
>>>
>>
>>In Short Yes, but would depend on the manner in which your setup handles
>>the mailing.
>>
>>how is spamassasin envoked in your setup? During the SMTP session or
>>during a "local" delivery?
>>
>>Ak
>
>
I am unfamiliar with postfix, so please explain how postfix sends the
message to amavisd. Are you using procmail or similar filtering
application?
Draw me a picture of your setup.
postfix via x hands the message for virus checking with amavisd
....
postfix via y hands the message for spamassasin
....
Does your mechanism rely on return codes from the application it
calls/executes?
AK
Re: How to forward all spam to a single mailbox
am 17.09.2005 13:26:59 von NM Public
On 15 Sep 2005, recpharm@hotmail.com wrote:
> Postfix sends the email to amavisd on port 10024, which sends it back
> to postfix on port 10025, which then forwards the email (via a
> transport config file in postfix) to the IP of my exchange server.
>
> Amavisd is handling the email virus scan + calling spamassassin. I
> actually do not need the virus scanning at all, and would not mind
> switching to using spamd directly if that helped with forwarding spam
> to a single box on the exchange server.
If you decide to switch to using spamd via Procmail, I discuss
how to do what you want to do in my Procmail Quick Start.
Especially relevant are these sections:
Using Spam Assassin
The Problems With Forwarding
(this is probably worth reading whether you use Procmail or
not!)
Hope this is useful,
Nancy
--
Nancy McGough ~ ~
IMAP, pine, procmail, data deflexion, infinity, and more
> > > Please keep the discussion in the group < < <
Re: How to forward all spam to a single mailbox
am 19.09.2005 06:16:34 von recpharm
I can see how to setup procmail to both run spamc and to forward spam
to a specific mailbox.
I can't seem to figure out a recipe to forward the mail to a user as
the default action. Can you assist?
Also, I want to make sure that the email (if it has multiple TO, CC and
BCC recipients) gets forwarded correctly.
PATH=/usr/bin:/usr/local/bin
LOGFILE=/var/log/procmail.log
SHELL=/bin/sh
# SpamAssassin sample procmailrc
# The condition line ensures that only messages smaller than 250 kB
:0fw
* < 65535
| /usr/bin/spamc -f -e
:0H
* {SPAM}
! spambox@castellan.net
Re: How to forward all spam to a single mailbox
am 19.09.2005 07:49:06 von NM Public
On 18 Sep 2005, recpharm@hotmail.com wrote:
> I can see how to setup procmail to both run spamc and to forward spam
> to a specific mailbox.
>
> I can't seem to figure out a recipe to forward the mail to a user as
> the default action. Can you assist?
>
> Also, I want to make sure that the email (if it has multiple TO, CC and
> BCC recipients) gets forwarded correctly.
>
> PATH=/usr/bin:/usr/local/bin
> LOGFILE=/var/log/procmail.log
> SHELL=/bin/sh
>
> # SpamAssassin sample procmailrc
> # The condition line ensures that only messages smaller than 250 kB
> :0fw
> * < 65535
> | /usr/bin/spamc -f -e
>
> :0H
> * {SPAM}
> ! spambox@castellan.net
Before you go any further, please read my Procmail Quick Start.
You have a number of problems above, all of which are discussed
in my Procmail Quick Start. For example:
1. Do not explicitly set the PATH environment variable unless you
need it (and you almost surely don't)
2. Why are you using the arguments '-f -e' with spamc? If you
have a good reason, fine, but normally spamc is called without
arguments in a Procmail recipe.
2. Do not use the 'H' flag in a line that starts with ':0'
because there is a bug that happens when you do that (and it's
not needed in your recipe)
3. Use a more precise regular expression than '{SPAM}', e.g.,
'Subject:.*{SPAM}'
4. Your question about 'multiple TO, CC and BCC recipients' means
you need to read this section:
Important Warning: Procmail Cannot Reliably Route Users' Messages
in a Virtual-Domain Dropbox
The links in that section provide some possible solutions, but
you need to understand this very common confusion before you go
any further.
Good luck with Procmail. It's a pain to learn, but very powerful
once you do!
Nancy
--
Nancy McGough ~ ~
IMAP, pine, procmail, data deflexion, infinity, and more
> > > Please keep the discussion in the group < < <
Re: How to forward all spam to a single mailbox
am 20.09.2005 01:39:00 von AK
recpharm@hotmail.com wrote:
> I can see how to setup procmail to both run spamc and to forward spam
> to a specific mailbox.
>
> I can't seem to figure out a recipe to forward the mail to a user as
> the default action. Can you assist?
>
> Also, I want to make sure that the email (if it has multiple TO, CC and
> BCC recipients) gets forwarded correctly.
>
> PATH=/usr/bin:/usr/local/bin
> LOGFILE=/var/log/procmail.log
> SHELL=/bin/sh
>
> # SpamAssassin sample procmailrc
> # The condition line ensures that only messages smaller than 250 kB
> :0fw
> * < 65535
> | /usr/bin/spamc -f -e
>
> :0H
> * {SPAM}
> ! spambox@castellan.net
>
Not quite sure why you have the last recipe in the form you do.
Make sure that your procmail is configured to use the "sendmail" that is
within /var/qmail/bin/sendmail and not trying to use the local sendmail
/usr/lib/sendmail or /usr/sbin/sendmail or /usr/bin/sendmail procmail -v
:0H
* ^X-Spam.+: (YES|Spam)
! spambox@someaddress
:0H
* ^X-Spam-hits: \/[0-9.]+
* $ ? test '$MATCH' -gt '10'
! spambox@someaddress
you can also combine the test with the forward if you do not need the
verbose data/explanation
or
:0H
* < 65535
* ! ? spamc
! spambox@someaddress
unfortunately I do not recall the proper flags for spamc nor whether the
negation is needed or not in the check for spamc.
AK