procmail
[Top] [All Lists]

Re: Implication of bad message id's (please)?

1997-12-10 02:16:51
Tue 97-12-09 Rik Kabel <rik(_at_)netcom(_dot_)com> list.procmail
|     * ! MID ?? ^^<([^][()<>,;:\"        ]+(\.[^][()<>,;:\"      
]+)*|\"[^"]+\")\
|          @((\[.*\]|[^][()<>,;:\"        ]+)(\.(\[.*\]|[^][()<>,;:\"     ]+))*\
|                   )>[   ]*^^            ## and anything else ain't up to rfc!


Rik, the regexp is way too comlex to read, I tried to formulate it to
ths form, but I'm not sure I got it right. Would you confirm and correct 
this.

WSPC    = "     "               # whitespace in procmail: space + tab
SPC     = "[$WSPC]"             # Regexp space + tab
NSPC    = "[^$WSPC]"            # Negation, non-whitespace

$word   = "[^][()<>,;:\"$WSPC]+"
$word2  = "(\.$word)"
$quot   = "\"[^"]+\""
$bracket = "\[.*\]"

^^<($word$word2*|$quot)@(($bracket|$word)|(\.($bracket|$word))*)>$SPC*^^

jari