Felix Tilley writes:
Can someone explain (either via the list, or via email reply) why this
recipe traps invalid message ID's? This recipe is rather bewildering to
me. I can't tell from the log file if really deletes spam. But I have
deleted only two genuine email messages in two years, so it must be benign.
The origin of that regexp is probably heuristic. It basically traps
headers of the format
Message-Id:somewhitespace<somestring(_at_)someotherstring>
# This will allegedly trap invalid message ID's
:0
* !^Message-Id:[\t ]+<("[^"]+"|[^ <>@]+)@[^<>]*>$
one or more space or tab
plus angle bracket
plus either
double quotes followed by a string of at least one char, not
containing a double quote, plus double quote
or
a string of at least one char not containing space, angle brackets,
or @
plus @
plus a string of zero or more chars not containing angle brackets
plus closing angle bracket
plus newline
/dev/null
Trashing email on the basis of bad Message-Id: is a bad idea.
The format of the Message-Id: header is defined in RFC 822, but some
MTAs do simply not generate fully compliant Message-Id:'s.
For an excellent, human-readable understanding of the format of RFC 822
Message-Id:'s and translation into a regexp, search the procmail archives
for Philip Guenther's mail from Mar 19 1998 Subject: Re: bad message id's.
--
Lars Hecking lhecking at nmrc.ucc.ie
PGP: 55 0C 8F 76 B7 30 9F 48 23 C5 3C BF B7 9D D8 DC
Please do not Cc: me on list replies.