Why does reject_null_sender in iredmail rejects valid bounces

email-bounces

The reject_null_sender plugin in iRedMail indicates its purpose as:

Reject message submitted by sasl authenticated user but specifying null sender in 'From:' header (from=<> in Postfix log).

But the code actually states a rejection when either the sender or SASL user are null. This effectively rejects some valid bounces messages.

According to RFC 5321:

If an SMTP server has accepted the task of relaying the mail and later finds that the destination is incorrect or that the mail cannot be delivered for some other reason, then it MUST construct an "undeliverable mail" notification message and send it to the originator of the undeliverable mail.

(…)

When such a message is transmitted the reverse-path MUST be set to null (see section 4.5.5 for additional discussion). A MAIL command with a null reverse-path appears as follows:

  MAIL FROM:<>

Is this a bug of iRedMail? Is there any other concern about null senders without SASL authenticated user?

Best Answer

In a private email with the author of the reject_null_sender plugin, he confirmed this is a bug and provided a workaround.

The patch (to be introduced in a later version) can be seen in: https://bitbucket.org/zhb/iredapd/commits/255a7ad5daaa6b0d87890e1d4826737fcc6bbad7

Related Topic