ROM
ReadOnlyMaio
  • Links
  • Linux Quick Command Reference
  • MaxDB Quick Command Reference
  • MSSQL Quick Command Reference
  • Oracle Quick Command Reference
  • Powershell Quick Command Reference
  • Private – Piteco
  • Private Download
  • Windows CMD quick command reference

Tag: hosts

Force Postfix to search mx records in /etc/hosts file

Posted on January 16, 2018 by MaioLeave a comment on Force Postfix to search mx records in /etc/hosts file

Edit your /etc/hosts file and insert a new line like:

X.X.X.X    example.com

Where X.X.X.X is the IP address for the MX record of the example.com domain.

Edit the /etc/postfix/main.cf file and set the parameter:

disable_dns_lookups = yes

Restart the postix deamin with:

./etc/init.d/postfix restart

Your Postfix will now rely on the /etc/hosts file instead of the DNS servers. The hostname resolution is demanded to the local /etc/hosts files and, even if the hosts file can’t manage MX records, the resolution of the MX record will fallback to the A record as per RFC design.

More infos here: https://en.wikipedia.org/wiki/MX_record#History_of_fallback_to_address_record

Posted in LinuxTagged dns, etc, hosts, LINUX, postfix

Categories

  • Linux
  • MSSQL
  • Nerd Stuff
  • Oracle
  • Powershell
  • SAP
  • Sybase
  • Windows
Proudly powered by WordPress
Simple White lite RGB Classic