<<< Date Index >>>     <<< Thread Index >>>

Re: broken "^From " header



Mark E. Mallett <mem@xxxxxxxxx> wrote:
> Or are you using qmail by any chance?  qmail doesn't do much validation
> of various inputs, including the email addresses in the MAIL FROM or
> RCPT TO.  Some months back I noticed that we were getting mail from
> broken spam engines that were putting newlines smack dab in the middle
> of the address in the MAIL FROM, and one side-effect was broken "From "
> lines exactly like the original poster described.  I made a quick hack
> to qmail to make it reject those addresses-- but IMHO qmail could stand
> to have a lot more checking added.

Those address forms (while rare) can be valid in quoted strings in SMTP.
qmail is correct in allowing them.

qmail handles these cases when doing mbox deliveries; see this part of
mbox(5):

  HOW A MESSAGE IS DELIVERED

    It first creates a From_ line given the message's envelope sender and the
    current date.  If the  envelope  sender  is empty  (i.e.,  if  this  is a
    bounce message), the program uses MAILER-DAEMON instead.  If the envelope
    sender con­ tains spaces, tabs, or newlines, the program replaces them
    with hyphens.

So it must have been a dumber MDA that stuck those broken From_ lines into
that mbox file.

Charles
-- 
-----------------------------------------------------------------------
Charles Cazabon                             <mutt@xxxxxxxxxxxxxxxxxxxx>
GPL'ed software available at:     http://www.qcc.ca/~charlesc/software/
-----------------------------------------------------------------------