tag:blogger.com,1999:blog-6057799.post-60446585551694434772008-06-23T12:28:00.003-05:002008-06-23T12:44:41.444-05:00Exim is a bit nutsI'm using <a href="http://www.nagios.org/">Nagios</a> to monitor servers, but was having some trouble getting emails to exit the Ubuntu JeOS server that I had set up to run it under VMware. (Most of my stuff is Windows, and Nagios is a linux program). It turns out that a program called <a href="http://www.exim.org/">exim</a> is used to send emails, and it's a bit crazy.<br /><br />All attempts to send email to myself resulted in replies which contained the error:<br /><blockquote></blockquote><blockquote>all relevant MX records point to non-existent hosts</blockquote>Thanks to <a href="http://wiki.debian.org/PkgExim4UserFAQ#head-c07978cdc8abc5ab0fffd980a23f87c8b34dc983">this entry</a> on the PkgExim4UserFAQ, I was able to get a clue<br /><br /><blockquote>A probable cause for this might be that all MX records for the offending domain point to site local or link local IP addresses, which are ignored by the dnslookup router to protect from misconfigured external domains. The default configuration has relaxed checking for domains that the local system is configured to allow relaying to, so adding the offending domain to dc_relay_domains will most probably help. Please note that this entry might be necessary anyway to bypass relay control for the domains in question.<br /><p class="line874">Please note that no domain on the public Internet should have MX records pointing to site local or link local IP addresses, so you might check your externally visible MX records. <span class="anchor" id="line-217"></span><span class="anchor" id="line-218"></span></p><p class="line862">If this doesn't help, try analyzing the output of <tt>exim -d -bt some.local.part@the.offending.domain.example</tt> <span class="anchor" id="line-219"></span><span class="anchor" id="line-220"></span></p></blockquote>Well, I did the requisite test, to find this among the output<br /><br /><blockquote>ignored host mail.<span style="font-style: italic;">xxxx</span>.com [10.0.0.<span style="font-style: italic;">x</span>]<br /></blockquote><br />Ignored host?? Clearly not the same as one that is non-existent. So... the first error was a <span style="font-weight: bold;">lie<span style="font-style: italic;">.<br /><br /></span></span>All the relevant records pointed <span style="font-weight: bold;">correctly</span> to a very much alive and well host, but exim chose to ignore it because it was local.<br /><br />In order to get around this, you have to follow the <a href="http://lists.alioth.debian.org/pipermail/pkg-exim4-users/2005-May/000087.html">suggestion</a> of Marc Haber and tell it that it is going to relay email for your local domain (which sounds like a very bad idea) in order to get it to work.<br /><br />I don't know why they did it this way, but I'm posting this here to help others figure it out.Mike Warothttp://www.blogger.com/profile/12975818268596648269noreply@blogger.com