$ cat /cs/lib/procmail/forward_spamassassin
# spam filter new messages before sending them to FORWARDTO
# spam is /dev/null'd if forwarding
SPAMDEFAULT=${FORWARDTO:+/dev/null}
SPAMDEST=${SPAMDEST:-$SPAMDEFAULT}
:0
* $ ! SPAMOK ?? yes
{
INCLUDERC=/cs/lib/procmail/spamassassin
}
INCLUDERC=/cs/lib/procmail/forward
And just in case:
$ cat /cs/lib/procmail/spamassassin
# spam filter new messages
# procmail locking provides longer timeouts than spamc locking
:0fw: spamc.lock
| spamc -f
# store anything found to be spam in SPAMDEST (if defined) or CaughtSPAM
:0:
* ^X-Spam-Status: Yes
${SPAMDEST:-CaughtSPAM}
# semi-spammy stuff is separated to MAYBEDEST (if defined) or MaybeSPAM
:0:
* $ ! ${SPAMLEVEL:+!}
* $ ^X-Spam-Level: ${SPAMLEVEL}
${MAYBEDEST:-MaybeSPAM}
$ cat /cs/lib/procmail/forward
# KEEPCOPY should be empty unless yes
KEEPCOPY=`expr "${KEEPCOPY:-no}" : '\([yY]\).*'`
# use ours to separate mailer and sendmail
MAILER="(^(((Resent-)?(From|Sender)|X-Envelope-From):|>?From
)([^>]*[^([EMAIL PROTECTED])?(Post(ma(st(er)?|n)|office)|sendmail|Mailer|daemon|mmdf|n?uucp|ops|r(esponse|oot)|(bbs\.)?smtp(error)?|s(erv(ices?|er)|ystem)|A(dmin(istrator)?|MMGR))(([^).!:a-z0-9][-_a-z0-9]*)?[%@>
][^<)]*(\(.*\).*)?)?$([^>]|$))"
# protect against forwarding loops / don't forward MAILER mail
:0f
* $ ! ${FORWARDTO:+!}
* $ ! ${MAILER}
* $ ! ^X-Loop: ${LOGNAME}
| /local/bin/formail -A"X-Loop: $LOGNAME"
COMSAT=no
:0A${KEEPCOPY:+c}
! $FORWARDTO
Hmmm... Hope it's ok to copy/paste all this. :|
-Rob
Jason LaPier wrote:
From the looks of those scripts, they're relying on other scripts to do the
actual work. Could you:
cat /cs/lib/procmail/forward_spamassassin
I couldn't find anything like that on the uoregon shell, so it must be
something custom on the cs server.
Thanks,
Jason
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Rob Hudson
Sent: Wednesday, November 15, 2006 9:48 AM
To: Eugene Unix and Gnu/Linux User Group
Subject: Re: [Eug-lug] Procmail dummy
I have a CS account and this is what I have. I didn't set it
up. The sysadmin did...
$ cat ~/.procmailrc
# basic configuration information
SHELL=/bin/sh
PATH=$HOME/bin:/local/bin:/usr/bin
# any local overrides
INCLUDERC=$HOME/etc/procmail.settings
INCLUDERC=/cs/lib/procmail/forward_spamassassin
INCLUDERC=$HOME/etc/procmail.rules
INCLUDERC=/cs/lib/procmail/vacation
:0 w : inbox.lock
* $ ! ${MHINBOX:+!}
| rcvstore +${MHINBOX}
$ cat ~/etc/procmail.settings
MAILDIR=$HOME/mail
[EMAIL PROTECTED]
I'm pretty sure this still passes off to spamassassin and if
it's ok, then forwards it on to me.
-Rob
Jason LaPier wrote:
Confession time - I never did figure out how to use procmail, and
looking at procmail recipes makes my head hurt. Now I just
want to set
up a procmail recipe to forward email to a different address. Very
simple. This is the U of O email, and they have it set up
so that if
you make a .forward file, your email gets forwarded
straight off the
SMTP. That's fine and dandy, however, they have a bunch of spam
tagging and filtering that'd I like to take advantage of,
so I want to
use a procmail script instead, so the mail gets forwarded
_after_ getting wrung through spam-assassin, etc.
I know my maildir, and I'm pretty sure I don't want any
logging (since
it will be forwarding mail from here on out).
Thanks in advance for what I hope is a simple recipe,
- Jason
Jason LaPier
Network Manager
TACS / WRRC / NPSO
University of Oregon
_______________________________________________
EUGLUG mailing list
euglug@euglug.org
http://www.euglug.org/mailman/listinfo/euglug
_______________________________________________
EUGLUG mailing list
euglug@euglug.org
http://www.euglug.org/mailman/listinfo/euglug
_______________________________________________
EUGLUG mailing list
euglug@euglug.org
http://www.euglug.org/mailman/listinfo/euglug
_______________________________________________
EUGLUG mailing list
euglug@euglug.org
http://www.euglug.org/mailman/listinfo/euglug