Printable Version of Topic

Click here to view this topic in its original format

Linuxhelp _ Technical Support _ Sendmail, Local Mx Lookup

Posted by: TonyJ Oct 19 2002, 12:52 PM

I'm trying to route in and outgoing mail through sendmail (where mailscanner scans it for viruses and spam)
Incoming mail is then to be delivered to a exchange system, outgoing mail is originating from exchange aswell.

RedHat 8.0 system installed with default sendmail (8.12.5/8.12.5)
All configurations to sendmail done with Webmin 1.020
Sysadmin quite a novice with linux and sendmail

One domain (lets call it "")

Incoming mail delivered to as it has the lowest MX for the has as a "smart host" (I belive its called) and forwards all mail to it. delivers the mail to the recipient. Works fine.

Now for the problem...
I want to send all its mail to for processing. I put as a "smart host" in
This of course creates a loop for all outgoing mails as forwards everything to etc etc.

I set up with the lowest MX for
The firewall denies anyone from outside my network access to it, mail gets forwarded to the higher MX which happens to be processes the mail, looks up the MX (no smart host defined) for and delivers it to (no firewall filter between the two)
Outgoing mail from is, through a "smart host" entry, forced to deliver its mail to who then processes the mail and delivers it.

While setup2 works, it strikes me as a very crude and ugly way.

My ideal solution would look like this: = MX preference = 10 = MX preference = 10
(only these visible in DNS, two machines for redundancy)

Incoming mail gets delivered to sendmail1 or 2, who processes it, looks up somewhere (not DNS) and delivers it to (or if the first is unavailable, you get the idea)

Outgoing mail gets sent from to either sendmail-machine, who processes the mail and delivers it

Is it possible to make sendmail ignore the DNS MX for and enter your "own" MX for this domain?

If there is another, less obvious, solution I'm all for the aswell!

Powered by Invision Power Board (
© Invision Power Services (