You are not logged in.

#1 2019-01-15 01:53:19

jernst
Member
From: Silicon Valley
Registered: 2014-03-04
Posts: 290
Website

Postfix/sendmail sender address

I'm attempting to use /usr/bin/sendmail from the postfix package to send outgoing e-mail. Here's the manual transcript:

# sendmail me@example.com
From: wordpress@example.net
To: me@example.com
Subject: testing

Testing
.

However, the postfix entries in the journal tell me that the message was really sent from

from=<root@hostname.localdomain>

How can I get sendmail to use the sender I specified in the From: header?

(This is the simplified version of the problem. The actual version of the problem is that outgoing mail from my Wordpress install on EC2 is blacklisted by receivers, because it isn't sent from wordpress@virtualhost (which I route through Amazon SES and thus outside the blacklist) but that it is sent directly. Debugging showed that Wordpress apparently goes through PHP mail() which goes through /usr/bin/sendmail, which in my case comes from postfix.)

Offline

#2 2019-01-15 01:58:56

bugsmanagement
Member
Registered: 2017-04-21
Posts: 201

Re: Postfix/sendmail sender address

Hello there,

You going to have to RTFM on that.

Postfix is using 'MAIL FROM' smtp command.

Regards

EDIT: Instead of using PHP builtin mail() function, surely Wordpress support third party mailers?

Last edited by bugsmanagement (2019-01-15 02:06:27)

Offline

#3 2019-01-15 03:52:21

chr0mag
Member
From: Vancouver, Canada
Registered: 2017-02-02
Posts: 94

Re: Postfix/sendmail sender address

jernst wrote:

How can I get sendmail to use the sender I specified in the From: header?

Check out /etc/postfix/generic . You can use this to map from the system account used to run sendmail (probably the account used to execute php-fpm in your Wordpress case) to something else.

Offline

Board footer

Powered by FluxBB