On 21 Nov 2002, Peter Runestig writes:

> I'm using this little sendmail milter to fix the subject line (could of 
> course be extended to fix other headers as well):
> ftp://ftp.runestig.com/pub/misc/subject2rfc2047.c
> http://ftp.runestig.com/pub/misc/subject2rfc2047.c

This is a nice idea.  Your program does not seem to encode the equals
sign "=" or underscore "_" in 'Q' encoded headers.  I suspect that in
your function mlfi_eom:

  if (subj[n] & 0x80 || subj[n] == ' ' || subj[n] == '\t' || subj[n] == '?') {

should be:

  if (subj[n] & 0x80 || subj[n] == ' ' || subj[n] == '\t' || subj[n] == '?' || subj[n] 
== '=' || subj[n] == '_') {

Otherwise (I think) Section 4.2(3) of RFC2047 is not quite being followed.

Also, extending this milter to handle From: and To: and Cc: and so
forth would require an RFC822 header parsing capability, so it could
distinguish ctext, text, and word tokens within them.  I suspect that
would significantly increase the complexity of the code.

Jonathan
--
Jonathan Marsden        | Internet: [EMAIL PROTECTED]     | Making electronic 
1252 Judson Street      | Phone: +1 (909) 795-3877      | communications work 
Redlands, CA 92374      | Fax:   +1 (909) 795-0327      | reliably for Christian 
USA                     | http://www.xc.org/jonathan    | missions worldwide 

Reply via email to