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 user@ourdomain.com 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 linode.com. 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 = caaschool.org, li457-219.members.linode.com, localhost.members.linode.com, localhost
myhostname = li457-219.members.linode.com
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 334006397.mail.outlook.com for the hostname. I have never had anything to do with the mail for this domain.

  • 1
    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

Is the domain in question caaschool.org ? 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.

  • 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
  • 1
    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

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.