postfix trying to send to itself

Issues related to software problems.
Post Reply
outerlimits
Posts: 1
Joined: 2014/07/09 21:58:32

postfix trying to send to itself

Post by outerlimits » 2014/07/09 22:08:26

I'm running a centos 5.6 version with postfix.

the server always sent to email addresses with a domain name other than it's own so when we created some email address (with the domain name of the server) on godaddy and we tried to start sending email there the server is getting confused and trying to send to itself.

let's assume the server name is abc.com

my hosts file has this entry : nnn.nnn.nnn.nnn www.abc.com abc.com abc

in addition to the standard stuff:
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6


when the php app that runs on the server tries to send an email I get this in the maillog file:

Jul 9 11:01:57 abc postfix/qmgr[2458]: 415B8858107: to=<john@www.abc.com>, relay=none, delay=193595, delays=193595/0.01/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to www.abc.com[77.36.241.210]: Connection refused)
Jul 9 11:01:57 abc postfix/qmgr[2458]: EF935858077: from=<>, size=9211, nrcpt=1 (queue active)

if I run nslookup and set the querytype to MX - it does come back with the names of the mail servers at godaddy but there's something going in the server that makes it think it should be connecting to itself.

any help would be appreciated.

thanks

wintpe
Posts: 17
Joined: 2014/08/26 08:56:59

Re: postfix trying to send to itself

Post by wintpe » 2014/08/27 13:36:59

you need to setup postfix via /etc/postfix/main.cf

things like

inet_interfaces = all

myorigin = example.com

relayhost = smtp.example.com

mydestination = localhost, $myhostname, $mydomain, example.com

local_transport = local:$myhostname

mynetworks = 127.0.0.0/8

thats the config for a inbound mail server

regards peter
Redhat 6 Certified Engineer

Post Reply