Hello,

I find that messages (usually spam) find their way into mbox files with
no from address (below), which confuses many programs needing to parse
them (mail(1) and fetchmail at least, not mutt though). mail(1) sees
the second From and its message as part of the message preceding it.
        From  Thu Jul 18 10:45:15 2013
instead of
        From user@host Thu Jul 18 10:45:15 2013

I thought it would be appropriate to change OpenSMTPD to reject empty
addresses; however, line 1513 of smtp_session.c specifically accepts
empty addresses. What is the use case of that? Does the RFC say that
empty envelope addresses must be accepted? Perhaps OpenSMTPD could
substitute the address in the from header as envelope from if it is
empty.

OpenSMTPD calls mail.local for mbox delivery. It could be modified to
insert a dummy address if from is empty. I would include a patch, but
I'm not sure that mail.local is the proper place to handle it (or what
dummy address is appropriate). 

Of course mail(1) could also be modified, but that doesn't fix other
clients.

I'm not sure how this affects sendmail or other mailbox formats.

- Martin Brandenburg

Reply via email to