Mail realying using DNS !

Simon Waters Simon at wretched.demon.co.uk
Fri Aug 30 12:19:11 UTC 2002


Veeraraju_Mareddi wrote:
> 
> I have one Internal mail server, which is configure to deliver mail based on
> DNS lookup. In Internal DNS serverI wanna add MX records for all internet
> domains to a mailgateway so that all SMTP mails go to
> mailgateway.mydomain.com. Mailgateway will deliver mails to actual outside
> world. This is one type of relaying.
> 
> How can I do this ? Is there any method we can add MX records ,which will be
> answered each time when MX is queried for any domain.

If(!), and only if, you have private DNS root servers (i.e.
example.com doesn't exist), you can direct mail to example.com
(and everywhere else external) by placing a wild card MX record
in the root zone.

* IN MX 5 mailgateway.mydomain.com.

If you only have one internal mail server this is overkill, and
it is far better handled by reading your MTA documentation and
telling you MTA what to do with external mail.

If you don't have private root servers you'll have to use your
MTA software to do the same thing.


More information about the bind-users mailing list