Sendmail smarthost relay to MX instead of A record
Hi all,
I have some older RH4 nodes that rely on sendmail for delivery. We have now a requirement to use as a smarthost a specific filtering system that has built in redundancy via two MX entries found under a filtering.domain.tld form.
So if I do a dix mx filtering.domain.tld I can see the two nodes responsible for receiving and filtering data.
From my initial testing it seems that putting in the config this routine:
define(SMART_HOST',filtering.domain.tld')
will fail delivery as it tries to do an A record search and this is not matched as it's not provisioned in DNS (we only have MX entries for this domain and A records for the two filtering servers)
Anyone knows if this can be done? The only idea that I have is to put the MX nodes under the SMART_HOST like `server1:server2' but this makes content static and if something will change in the future in regards to MX assignment I will have to reconfigure all the servers again.
PS: because we also have some postfix nodes on newer systems, the relayhost found here behaves like this out of the box: It first searches for MX and if that is not there for A. I'm thus looking for an efficient way to do this on sendmail (only once hopefully).
Thank you,
/MariusG
Responses
Hi Marius,
Sendmail's SMART_HOST clause defines a host which will relay all email, and it is must be pointed as a "A" DNS record and not a MX.
I'm uncertain what is exactly your issue, since on thread title you mention that sendmail relays to MX instead of A, but in the text looks like you want to deliver through a MX instead of A.
Sendmail is very picky and strict on its m4 lingo. From http://www.sendmail.com/sm/open_source/docs/configuration_readme/:
You can define a ``smart host'' that understands a richer address syntax
using:
define(`SMART_HOST', `mailer:hostname')
Notice the backtick and tick syntax; and don't forget to update sendmail.mc file and then generate the sendmail.cf by running # m4 /etc/mail/sendmail.mc>/etc/mail/sendmail.cf and then restarting sendmail.
HTH
- RF
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
