[SOLVED] Sender address rejected: Domain not found after changing hostname
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Sender address rejected: Domain not found after changing hostname
Hello,
Here is the deal: I needed to receive email notifications in response to certain events from my CentOS machine. I wanted to make it simple, so I decided to simply use the default mail command, and everything worked right. However, recently I changed the hostname and domain of the PC: instead of localhost.localdomain, I now use pc1.mycompany; since then, mail command doesn't work.
In the mail log I constantly receive the message "Sender address rejected: Domain not found (in reply to RCPT TO command)".
I suppose that the cause of the problem is that I have to update the hostname in some file. I have tried editing /etc/main.cf, changing this value: myhostname = pc1.mycompany, but I'm still getting the same error message.
Hi
My first guess is that your email server is not configured to act as a relay/proxy for non-hosted domains (which is correct).
What's generating the error message? Your email client (is "mail" just a wrapper around some other executable or is it really an executable?) or the email server (are you connecting to some SMTP server?)?
Cheers
The domain that your using, does it exist?
I also configured a server to sent me e-mail without having a domain.
Under postfix I used a config file named generic to map e-mail form a localaddress to my own gmail address.
That way I could fool the SMTP of my provider to send the e-mail.
Hi
My first guess is that your email server is not configured to act as a relay/proxy for non-hosted domains (which is correct).
What's generating the error message? Your email client (is "mail" just a wrapper around some other executable or is it really an executable?) or the email server (are you connecting to some SMTP server?)?
Cheers
This the complete log trace (I have changed some info because of a matter of privacy). I just use the default mail command, with no extra configurations:
Code:
Oct 2 10:49:00 localhost postfix/postfix-script[4824]: stopping the Postfix mail system
Oct 2 10:49:00 localhost postfix/master[4769]: terminating on signal 15
Oct 2 10:49:00 localhost postfix/postfix-script[4896]: starting the Postfix mail system
Oct 2 10:49:00 localhost postfix/master[4897]: daemon started -- version 2.6.6, configuration /etc/postfix
Oct 2 10:49:04 localhost postfix/pickup[4899]: 34699146CF2: uid=0 from=<root>
Oct 2 10:49:04 localhost postfix/cleanup[4905]: 34699146CF2: message-id=<20151023234904.346923246CF2@pc1.mycompany>
Oct 2 10:49:04 localhost postfix/qmgr[4900]: 34699146CF2: from=<root@pc1.mycompany>, size=449, nrcpt=1 (queue active)
Oct 2 10:49:04 localhost postfix/smtp[4907]: 34699146CF2: to=<example@example.com>, relay=exmaple.net[217.76.128.139]:25, delay=0.45, delays=0.09/0.01/0.23/0.13, dsn=5.1.8, status=bounced (host example.net[200.22.122.139] said: 550 5.1.8 <root@pc1.mycompany>: Sender address rejected: Domain not found (in reply to RCPT TO command))
Oct 2 10:49:04 localhost postfix/cleanup[4905]: A5EF4146CF3: message-id=<201514232384904.A5E232346CF3@pc1.mycompany>
Oct 2 10:49:04 localhost postfix/bounce[4908]: 34699146CF2: sender non-delivery notification: A5EF4146CF3
Oct 2 10:49:04 localhost postfix/qmgr[4900]: A5EF4146CF3: from=<>, size=2436, nrcpt=1 (queue active)
Oct 2 10:49:04 localhost postfix/qmgr[4900]: 34699146CF2: removed
Quote:
Originally Posted by hoes
The domain that your using, does it exist?
I also configured a server to sent me e-mail without having a domain.
Under postfix I used a config file named generic to map e-mail form a localaddress to my own gmail address.
That way I could fool the SMTP of my provider to send the e-mail.
No, I don't have any domain, I just changed the name of the host in the network file. Could you please explain what you did a little further?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.