0

I am using postfix on a Debian server, primarily to send outgoing email for websites and notifications, and have run into an issue where outgoing email to a certain mailing list provider is rejected but email to "normal" individual email addresses goes through just fine.

I've been informed this is due to an empty MAIL FROM, since that typically indicates a bounce or a spammer, which mailing lists don't accept. However, this isn't a bounce - it's the initial outgoing message. However, it does seem if I debug the SMTP session, MAIL FROM is empty:

May 14 12:41:49 mail postfix/smtp[13274]: > REDACTED[REDACTED]:25: MAIL FROM:<>
May 14 12:41:49 mail postfix/smtp[13274]: smtp_stream_setup: maxtime=300 enable_deadline=0
May 14 12:41:49 mail postfix/smtp[13274]: < REDACTED[REDACTED]:25: 250 2.0.0 OK
May 14 12:41:49 mail postfix/smtp[13274]: > REDACTED[REDACTED]:25: RCPT TO:<[email protected]>
May 14 12:41:49 mail postfix/smtp[13274]: smtp_stream_setup: maxtime=300 enable_deadline=0
May 14 12:41:49 mail postfix/smtp[13274]: < REDACTED[REDACTED]:25: 500 Bad bounce

The mail itself is queued locally on the same sever using the mail function in PHP. It contains both From and Sender headers.

I don't know why postfix isn't sending a MAIL FROM, but I suspect it could be due to this other reason:

almost all bounce messages use this as well as certain other circumstances, to indicate they do not wish to receive a bounce message in the event of a delivery error

https://lists.debian.org/debian-isp/2004/01/msg00259.html

However, in this case, indicating that it doesn't want a bounce is breaking outgoing email to certain destinations that require a non-empty MAIL FROM.

How can I force it to send a MAIL FROM, such as from a specific address if necessary?

2
  • What is your PHP configuration sendmail_path and mail.force_extra_parameters set to? (calling phpinfo() will dump configuration)
    – anx
    May 14, 2022 at 16:15
  • @anx /usr/sbin/sendmail -t -i and empty May 14, 2022 at 17:10

0

You must log in to answer this question.

Browse other questions tagged .