Vps – Reverse DNS and mail delivery (550 4.4.7)

domain-name-systememailreverse-dnsvps

I'm trying to fix a problem with mailing in a VPS.

This VPS has only one public IP address and 5 domains hosted. The DNS (Bind) have the 5 different zones configured, every zone has an mx entry to mail.domainX.com and a A entry with mail.domainX.com referencing to the VPS IP public address.

The problem with the email appear when users from one of the domains try to send mails to people who have @microsofot.com e-mail address. About 20% of e-mails sent to that addresses are rejected with this error:

Diagnostic information for administrators:

Generating server:  <http://bigfish.com> bigfish.com

adress@domainX.com
#550 4.4.7 QUEUE.Expired; message expired ##

Investigating about this code error i read that is produced because reverse dns of the public IP don't resolve the name mail.domainX.com. Really it resolves this:

vpsname.myISP.com.333.222.111.in-addr.arpa.

I think in two possibles solutions for this:

1- Create a new zone in the VPS called 333.222.111.in-addr.arpa. and then add an PTR entry for every domain hosted in the VPS with the public IP, for example: mail.domainX.com. Note: I know this is not recommended and would bring me troubles in the future.

2- Change the MX entry in every zone and point it to vpsname.myISP.com. This would make that DNS and reverse DNS match. Note: I don't know if this is possible or will work without problems.

Which option would be better to fix this issue? Is there a better option?

Thanks.


Important note: I'm trying to fix this problem by myself because when i ask for help to my ISP they doesn't know how to fix this(!). Obviously i will will change my ISP in the future by i need to resolve this ASAP.

Best Answer

Option 1 won't work. Option 2 wont' work until the PTR record is corrected as noted by @Lazy Badger.

Follow these steps:

  • pick one domain for the MX and get the PTR record set to point to the domain name you are using as the MX (mail.example.com.) You could use vpsname.myISP.com as your MX if you get them to fix the PTR record, and there is an A record for vpsname.myISP.com pointing to that IP.
  • Configure EXIM to identify itself as the name you chose for your MX.
  • Point all the domains to use the chosen MX and configure EXIM to treat these domains as local.
  • Optionally, configure virtual domains in EXIM for some or all of the domains.
  • Ensure the postmaster address works for all your domains.
Related Topic