LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Sender address rejected: Domain not found after changing hostname (https://www.linuxquestions.org/questions/linux-networking-3/sender-address-rejected-domain-not-found-after-changing-hostname-4175555074/)

orbegonzo 10-02-2015 03:57 AM

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.

Is there any other file that I have to edit?

Best Regards

Pearlseattle 10-02-2015 03:03 PM

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

hoes 10-04-2015 01:34 PM

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.

orbegonzo 10-05-2015 05:09 AM

Thanks for the answers.

Quote:

Originally Posted by Pearlseattle (Post 5429003)
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?

Regards

hoes 10-05-2015 05:27 AM

It seems like you relay to another SMTP server, I do the same.

I think this link basically describes the steps that I used:
http://semi-legitimate.com/blog/item...ess-in-postfix

You just let postfix give your outgoing mail a different address that is recognized by other SMTP servers.

orbegonzo 10-05-2015 06:54 AM

Quote:

Originally Posted by hoes (Post 5430042)
It seems like you relay to another SMTP server, I do the same.

I think this link basically describes the steps that I used:
http://semi-legitimate.com/blog/item...ess-in-postfix

You just let postfix give your outgoing mail a different address that is recognized by other SMTP servers.

Thank you so much! That was exactly what I was looking for. I just followed the instructions, and it started to work again.

Thanks again :D

Regards,

hoes 10-05-2015 09:35 AM

You're welcome and I think you can mark this thread as solved.


All times are GMT -5. The time now is 09:12 PM.