Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We are using Debian and postfix to send mail for our CMS. Our website and email use the same domain but our email is hosted elsewhere. So, sadly when our server tries to send some mail (from some contact us forms) to it gets rejected because it doesn't realize that it should send the mail to the correct server based on the MX records.

We are using Should I update the MX records there? Or should I be doing something in the postfix configuration to let it know about the mail server?


alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
inet_interfaces = all
mailbox_size_limit = 0
mydestination =,,, localhost
myhostname =
mynetworks = [::ffff:]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost = 
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes

Doing an MX record lookup it shows for the hostname. I have never had anything to do with the mail for this domain.

share|improve this question
it would be helpful if you provided the relevant postfix logs. Postfix configuration (obtained with postconf) might also be helpul – mateusz.kijowski Jan 31 '13 at 18:18
I can't imagine the default configuration sending the mail to anywhere BUT the MX record. Are the MX records valid (the response is an A record and not a CNAME record?) – DerfK Jan 31 '13 at 18:39
Wow, the postconf is huge. You sure there are not some relevant lines I can post? – Zed Said Jan 31 '13 at 18:39
postconf -n shows only the things you changed – Gryphius Jan 31 '13 at 18:39
The MX records are no configured on our server at all. – Zed Said Jan 31 '13 at 18:39
up vote 2 down vote accepted

Is the domain in question ? In that case: Your domain is listed in mydestination, so postfix considers it a local domain and does not send to the mx records. Remove the domain from mydestination.

share|improve this answer
Yes it is. So will it do an MX record lookup somehow? I have not configured any MX records in linode for this domain. – Zed Said Jan 31 '13 at 18:43
yes it should. your mx records are configured at worldnic, you don't need to configure them on linode. – Gryphius Jan 31 '13 at 18:44
Thanks! Really appreciate it! – Zed Said Jan 31 '13 at 19:14

Your Answer


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.