On Wed, Jun 05, 2002 at 05:18:40PM -0700, Professional Software Engineering
wrote:
You should take a browse through the procmail FAQs sometime.
I did, and found a few interesting tid-bits. The recipe finally works
(included bellow), except the spam.lock file doesn't seem to work as
expected. What do you think? Perhaps I could get rid of the lockfile and
use a unique filename instead? Something like spam.lock.$$?
[snip!]
procmail: Score: 2147483647 2147483647
"(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-To):(.*[^a-zA-Z])?)(_dot_)*(_at_)spam\(_dot_)mvlan\(_dot_)net"
procmail: Assigning
"LASTFOLDER=/home/jsmoriss/Maildir//.spam/new/1023329778.16657_0.marvin"
procmail: Extraneous locallockfile ignored
procmail: Locking "spam.lock"
procmail: Unlocking "spam.lock"
procmail: Assigning "LASTFOLDER= expand | sed -e 's/[ ]*$//g' | sed -e 's/^/>
/' > spam.tmp"
procmail: Assigning "LASTFOLDER= ( formail -r -I"Precedence: junk" -A"X-Loop:
reject(_at_)spam(_dot_)mvlan(_dot_)net"; \
[snip!]
---BEGIN---
LOGFILE=/var/log/procmail.log
MAILDIR=$HOME/Maildir/
DEFAULT=$HOME/Maildir/
SPAM=${MAILDIR}/.spam/
[snip!]
#
# Executed on behalf of the recipient.
#
DROPPRIVS=yes
LOGFILE=$HOME/procmail.log
VERBOSE=on
:0
* 0^0 !^FROM_DAEMON
* 0^0 !^X-Loop: reject(_at_)spam(_dot_)mvlan(_dot_)net
* 9876543210^0
^From:.*(WebProNews|shopping-values\.com|cybercarsonline(_at_)yahoo\(_dot_)com|\
gtreet245(_at_)excite\(_dot_)com|marketing(_at_)imfc\(_dot_)com)
* 9876543210^0 ^Subject:.*(Credit Card| [0-9][0-9][0-9][0-9][0-9]*$|\
[Aa][Dd][Vv]: .*$)
* 9876543210^0 ^TO(_dot_)*(_at_)spam\(_dot_)mvlan\(_dot_)net
* 9876543210^0 ^Errors-To: morejunkmail
* 9876543210^0 B ?? ^(I send you this file in order to have your advice|\
Te mando este archivo para que me des tu punto de vista)$
{
:0c
${SPAM}
:0:spam.lock
{
:0c
| expand | sed -e 's/[ ]*$//g' | sed -e 's/^/> /' > spam.tmp
:0
| ( formail -r -I"Precedence: junk" -A"X-Loop:
reject(_at_)spam(_dot_)mvlan(_dot_)net"; \
echo "Please note: Your e-mail has been classified as SPAM."; \
echo "As such, it will be deleted automatically in 7 days"; \
echo "without being reviewed."; echo "" ; \
echo "--- begin rejected mail ---" ; \
cat spam.tmp ; \
echo "--- end rejected mail ---" ; \
rm -f spam.tmp; \
) | $SENDMAIL -t -f reject(_at_)spam(_dot_)mvlan(_dot_)net
}
}
---END---
Thanks!
js.
--
Jean-Sebastien Morisset, Sr. UNIX Administrator <jsmoriss(_at_)mvlan(_dot_)net>
Personal Home Page <http://jsmoriss.mvlan.net:8080/>
"With sufficient thrust, pigs fly just fine." -- RFC 1925
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail