Koozali.org: home of the SME Server
Obsolete Releases => SME Server 8.x => Topic started by: pcdoc on August 15, 2013, 05:13:36 PM
-
I have a situation where I have multiple domains on the main gateway server for our network, and I need a second server only mail server inside on the local network for a different domain.
I have setup proxypass and that works well to get web pages etc. I can send mail out from the internal server to the outside world, but when I send email in, they get redirected at the primary server to the primary domain name.
IE, local network mail server is mail.localnet.net.au, gateway domain is mail.gateway.net.au. Mail coming in for info@localnet.net.au does not get past the mail.gateway.net.au.
/var/log/qmail/current shows mail comes in and starts delivery to local alias-localdelivery-info@localnet.net.au, then a couple of lines further shows starting delivery to local info@mail.gateway.net.au
I had a look at httpd.conf and it shows virtual domain 0.0.0.0:443 as being correct to redirect to the internal IP.
I have very little hair left now as most of it has been pulled out. I have been googling and hunting through forums for too many hours.
Please help if you have done this before, or even if you can point me in the correct direction.
Thank you.
-
hi,
here's an example for a couple of domains:
mkdir -p /etc/e-smith/templates-custom/var/qmail/control/smtproutes
echo "adomain.com:smtp.aserver.com" > /etc/e-smith/templates-custom/var/qmail/control/smtproutes/10routes
echo "anotherdomain.com:192.168.20.3" >> /etc/e-smith/templates-custom/var/qmail/control/smtproutes/10routes
signal-event email-update
in this example, messages for domain adomain.com are relayed to external smtp.aserver.com, and messages for domain anotherdomain.com are relayed to internal server 192.168.20.3
HTH
-
There's no need for a custom template for that. Just do:
db domains setprop adomain.com MailServer smtp.aserver.com
db domains setprop anotherdomain.com MailServer 192.168.20.3
signal-event email-update
-
Thanks Charlie, yours seems to have done the trick. I hunted through the forums and wiki and could not find that info. Guess I have to look harder next time.
Cheers
-
pcdoc
I hunted through the forums and wiki and could not find that info. Guess I have to look harder next time.
No need to look harder, just read the published information !
See the link at the top of this very Forum page to the FAQ.
Please peruse/read all of that as it has a wealth of information, including the answer to your problem, under the Section 4 - Email - Internal Mail Servers
It has been there for many years now.