OpenWrt Forum Archive

Topic: how to configure dnsmasq to use external mail server for local domain?

The content of this topic has been archived on 18 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi Guys,

I know this is most likely a dnsmasq question, but since I am using kamikaze 7.06 on wrt54gl, I thought I ask here.  I have configured my local network to be say 'mydomain.com'.  The public dns for mydomain.com points to my wan ip address.  I have also configured the domain name mydomain.com to use a third party mail server.  If I send an email to user@mydomain.com from any outside server, it all works correctly.  However, if I try to send it from inside my local lan, I get a "User Unknown" bounce back.  It looks like its using my gateway (wrt54gl)  as my mail server.  The question is, is there a way in dnsmasq or anywhere for that matter, where I can specify that my mail server is somemailserver.com so all emails from root go to my external mail server rather than my gateway?

If I was not clear on my issue/question, please let me know.

Thanks,

William

Well, I found the answer.  On dnsmasq.conf I just need to use the 'mx-host=' option.

Thanks.

The discussion might have continued from here.