Koozali.org: home of the SME Server

Delegating a domain's outgoing email to an external server

Offline pwalter

  • *
  • 38
  • +0/-0
Delegating a domain's outgoing email to an external server
« on: October 14, 2008, 07:22:07 PM »
SME 7.x has the capability to delegate email handling to a different server on the internal network by specifying the ip address of the delegate mail server. I have come across two situations where I would like to delegate the email handling to an EXTERNAL server by specifying the DOMAIN name. This situation is because the external DNS MX records specify that mail for domain.com should go to a different address than the ip address that is handling the web site, as in the following example:

http traffic should go to mydomain.com
smtp traffic for mydomain.com should be redirected to mail.mydomain.com (a different server)

This is being done at the external DNS level and works fine for mails originating from external sources. However, mail generated on the machine hosted on the web site gets delivered locally instead, and the only way I have found to get it delivered to the proper server is to forward it to a third (external) server, which then forwards it again to the proper server. This kluge is unreliable. Does anyone have any suggestions on how SME can be configured to do what I want it to do?

Peter

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Delegating a domain's outgoing email to an external server
« Reply #1 on: October 14, 2008, 07:44:11 PM »
SME 7.x has the capability to delegate email handling to a different server on the internal network by specifying the ip address of the delegate mail server. I have come across two situations where I would like to delegate the email handling to an EXTERNAL server by specifying the DOMAIN name.
It is also capable of having all mail forwarded by your providers server and have that provider take care of message delivery. Look at the email panel under the email delivery setting, perhaps that might be off use.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline pwalter

  • *
  • 38
  • +0/-0
Re: Delegating a domain's outgoing email to an external server
« Reply #2 on: October 14, 2008, 08:01:07 PM »
It is also capable of having all mail forwarded by your providers server and have that provider take care of message delivery. Look at the email panel under the email delivery setting, perhaps that might be off use.

Cactus, thanks, but I don't think it would help. As I understand the problem, qmail running on the server intercepts all outgoing mail; it then checks to see if the mail for the addressee can be delivered locally by comparing the destination domain to the list of domains managed by the server; if there is a match, it never checks the external DNS to resolve the name of the mail server. This would be fine in most cases, except in my case the external DNS specifies a different mail server. What I am looking for is something like the following:
- remove the mail.domain.com alias from the domain.com server hostnames
- somehow get qmail to look up the external MX for mail.domain.com, and send the mail to that server

I have tried removing the mail hostname, but, no matter what else I do, qmail STILL appears to resolve mail.domain.com locally, and I have not yet found a way to get it to query the external DNS.

Offline pwalter

  • *
  • 38
  • +0/-0
Re: Delegating a domain's outgoing email to an external server
« Reply #3 on: October 15, 2008, 12:56:11 AM »
Well, I think I have found the answer.

http://www.dungog.net/wiki/Dungog-domains