Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have postfix installed(should be default install). I only set the relayhost to be the gateway I need to go through. I then use sendmail as a test but the gateway rejects my message and I see that in my postfix logs. The weird thing is in the logs the from email address is incorrect (probably my fault somehow but that is my question).

I have this file

 to: dean.hiller@yyyy.com
 from: dean.hiller@yyyy.com
 subject: hi there
 This is my body of the message

I then run sendmail with

 sendmail -t < email2

The postfix error is

Jan 3 13:38:07 sdi-ci postfix/qmgr[1157]: 41B6BBF88C: from=, size=297, nrcpt=1 (queue active) Jan 3 13:38:07 sdi-ci postfix/smtp[26034]: 41B6BBF88C: to=, relay=mailgate1.nrel.gov[192.666.555.555]:25, delay=590, delays=590/0.08/0.11/0.23, dsn=4.1.8, status=deferred (host mailgate1.nrel.gov[192.666.555.555] said: 450 4.1.8 : Sender address rejected: Domain not found (in reply to RCPT TO command))

EDIT: obviously yyyy.com is not my real domain and that is not my real ip. That is never a good idea to post so I always modify it. I fixed it by config in my below answer.

share|improve this question
    
192.666.555.555 ? –  Mathias R. Jessen Jan 3 '13 at 20:45
    
@MathiasR.Jessen notfake.com/not_at_all.jpg –  Sammitch Jan 3 '13 at 23:48
    
edited the post for those were it was not obvious that yyyy.com and the ip are both fake. –  Dean Hiller Jan 4 '13 at 13:49

2 Answers 2

in /etc/postfix/main.cf, modifying mydomain and myorigin fixed the issue and setting mydomain to yyyy.com and myorigin to $mydomain fixed the issue.

mydomain = yyyy.com
myorigin = $mydomain

Dean

share|improve this answer

Did you literally use yyyy.com as a sender domain? Your postfix is rejecting the message, because the domain of the sender cannot be resolved, which can be read in this log bit:

Sender address rejected: Domain not found (in reply to RCPT TO command)

Other than that, did you alter the output of the log, because the resolved IP address of mailgate1.nrel.gov (192.666.555.555) is an invalid IPv4 address. IPv4 adresses can go no further than 255 per octet. So 666 and 555 are impossible values. It should resolve to 192.174.58.21.

Those two things combined give a strong suspicion that your nameserver configuration is faulty. Make sure your /etc/resolv.conf file lists accessible nameservers to be used for domain name resolution.

share|improve this answer
    
all of those where fake as it is never a good practice to put your real ips and domain names out there. –  Dean Hiller Jan 4 '13 at 13:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.