jari(_dot_)aalto(_at_)poboxes(_dot_)com writes:
|Thu 98-03-19 Philip Guenther <guenther(_at_)gac(_dot_)edu> list.procmail
| So, that line is it for matching commentless message-ids.  To make it into a
| condition and break it up into semi-readable chunks:
| 
| :0
| * ! ^Message-Id:[     ]*<[    ]*("([^"\]|\\.)*"|[-!#-'*+/-9=?A-Z^-~]+)\
|       ([      ]*\.[   ]*("([^"\]|\\.)*"|[-!#-'*+/-9=?A-Z^-~]+))*\
|       [       ]*(_at_)[    ]*\
|       (\[[    ]*([^][\]|\\.)*[        ]*\]|\
|          [-!#-'*+/-9=?A-Z^-~]+([      ]*\.[   ]*[-!#-'*+/-9=?A-Z^-~]+)*)\
|       [       ]*>
| 
| Hmm, maybe I'll start logging ids that match that condition.
Oh my,  Phil, would you please reformat that to more structural form,
so that variables are used instead of pure regexps:
<sigh> If you insist:
        dq = '"'                                # (literal) double-quote
        bw = "\\"                               # (literal) backwhack
        ws         = "[         ]*"                     # whitespace
        atom       = "[-!#-'*+/-9=?A-Z^-~]+"
        word       = "($atom|$dq([^$dq\]|$bw.)*$dq)'
        local_part = "$word($ws\.$ws$word)*"
        domain     = "(\[$ws([^][\]|$bw.)*$ws\]|$atom($ws\.$ws$atom)*)"
        :0
        * ! $ ^Message-Id:$ws<$ws$local_part$ws(_at_)$ws$domain$ws>
        whatever
And no, I haven't tested that.
Philip Guenther