procmail
[Top] [All Lists]

Re: checking against blacklist

2002-09-28 19:40:52
Hello

Am Sonntag, 29. September 2002 00:04 schrieb dman(_at_)nomotek(_dot_)com:
sorry for that^- I will use english version next time.

From: Axel Heinrici <axel(_dot_)foley-beverly-hills(_at_)gmx(_dot_)de>

I want to generate a blacklist automatically and check mail agains
this list. The creation of the blacklist seems to work fine. I have
a file containing the message ID of each mail my rule assumes as
corrupted. I assume mails with a Subject beginning with "Re:" and

Before we get any further, can you clarify what good you think the
Message-IDs will do?  You do know they won't likely be repeated
in new mail (except in very odd or very broken cases), right?

I want mail replied to corrupt mails to be dumped also. When someone 
writes a mail without appropriate "In-Reply-To:.." in the header, and 
another one replies to this, this reply also contains the 
message-ID.... and so on. So the whole followup is dumped.

not containing a non-empty "In-Reply-To:" line as corrupt. In other
mailinlists one gets several mails destroing the threading :-). The

following rule generates this list:
:0 c : #Falsche Replys markieren

Btw, I happen to speak German as well and English; I'm an American
living in Germany.  I don't want to make fun of "Germlisch"; in fact,
you write English very well, and this is not a criticism of your
ability to communicate in a foreign language.  I thought, all the
same, that I'd bother to point out that the plural of "reply"
would be "replies" in English.  So maybe you want your comment
and your file to read that way, I don't know.  :)

Ok, next Version uses "Replies". In fact this in Germlisch. There are no 
clear rules to buid plural with expressions like "fascherReply" :-)

* ! ^[Ii]n-[rR]eply-[Tt]o:...$
* [Ss]ubject:.*[Rr]e:

You do not need the dual cases for your letters.  Procmail is
not case-sensitive until you tell it to be so with the D flag.
So the case stuff is not necessary.  (If it were, though, we'd
have a problem, because the RFCs do not prohibit the letters
past the initial one in header words from being upper-case, either.)

|egrep -E Message-ID: |awk -F " " '{print $2}' >>.falscheReplys

I still don't undertand why you want the Message-IDs; but supposing
that you really do, you don't need to pipe to egrep and then awk.

explained above.

You can do this same thing totally within procmail, e.g.:
      :0 hic:  # caret, space and tab are in brackets below

      * ! ^In-Reply-To:.*[^   ]
      *   ^Subect:(.*\<)?Re:
      *   ^Message-ID:.*<\/[^>]+

      | echo $MATCH >> .falscheReplies
I am more familiar with awk then with procmail. So, this will be nicer 
and probably faster, but it doesn't fix my problem.:-(..

Afterwards I want to check the incoming mails against this list.
Every mail coming in should be checked against containing this
message-ID. Also Replies to the corrupt mail should be marked as
corrupt by the next recipe. Then I want these mails to be dumped. I
tried this way:

If you are going to check the same list right here, what will have
stopped a race condition such that the above action will already have
completed and you'll get a match on the very same mail?

This is OK in my oppinion. When a message-ID is put into the list the 
same mail ist dumped in a recipe below. I do not see why this is not 
correct. This is exactly what I want.

I recognized that this sometimes puts message-IDs twice into the list. 
But this is just a performance issue and will be fixed when this is 
working.

:0 Wh:
:
| egrep  -f .falscheReplys
|egrep -E Message-ID: |awk -F " " '{print $2}' >>.falscheReplys

listen-reste/

I see PSE has answered the point about no multiple action lines being
allowed; so I'll stop here for now.

Tschuess
Dallman Ross

greetings
        Axel

p.s. your mail does not contain an "In-Reply-To:" in the header. Why?
_______________________________________________
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>