I just added a -checkbase64 switch to mhfixmsg(1):

  The -checkbase64 switch enables a check of the encoding
  validity in base64-encoded MIME parts.  The check looks for a
  non-encoded text footer appended to a base64-encoded part.
  Per RFC 2045 §6.8, the occurrence of a "=" character signifies
  the end of base-64 encoded content.  If none is found, a
  heuristic is used:  specifically, two consecutive invalid
  base64 characters signify the beginning of a plain text
  footer.  If a text footer is found and this switch is enabled,
  mhfixmsg separates the base64-encoded and non-encoded content
  and places them in a pair of subparts to a newly constructed
  multipart/mixed part.  That multipart/mixed part replaces the
  original base64-encoded part in the MIME structure of the
  message.

It takes care of the particular issue reported by Anthony.  It is enabled by 
default in mhfixmsg.

I didn't modify the base64 decoder to conform to RFC 2045.

David

-- 
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers

Reply via email to