Root sends email with incorrect domain

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

Root sends email with incorrect domain

Post 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
User avatar
shawniverson
Posts: 3644
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: Root sends email with incorrect domain

Post 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
Stuart
Posts: 12
Joined: 28 Apr 2016 00:56

Re: Root sends email with incorrect domain

Post by Stuart »

That helped. Thank you very much!
Post Reply