-1

I want to know where i can configure the following.

I want postfix to lookup the host: myexample.com, but instead it is looking up Host-Wordpress-01. Which is my digitalocean droplets name.

How/where can i change this? I did a grep on all files in postfix and there is nothing that contains "Host-Wordpress-01". So it should be somewhere else.

Beneath is an extraction of the syserror.log

Feb 13 15:25:17 Host-Wordpress-01 postfix/pickup[29410]: 3A8D6609C0: uid=0 from=<root@Host-Wordpress-01>
Feb 13 15:25:17 Host-Wordpress-01 postfix/cleanup[29422]: 3A8D6609C0: message-id=<20150213202517.3A8D6609C0@moederpupegaele.be>
Feb 13 15:25:17 Host-Wordpress-01 postfix/qmgr[29411]: 3A8D6609C0: from=<root@Host-Wordpress-01>, size=356, nrcpt=1 (queue active)
Feb 13 15:25:17 Host-Wordpress-01 postfix/smtp[29424]: 3A8D6609C0: to=<root@Host-Wordpress-01>, relay=none, delay=0.03, delays=0.02/0.01/0.01/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=Host-Wordpress-01 type=A: Host not found)
Feb 13 15:25:17 Host-Wordpress-01 postfix/cleanup[29422]: 4247F61E26: message-id=<20150213202517.4247F61E26@moederpupegaele.be>
Feb 13 15:25:17 Host-Wordpress-01 postfix/qmgr[29411]: 4247F61E26: from=<>, size=2279, nrcpt=1 (queue active)
Feb 13 15:25:17 Host-Wordpress-01 postfix/bounce[29425]: 3A8D6609C0: sender non-delivery notification: 4247F61E26
Feb 13 15:25:17 Host-Wordpress-01 postfix/qmgr[29411]: 3A8D6609C0: removed
Feb 13 15:25:17 Host-Wordpress-01 postfix/smtp[29424]: 4247F61E26: to=<root@Host-Wordpress-01>, relay=none, delay=0.01, delays=0/0/0.01/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=Host-Wordpress-01 type=A: Host not found)
Feb 13 15:25:17 Host-Wordpress-01 postfix/qmgr[29411]: 4247F61E26: removed

I have

  • setup 3 MX records for example.com referring to mail.myexample.com (priority 10,20,30)
  • setup a A record for mail.myexample.com referring to the correct ip
  • checked them using dig mx myexample.com and dig a mail.myexample.com
  • changed the inet_protocols setting from postfix, so it uses ip4 instead of ip6
3
  • I think that is your server hostname, you can check $myhostname variable in your postfix main.cf or in /etc/mailname or something else
    – c4f4t0r
    Feb 13, 2015 at 21:04
  • What is hostname -f and whats in /etc/mailname?
    – sebix
    Feb 13, 2015 at 21:04
  • My DO droplets name is the same as my hostname :)
    – NicoJuicy
    Feb 16, 2015 at 8:46

1 Answer 1

1

That's the effect of multiples configuration in postfix: myhostname, myorigin and append_at_myorigin.

When you send email with mail command/sendmail, the sender doesn't have domain parts. Because of parameter append_at_myorigin=yes, postfix append $myorigin parameter in sender name. By default value of myorigin equal with $myhostname. And value of myhostname was the hostname of your server.

Reference: http://www.postfix.org/postconf.5.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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