Closed drscream closed 5 years ago
This patch is a modified version of OmniOSce from.patch file to match the RFC.
can you explain under which conditions a message is sent with this format? What do other MTAs (sendmail/postfix) do?
These messages are send from illumos cron daemon for example. The following information could be provided to other MTAs:
I think we should only drop the From lines at the very beginning of the message (like postfix). Maybe we should also drop From lines with multiple leading >
.
I've updated my pull request to only check the very beginning of the message. About dropping From_ lines with multiple >
: I'm really not sure if that would be part of the RFC, I've not found any information about messages with multiple >
.
could you call it had_first_line
or rename the other variable to had_lastline
, just for consistency?
and I guess move the had_first_line = 0
below the continue
so that multiple From_ lines will be skipped.
Sorry to give feedback only piecemeal. Maybe we should add a comment what this From_ line skipping is about.
No worry, I appreciate your feedback. A comment has been added :-)
Add support for UUCP "From_ lines". RFC976 describes these as:
This fixes an issue where emails generated by cron would have their headers in the mailbody. If the first line starts with "From " or ">From " the line is skipped instead of parsing everything as body.