You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Luke Shannon <Lu...@date.com> on 2006/11/17 19:41:03 UTC

Sending Marked up mail to another address

I just got my system going. For the short term I would like to send all
mail marked as spam to another address (not served from the box spam
assassin is on).

I am using sendmail/procmail/spamassissin

Here is my .spamassassin.rc file. Any ideas why this won't work? When
the forward rule is in place, the first rule doesn't work.

I'm new to this so my apologies if this is a trivial/silly error on my
part.

Thanks for the help,

Luke


# (250 * 1024 = 256000 bytes) are processed by SpamAssassin. 
:0fw
* < 256000
| /usr/bin/spamassassin --prefs-file=/home/spamfolder/.user_prefs

# All mail tagged as spam (eg. with a score higher than the set
threshold)
# is forwarded to admin
:0
* ^X-Spam-Status: Yes
/usr/sbin/sendmail -oi admin@site.com

# Work around procmail bug: any output on stderr will cause the "F" in
"From"
# to be dropped.  This will re-add it.
:0
* ^^rom[ ]
{
  LOG="*** Dropped F off From_ header! Fixing up. "

  :0 fhw
  | sed -e '1s/^/F/'
}

Re: Sending Marked up mail to another address

Posted by Bob McClure Jr <bo...@bobcatos.com>.
On Fri, Nov 17, 2006 at 01:41:03PM -0500, Luke Shannon wrote:
> I just got my system going. For the short term I would like to send all
> mail marked as spam to another address (not served from the box spam
> assassin is on).
> 
> I am using sendmail/procmail/spamassissin
> 
> Here is my .spamassassin.rc file.

You mean .procmailrc file?

> Any ideas why this won't work? When
> the forward rule is in place, the first rule doesn't work.
> 
> I'm new to this so my apologies if this is a trivial/silly error on my
> part.
> 
> Thanks for the help,
> 
> Luke
> 
> 
> # (250 * 1024 = 256000 bytes) are processed by SpamAssassin. 
> :0fw
> * < 256000
> | /usr/bin/spamassassin --prefs-file=/home/spamfolder/.user_prefs
> 
> # All mail tagged as spam (eg. with a score higher than the set
> threshold)
> # is forwarded to admin
> :0
> * ^X-Spam-Status: Yes
> /usr/sbin/sendmail -oi admin@site.com

You need a pipe in front of that:

| /usr/sbin/sendmail -oi admin@site.com

The other way is to just put a bang in front of the email address:

! admin@site.com

See "man procmailex" and "man procmailrc".

> # Work around procmail bug: any output on stderr will cause the "F" in
> "From"
> # to be dropped.  This will re-add it.
> :0
> * ^^rom[ ]
> {
>   LOG="*** Dropped F off From_ header! Fixing up. "
> 
>   :0 fhw
>   | sed -e '1s/^/F/'
> }

Cheers,
-- 
Bob McClure, Jr.             Bobcat Open Systems, Inc.
bob@bobcatos.com             http://www.bobcatos.com
"Where you go in the hereafter depends on what you were after here."
  - Thanks to Graffiti, 2 March 2004