> 
> a uid fetch 808 (envelope)
> * 1 FETCH (UID 808 ENVELOPE ("date"
> "=?ISO-8859-2?Q?E-mail=20noviny=2016/06:=20Vli?= 
> =?ISO-8859-2?Q?v=20p=F8=EDjm=F9=20ze=20zam=ECstn=E1n=ED=20n?= 
> =?ISO-8859-2?Q?a=20z=E1lohy=20fyzick=FDch=20osob?=" (("=?ISO-8859-2?Q?
> "Verlag=20Dash=F6fer=20-=20DU.cz?=   =?ISO-8859-2?Q?" ?=" NIL "e-noviny"
> "smtp.dashofer.cz")) (("=?ISO-8859-2?Q? "Verlag=20Dash=F6fer=20-=20DU.cz?=
>   =?ISO-8859-2?Q?" ?=" NIL "e-noviny" "smtp.dashofer.cz")) (("Verlag
> Dashöfer " NIL "e-noviny" "dashofer.cz")) ((NIL NIL "user" "dom")) NIL NIL
> NIL "<[EMAIL PROTECTED]>"))
> a OK UID FETCH completed
> 
> I see the main problem is unescaped quotas in addresses names. Original
> header seems as
> 
> To: [EMAIL PROTECTED]
> Subject: =?ISO-8859-2?Q?E-mail=20noviny=2016/06:=20Vli?=
>  =?ISO-8859-2?Q?v=20p=F8=EDjm=F9=20ze=20zam=ECstn=E1n=ED=20n?=
>  =?ISO-8859-2?Q?a=20z=E1lohy=20fyzick=FDch=20osob?=
> Sender: =?ISO-8859-2?Q? "Verlag=20Dash=F6fer=20-=20DU.cz?=
>         =?ISO-8859-2?Q?"
>         ?= <[EMAIL PROTECTED]>
> Reply-To: =?ISO-8859-2?Q?Verlag=20Dash=F6fer=20?= <[EMAIL PROTECTED]>
> From: =?ISO-8859-2?Q? "Verlag=20Dash=F6fer=20-=20DU.cz?=  
> =?ISO-8859-2?Q?"
>         ?=
>         <[EMAIL PROTECTED]>
> 


Looks to me like a garbage-in, garbage-out situation.

The reply-to field looks clean, but the Sender and From fields are
completely messed up. The fact that there are no double-quotes around
the encoded strings breaks gmime, but dbmail will try to acommodate and
work around this. But then there are double-quotes inside the encoded
strings, and this breaks dbmail's work-around.

This I /could/ fix (but read on below) by skipping '"' inside an encoded
string. But even then things are not ok:

rfc2047 sez:


IMPORTANT: 'encoded-word's are designed to be recognized as 'atom's
   by an RFC 822 parser.  As a consequence, unencoded white space
   characters (such as SPACE and HTAB) are FORBIDDEN within an
   'encoded-word'.  For example, the character sequence

and the from and sender headers breaks this rule. Admittedly, the htab
inside the from header is probably a consequence of an included space
being wrapped by some mail handling program, but the spaces inside the
encoded strings are real killer here. Nothing we can do about that.

About the double-quote '"' inside the encoded word rfc2047 says:

 Other characters are also
   illegal in certain contexts.  For example, an 'encoded-word' in a
   'phrase' preceding an address in a From header field may not contain
   any of the "specials" defined in RFC 822.

And rfc822 defines specials as:

 specials    =  "(" / ")" / "<" / ">" / "@"  ; Must be in quoted-
                 /  "," / ";" / ":" / "\" / <">  ;  string, to use
                 /  "." / "[" / "]"              ;  within a word.

So '"' is forbidden inside a encoded string inside a address header.

-- 
  ________________________________________________________________
  Paul Stevens                                      paul at nfg.nl
  NET FACILITIES GROUP                     GPG/PGP: 1024D/11F8CD31
  The Netherlands________________________________http://www.nfg.nl

Reply via email to