On Wed, Jun 05, 2002 at 10:21:36PM -0400, Jean-Sebastien Morisset wrote:
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.$$?
Got it! This one works exactly as expected, including the lockfile. Now
I can go to bed. :-) Thanks 'Professional Software Engineering'! :-)
---BEGIN---
MAILDIR=$HOME/Maildir/
DEFAULT=$HOME/Maildir/
SPAM=${MAILDIR}/.spam/
DROPPRIVS=yes
: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
| ( tee spam.tmp | 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 | expand | sed -e 's/[ ]*$//g' | sed -e 's/^/> /' ; \
echo "--- end rejected mail ---" ; \
rm -f spam.tmp ; \
) | $SENDMAIL -t -f reject(_at_)spam(_dot_)mvlan(_dot_)net
}
---END---
--
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