Score:0

Force non-empty MAIL FROM for outgoing email

br flag

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?

anx avatar
fr flag
anx
What is your PHP configuration `sendmail_path` and `mail.force_extra_parameters` set to? (calling `phpinfo()` will dump configuration)
InterLinked avatar
br flag
@anx /usr/sbin/sendmail -t -i and empty
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.