Loading ...
Sorry, an error occurred while loading the content.

Re: illegal chars in Message-ID

Expand Messages
  • Rich Wales
    ... Short answer: No, and you don t want to. Fix your Procmail filter. Longer answer: According to RFC 2822 (http://www.ietf.org/rfc/rfc2822.txt), the
    Message 1 of 2 , Nov 28, 2005
    • 0 Attachment
      "timonin" wrote:

      > I have a very weird problem. Illegal chars, such as ~ or $
      > in Message-ID cause my procmail filter to throw an error like
      > this . . . . Is there any way to sanitize message-ids with
      > postfix?

      Short answer: No, and you don't want to. Fix your Procmail filter.

      Longer answer:

      According to RFC 2822 (http://www.ietf.org/rfc/rfc2822.txt), the
      following characters are all LEGAL in the left-hand side of a
      Message-ID: ! # $ % & ' * + - / = ? ^ _ ` { | } ~

      (plus, of course, all upper- and lower-case letters and all digits)

      Strange but true; "believe it or not"; etc., etc.

      Additionally, periods (.) are legal in a Message-ID, as long as
      the left-hand side doesn't begin or end with a period.

      Quoted strings (between "double quote marks") are also technically
      legal in a Message-ID, and I've seen them on rare occasion.

      If, when you speak of "sanitizing" a Message-ID, you are considering
      having Postfix or other software make changes to the Message-ID value
      (such as removing or replacing characters you don't want to mess
      with), this would be a VERY BAD idea, because the result of your
      "sanitizing" would be a string that no one else would recognize as
      having any connection to the original e-mail message. You really
      need to preserve the original Message-ID string exactly as it
      appeared in the message, or else it's completely useless.

      If you're finding that certain Message-ID values are causing Procmail
      to generate errors, you'll either have to fix the regular expression
      you're using to match a Message-ID string (so that it will handle the
      characters in question), or else you may have found a bug in Procmail
      (which would need to be brought up with the Procmail people).

      I would be very surprised, really, if Procmail had a bug that funda-
      mentally refused to accept dollar signs in Message-ID's. I've seen
      many, many Message-ID's with $ in them; any bug of this sort would
      presumably have been noticed (and fixed) long ago.

      Rich Wales
      Palo Alto, California, USA
      richw@...
    Your message has been successfully submitted and would be delivered to recipients shortly.