envelope-from header missing

Mark Sapiro mark at msapiro.net
Mon Dec 7 02:56:54 UTC 2020


On 12/6/20 12:43 PM, Emanuel Vidmar - Avant.Si wrote:
> Mark, thank you for your reply.
> I am not sure what could have caused that, this is a fairly simple
> cPanel (Exim) + ConfigServer Mailscanner setup. No special
> configuration. I have contacted ConfigServer's support first, this was
> their answer:
> 
> "Outbound notification from MailScanner does not have the envelope-from
> field and therefore the From in MailControl is not populated. I'm afraid
> there's nothing we can do from our end to resolve this issue, you'd need
> to check the MailScanner newsgroup to find out if there is anything that
> can be done."


I guess this is an issue with MailControl. If MailControl is rewriting
the From: with the envelope sender, they just can't handle this mail.
Judging from their web site, I think it's likely they are doing just that.

Note that a null MAIL FROM: address is perfectly legitimate any time you
don't want an undeliverable DSN returned. For one example, almost all
MTAs send DSNs with null MAIL FROM: to avoid bounce loops. MailScanner
does this with user notifications for similar reasons.

Do you have to send mail via MailControl?

Note that the places where MailScanner sends with a null envelope are at

https://github.com/MailScanner/v5/blob/master/common/usr/share/MailScanner/perl/MailScanner/MCPMessage.pm#L518

https://github.com/MailScanner/v5/blob/master/common/usr/share/MailScanner/perl/MailScanner/MCPMessage.pm#L566

Although MCP probably isn't involved in your case, and

https://github.com/MailScanner/v5/blob/master/common/usr/share/MailScanner/perl/MailScanner/Message.pm#L1558

https://github.com/MailScanner/v5/blob/master/common/usr/share/MailScanner/perl/MailScanner/Message.pm#L1606

https://github.com/MailScanner/v5/blob/master/common/usr/share/MailScanner/perl/MailScanner/Message.pm#L1755

https://github.com/MailScanner/v5/blob/master/common/usr/share/MailScanner/perl/MailScanner/Message.pm#L6618

You could patch those lines changing '<>' to $localpostmaster. I.e.
change something like

... SendMessageString($this, $emailmsg, '<>')

to

... SendMessageString($this, $emailmsg, $localpostmaster)

-- 
Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan


More information about the MailScanner mailing list