Page 1 of 1

Root sends email with incorrect domain

Posted: 03 Mar 2020 01:57
by Stuart
Hi,

When root sends an email it fails because it adds the host name to the Domain, as below;

Code: Select all

----Queue ID----- --Size-- ---Arrival Time---- --Sender/Recipient------
48WfQk25YvzB6xjb      8523 Tue Mar  3 11:22:04 root@hostname.domain.com
(host mail.targetdomain.com[1.1.1.1] said: 450 4.1.8 : Sender address rejected: Domain not found (in reply to RCPT TO command))
                                               user@targetdomain.com
Obviously the email address should be root@domain.com.

I can not seem to find where I can change this. Can any one help?

Thanks
Stuart

Re: Root sends email with incorrect domain

Posted: 06 Mar 2020 19:57
by shawniverson
Do you have the following file?

/etc/postfix/sender_canonical

Code: Select all

root@example.org root@hostname.example.org
/etc/postfix/sender_canonical.db

/etc/postfix/main.cf

Code: Select all

sender_canonical_maps = hash:/etc/postfix/sender_canonical

Re: Root sends email with incorrect domain

Posted: 11 Mar 2020 03:40
by Stuart
That helped. Thank you very much!