LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-02-2015, 03:57 AM   #1
orbegonzo
LQ Newbie
 
Registered: Sep 2015
Location: Spain
Posts: 10

Rep: Reputation: Disabled
Question 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
 
Old 10-02-2015, 03:03 PM   #2
Pearlseattle
Member
 
Registered: Aug 2007
Location: Zurich, Switzerland
Distribution: Gentoo
Posts: 999

Rep: Reputation: 142Reputation: 142
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
 
1 members found this post helpful.
Old 10-04-2015, 01:34 PM   #3
hoes
Member
 
Registered: Sep 2005
Distribution: debian, linux from scratch
Posts: 190

Rep: Reputation: 51
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.
 
2 members found this post helpful.
Old 10-05-2015, 05:09 AM   #4
orbegonzo
LQ Newbie
 
Registered: Sep 2015
Location: Spain
Posts: 10

Original Poster
Rep: Reputation: Disabled
Thanks for the answers.

Quote:
Originally Posted by Pearlseattle View Post
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
 
Old 10-05-2015, 05:27 AM   #5
hoes
Member
 
Registered: Sep 2005
Distribution: debian, linux from scratch
Posts: 190

Rep: Reputation: 51
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.
 
2 members found this post helpful.
Old 10-05-2015, 06:54 AM   #6
orbegonzo
LQ Newbie
 
Registered: Sep 2015
Location: Spain
Posts: 10

Original Poster
Rep: Reputation: Disabled
Smile

Quote:
Originally Posted by hoes View Post
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

Regards,
 
Old 10-05-2015, 09:35 AM   #7
hoes
Member
 
Registered: Sep 2005
Distribution: debian, linux from scratch
Posts: 190

Rep: Reputation: 51
You're welcome and I think you can mark this thread as solved.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Postifix + alpine won't work together (Sender address rejected: Domain not found) alienDog Linux - Server 1 06-14-2013 04:23 AM
[Postfix] 450 Sender address rejected: Domain not found pestka Linux - Server 4 05-17-2013 12:35 AM
[SOLVED] [Postfix] Sender address rejected: Domain not found WojtekO Linux - Networking 5 05-19-2011 10:40 AM
Sendmail doubling sender domain- ex. hostname.domain.net.domain.net halborr Slackware 7 08-23-2010 08:37 AM
Postfix: Sender address rejected when matching $mydestination [GOD]Anck Linux - Software 1 02-16-2005 05:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration