I manage a hosting for a domain (let's say sendingdomain.com). The machine is not attached to a public domain (as it hosts more domains), and hostname is albergues02.resolve.com. Sendingdomain.com is a Wordpress application
It has Postfix installed, to allow local applications to send emails. It doens't have the MX records associated. I know this could be a problem, but the client doesn't matter by the moment as he only throws emails to a reduced group and it's been working (we've just migrated the hosting to another machine in another IP) till now. I've tried to avoid rewriting but
The facts are:
A PHP mail() command changes FROM to [email protected]:
Jul 9 13:51:02 albergues02 sendmail[919]: q69Bp2F1000919: from=apache, size=148, class=0, nrcpts=1, msgid=<[email protected]>, relay=apache@localhost
Jul 9 13:51:02 albergues02 postfix/smtpd[921]: connect from localhost[127.0.0.1]
Jul 9 13:51:02 albergues02 postfix/smtpd[921]: D7B0960E77: client=localhost[127.0.0.1]
Jul 9 13:51:02 albergues02 postfix/cleanup[924]: D7B0960E77: message-id=<[email protected]>
Jul 9 13:51:02 albergues02 postfix/qmgr[787]: D7B0960E77: from=<[email protected]>, size=607, nrcpt=1 (queue active)
Jul 9 13:51:02 albergues02 sendmail[919]: q69Bp2F1000919: [email protected], ctladdr=apache (48/48), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30148, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Ok: queued as D7B0960E77)
Jul 9 13:51:02 albergues02 postfix/smtpd[921]: disconnect from localhost[127.0.0.1]
If I "Remember my password" from login page, mail gets OK (FROM keeps being [email protected]):
Jul 9 13:55:23 albergues02 postfix/smtpd[938]: connect from localhost[::1]
Jul 9 13:55:23 albergues02 postfix/smtpd[938]: 51BB260E79: client=localhost[::1]
Jul 9 13:55:23 albergues02 postfix/cleanup[942]: 51BB260E79: message-id=<[email protected]>
Jul 9 13:55:23 albergues02 postfix/qmgr[787]: 51BB260E79: from=<[email protected]>, size=968, nrcpt=1 (queue active)
Jul 9 13:55:23 albergues02 postfix/smtpd[938]: disconnect from localhost[::1]
Jul 9 13:55:23 albergues02 postfix/smtp[943]: 51BB260E79: to=<[email protected]>, relay=vmail.mycompany.es[217.xxx.xx.xx]:25, delay=0.19, delays=0.05/0.02/0/0.11, dsn=2.0.0, status=sent (250 ok: Message 39109407 accepted)
Jul 9 13:55:23 albergues02 postfix/qmgr[787]: 51BB260E79: removed
The wordpress has a Newsletter sending plugin that doesn't work, neither.
Postconf -n shows:
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
anvil_rate_time_unit = 1s
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = all
inet_protocols = all
local_header_rewrite_clients =
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
masquerade_domains = !domain.com !domain2.com # All domains that appear in the @domain of the emails sent
mydestination = $myhostname, localhost.$mydomain, localhost
mydomain = resolve.com
myhostname = albergues02.resolve.com
mynetworks_style = host
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
remote_header_rewrite_domain =
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_client_connection_count_limit = 30
smtpd_client_connection_rate_limit = 100
smtpd_client_message_rate_limit = 100
smtpd_client_recipient_rate_limit = 100
smtpd_client_restrictions = permit
smtpd_error_sleep_time = 1s
smtpd_hard_error_limit = 20
smtpd_soft_error_limit = 10
unknown_local_recipient_reject_code = 550
Sendmail is installed on the machine but service is stopped.
I don't know what else to change/look/configure. The goal is to make postfix to relay all mails that come from localhost without rewriting the FROM address.
sendmail[919]:
lines in the first logfile. Are you running Sendmail and Postfix on the same box? If so, the Sendmail config might be helpful too.