Root sends email with incorrect domain

Questions and answers about how to do stuff
Post Reply
Stuart
Posts: 9
Joined: 28 Apr 2016 00:56

Root sends email with incorrect domain

Post by Stuart » 03 Mar 2020 01:57

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

User avatar
shawniverson
Posts: 3029
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: Root sends email with incorrect domain

Post by shawniverson » 06 Mar 2020 19:57

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
Version eFa 4.0.2 now available!

Stuart
Posts: 9
Joined: 28 Apr 2016 00:56

Re: Root sends email with incorrect domain

Post by Stuart » 11 Mar 2020 03:40

That helped. Thank you very much!

Post Reply