Page 1 of 1

email server send to local domain externally

Posted: Wed Feb 03, 2016 12:40 pm
by MAN5
Hi.
My server is Ubuntu 14, VestaCP, Apache, NginX, Exim4 etc.,

I have hosted 4 domains under the single VestaCP server under single user name.

locL.com > using local MX
extG.com > using Google Apps MX.
extZ.com > using Zoho MX

The issue is,
whenever i send email between those domains all mails delivering locally.

[email protected] > to > [email protected] > should deliver to Google MX. But it delivering to local mail box. Same is for my zoho MX also.

Keep receiving on local mailbox.

I have tried all the options of "sudo dpkg-reconfigure exim4-config".
All still same... :-(
Please help me. This server im setting up for a hosting company.

Re: email server send to local domain externally

Posted: Thu Feb 04, 2016 11:34 am
by MAN5
Ok i got it.
The scenario was like this..

1. sending emails are passing thru EXIM4 and the exim4 checks is the domain is local or non-local. (via "/etc/exim4/domains")
2. If is local domain > than try to delivering to local mail box. (even i set my MX to Google Apps). But there if there is valid mailbox, than failed.

3. So i created a dummy folder called "/etc/exim4/remote-domains". And change the config path on the "/etc/exim4/exim4.conf.template" as below..

**"......
######################################################################
# #
# Exim configuration file for Vesta Control Panel #
# #
######################################################################

SPAMASSASSIN = yes
SPAM_SCORE = 50
CLAMD = yes

#domainlist local_domains = dsearch;/etc/exim4/domains/
domainlist local_domains = dsearch;/etc/exim4/remote-domains/
domainlist relay_to_domains = dsearch;/etc/exim4/domains/
hostlist relay_from_hosts = 127.0.0.1

****

5. and restart EXIM services.
6. Now always, the EXIM4 check the remote-domains folder & there is no domains specified. So it thinks all the outgoing emails are have to send to outside domains. So it tries to deliver mails externally..

Anybody found any bugs on this config.?
Please advise me.

Re: email server send to local domain externally

Posted: Sat Mar 19, 2016 10:40 pm
by Sanity
So that messages reach the mail account google apps, you need to use dual delivery of google apps. and using aliases of google.

Re: email server send to local domain externally

Posted: Sat Mar 26, 2016 1:38 pm
by MAN5
Sanity wrote:So that messages reach the mail account google apps, you need to use dual delivery of google apps. and using aliases of google.
Sorry. I cant get your question clearly.