After a few months of harassing by spammers, I'd finally set up procmail. I am
not interested in sorting mail in separate incoming folders, I just want to
get rid of spam.
As a minimum, I am satisfied with my current working configuration (reject
mail coming from a list of spammers contained in a file). This however
requires I insert the spammer in the list (and file a complaint) manually.
I wanted to arrange something that sends a standard "no spam" message on the
first time. I have tried the following set of rules :
:0 Whic
* !^FROM_DAEMON
* !^X-Loop: lucio(_at_)ifctr(_dot_)mi(_dot_)cnr(_dot_)it
| (/ut/Procmail/bin/formail -x sender: -x from: -x reply-to: | grep ... )
:0 ahc
#| (/ut/Procmail/bin/formail -krt -A"X-Loop: myaddress" ;
cat $PMDIR/bounce.message) | $SENDMAIL -t
:0 a:
REJECTED
In my intention the first rule (it works) should detect spammers with some
sort of grep (this is the same rule I already use, in the test configuration I
just use a fake reply-to to trigger it)
The second rule should prepare the bounce header, and format a message like
From: me
To: original sender
X-Loop: me
etc. header to be customized
standard bounce message
----------------------------
original message body
The third rule shall dispose of the message (to /dev/null, for testing I use
a reject folder).
What I fail to do is to compose the message in the order I like. It comes out
with the mail header, and my bounce message, but NO original message body (I
thought I had to include the -k args for that).
I tried removing the h from the ahc flags in the second rule, but in this case
my bounce message comes AFTER the message body.
Since I fail to see this in the FAQ, and this should be a quite common
request, can anybody reply with a personal mail explaining what I'm obviously
missing ?
----------------------------------------------------------------------------
Lucio Chiappetti - IFCTR/CNR - via Bassini 15 - I-20133 Milano (Italy)
----------------------------------------------------------------------------
Fuscim donca de Miragn E tornem a sta scio' in Bregn
Che i fachign e i cortesagn Magl' insema no stagn begn
Drizza la', compa' Tapogn (Rabisch, II 41, 96-99)
----------------------------------------------------------------------------
For more info : http://www.ifctr.mi.cnr.it/~lucio/personal.html
----------------------------------------------------------------------------