procmail
[Top] [All Lists]

Re: My own antispam recipes

2003-11-05 12:55:13
Dear Udi,

thank you for pointing me to really good resources. I am just reading and
reading... :-)
OK, what do you say about my idea - to stop every domain, the spam come from
?
I made some research (about 3-5 months) and it seems that a lot of spam is
comming from same domains (but not same addresses [before @] ). So I decided
to stop such domains to the future.
I can say, my newbie recipes works (I started them, because I had about 200
spams per day), they are only very unefficient. Now I receive about 10-15
spams per day. It's success, isn't it ? Now I can study the procmail "to the
deep" from resources you send me before.

Really, could you please help me with the regexp for searching the first
Received header in a mail for envelope-from and suck the domain from it ?
And, if it is empty, then try the same with From header. This is the main
wrong my recipes have. The others mistakes (as I always send a copy of mail
to each recipe, etc.) I will try to resolve by myself.

Again, many thanks and best regards.

Peter


----- Original Message -----
From: "Udi Mottelo" <uuddii(_at_)eng(_dot_)tau(_dot_)ac(_dot_)il>
To: "Peter Rosa" <prosa(_at_)pro(_dot_)sk>
Cc: "Procmail List" <procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE>
Sent: Tuesday, November 04, 2003 3:19 PM
Subject: Re: My own antispam recipes


On Tue, 4 Nov 2003, Peter Rosa wrote:

Dear list's friend,

[...]
TO_HEAD=`${FMAIL} -x "To:"`
ENV_FROM=`formail -x "Received:" | ${AWK} -F "envelope-from" '{ print
$2 }'
| ${AWK} -F ")" '{ print $1 }'`
E__MAIL=`${FMAIL} -x "To:" | ${AWK} -F '<' '{ if ($2=="") print $1; else
print $2; }' | ${AWK} -F '>' '{ print $1 }'`
FROM_HEAD=`${FMAIL} -x "From:"`
SUBJ_HEAD=`${FMAIL} -x "Subject:"`
[...]

Dear Peter, you asked help before and nobody answered you.
It looks like you try to chew something too big.  You must learn
and do it step by step.
Here is my opinion how to start with procmail:

 0)    There is a book "The Procmail Companion" by Martin McCarthy.

 1.a)  Read the egrep man page.  There are some little difference in
       procmail syntax but, you must practise until you feel familiar
       with regular-expressions.

 1.b)  _Lightly_ read the man pages of procmail, procmailrc, formail
       and procmailex.

 1.c)  Go to NMTG web site: http://www.ii.com/internet/robots/procmail/qs/
       It's clear and easy to read!  She will lead you step by step to
write
       yours first working rcfile and recipes.

 2.a)  Now, back to the procmailex man page and _READ_ it.  Examine the
       flags against the procmailrc man.

 2.b)  Sean B. Straw (Professional) has good site with a little glossary
       for acronyms that you MUST know if you read this mailinglist and
FAQ.
       http://www.professional.org/procmail/disclaimer.html

 2.c)  Read the FAQ!

 3.a)  Now, when you write more sophisticated recipes, back to Sean's
       web and see his sendbox which explain and build a test environment
       to check rcfiles! http://www.professional.org/procmail/sandbox.html

 3.b)  Also, you can read the procmailsc man page, now.


NOTE:  Do not panic, after step 1 you will be able to keep your
head above the water and write nice rc files.


Bye,
 Udi



_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>