allow_mx_to_ip in exim configuration?

Discuss our MailScanner install script and MailScanner itself
Post Reply
TheTechGuide
Junior Member
Posts: 11
Joined: 16 Feb 2009, 07:44

allow_mx_to_ip in exim configuration?

Post by TheTechGuide »

Hi, we have a domain that we send email to often that has an IP address for an MX record. Wrong, I know but nevertheless, since I moved a new customer over to our servers they can't email to this domain any longer. I have added allow_mx_to_ip = yes (or true, have tried both), but I still get the below. It seems there is something else I need to change in mailscanner also for this to work? Thanks for the help!

Code: Select all

# exim -d -bt blahblahblah@metalinfissi.org
Exim version 4.77 uid=0 gid=0 pid=16104 D=fbb95cfd
Berkeley DB: Sleepycat Software: Berkeley DB 4.3.29: (July 12, 2010)
Support for: crypteq iconv() IPv6 PAM Perl OpenSSL Content_Scanning DKIM Old_Demime Experimental_SPF Experimental_SRS
Lookups (built-in): lsearch wildlsearch nwildlsearch iplsearch dbm dbmnz passwd
Authenticators: cram_md5 dovecot plaintext spa
Routers: accept dnslookup ipliteral manualroute queryprogram redirect
Transports: appendfile/maildir autoreply pipe smtp
Size of off_t: 8
Compiler: GCC [4.1.2 20080704 (Red Hat 4.1.2-50)]
Library version: OpenSSL: Compile: OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
                          Runtime: OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
Library version: PCRE: Compile: 8.12
                       Runtime: 8.12 2011-01-15
Total 8 lookups
WHITELIST_D_MACROS unset
TRUSTED_CONFIG_LIST: "/etc/exim_trusted_configs"
changed uid/gid: forcing real = effective
  uid=0 gid=0 pid=16104
  auxiliary group list: <none>
seeking password data for user "root": cache not available
getpwnam() succeeded uid=0 gid=0
configuration file is /etc/exim.conf
log selectors = 00001dfc 00293043
trusted user
admin user
seeking password data for user "mailnull": cache not available
getpwnam() succeeded uid=47 gid=47
seeking password data for user "mailman": cache not available
getpwnam() succeeded uid=32001 gid=32001
seeking password data for user "mailman": using cached result
getpwnam() succeeded uid=32001 gid=32001
originator: uid=0 gid=0 login=root name=root
sender address = {blocked out}
Address testing: uid=0 gid=12 euid=0 egid=12
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Testing blahblahblah@metalinfissi.org
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Considering blahblahblah@metalinfissi.org
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
routing blahblahblah@metalinfissi.org
--------> defer_router router <--------
local_part=fabrizio.bolognesi domain=metalinfissi.org
calling defer_router router
rda_interpret (string): :defer: All deliveries are handled by MailScanner
expanded: :defer: All deliveries are handled by MailScanner
file is not a filter file
parse_forward_list: :defer: All deliveries are handled by MailScanner
extract item: :defer: All deliveries are handled by MailScanner
defer_router router: defer for blahblahblah@metalinfissi.org
  message: All deliveries are handled by MailScanner
blahblahblah@metalinfissi.org cannot be resolved at this time: All deliveries are handled by MailScanner
Last edited by TheTechGuide on 19 Oct 2012, 18:46, edited 1 time in total.
TheTechGuide
Junior Member
Posts: 11
Joined: 16 Feb 2009, 07:44

Re: allow_mx_to_ip in exim configuration?

Post by TheTechGuide »

For future reference regarding sending email to a mail server that incorrectly have their MX record listed as an IP address rather than a fully qualified domain name, the solution is to add "allow_mx_to_ip" in the options section of your exim.conf, exim_outgoing.com and exim.local.conf (or whatever exim configuration files your specific installation is using). When I edited exim.conf directly, the WHM Exim Advanced Configuration editor did not like where I placed the line, so it wasn't processing it. Once I added it through WHM, email started being delivered to this domain with the IP address as their MX record.

To troubleshoot this, you actually have to DISABLE mailscanner so you can run an exim trace and see all the router results. With Mailscanner on, an exim trace doesn't show you useful results. So disable mailscanner and then from shell run
exim -d -bt {insert email address here}

In the router results you will see this failure:
--------> lookuphost router <--------
local_part=xxxxx domain=xxxxxxx.org
checking domains
cached no match for +local_domains
cached lookup data = NULL
xxxxxxx.org in "! +local_domains"? yes (end of list)
calling lookuphost router
lookuphost router called for xxxxxxx.org
domain = xxxxxxx.org
DNS lookup of xxxxxxx.org (MX) succeeded
fully qualified name = xxxxxxx.org
host_find_bydns yield = HOST_FIND_FAILED (0); returned hosts:
xxx.xxx.xxx.xx <null> MX=10 *
lookuphost router declined for xxxxx@xxxxxxx.org

Adding allow_mx_to_ip = true in your exim configuration files allows the lookuphost router to complete the lookup when the MX record is an IP address and deliver email.

Remember to ENABLE mailscanner again after your testing is complete.
Post Reply