Re: [exim] Exim: Select smarthost on basis of receipient add…

Pàgina inicial
Delete this message
Reply to this message
Autor: Muhammad Irfan
Data:  
A: Exim-users
Assumpte: Re: [exim] Exim: Select smarthost on basis of receipient address
Yes, addresses of the form bob@???
corrected as follows:

send_to_gateway:
driver = manualroute
domains = example.com
transport = remote_smtp
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
route_list = * 69.16.197.150
host_find_failed = defer

dnslookup:
driver = dnslookup
domains = ! +local_domains
transport = remote_smtp
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
no_more

Also tested will exim -bt command and looks OK to me. Let me know if you
still found any issues in it.

$ exim -bt bob@???
router = send_to_gateway, transport = remote_smtp

$ exim -bt bob@???
router = dnslookup, transport = remote_smtp

Also, as i said i am doing this because my china office colleagues having
problems to send huge emails along with attachments because of connectivity
and bandwidth limitation between US / China. From this now china users can
directly send email to external domains from china DC SMTP
mail1.example.comand if they need to send email within same domain @
example.com email will relay from china SMTP mail1.example.com to
mail.example.com SMTP primary MTA in US DC which contains all users
mailboxes including US and China users.
Hopefully, above settings will eliminate email sending issues.The only
thing i need to do for china users they need to set china DC SMTP
mail1.example.com in email client.

Further, only one issue still persists, need to reslove that.
That is when an external user let say an external domain user in china
user@??? sends an attachment to bob@??? (bob is in china
office) it is problematic. Most of the time we don't recieve attachments
again becz of connectivity issues b/w China US as our mailboxes are hosted
in US DC.
At this point i am also thinking to move all china users mailboxes to China
DC on mail1.example.com so china external users our customers can easily
send emails to our china users. But the only limitation is that i don't
want to separate mailboxes domain name regionally. i.e. i don't want to
move china user mailboxes from US DC server mail.example.com to
mail1.example.com in china because of domain name @example.com
I don't want to change domain for china user.
Is there any way in exim to replicate mailboxes ? so i can replicate china
user mailboxes from US DC primary MTA to secondry SMTP.
Is there any possibliity without changing domain name for any user i can
improve email receive mechanism.
Any suggestion.
And sorry for long post.

Waiting for your reply.

Thanks,




On Thu, Feb 16, 2012 at 5:27 PM, Dominic Benson <dominic@???>wrote:

> On 16/02/12 10:56, Muhammad Irfan wrote:
>
>> Benson,
>>
>> I am using CENTOS 5.
>> The only reason i am relaying emails from china (mail1.example.com SMTP)
>> to
>> US host contains all user mailboxes including china& US users on (
>> mail.example.com). While if china users sends an email to external
>> domains
>> i want those emails to send through china SMTP mail1.example.com because
>> most of the china users sends emails within china to external domains
>> through this they don't have to route to US host mail.example.com and
>> than
>> it delievers back in china. I am having huge no. of complains from china
>> users when sending emails with attachments. Fortunately i have machine in
>> china DC. I installed exim on it and configured as STMP server for china
>> users.
>>
>> I foresee sending emails from china to china host mail1.example.com will
>> improve email sending. Further, i will authenticate all china users via
>> STMP AUTH through /etc/exim/passwd file and will store china users info
>> there to authenticate. While for email recieving china users still need to
>> fetch emails from US mail.example.com. At this point i am also looking to
>> replicate china user mailboxes from US to china host through unix rsync
>> command. Don't know it's suitable or not.
>>
> I think that would be tricky. Especially with deletes - because the delete
> would happen on one server, and then probably be undone. And the 'new'
> state of messages would be constantly clobbered.
> I would think that it would be considerably easier to split the mailboxes
> between the two, as has already been suggested. Cyrus with Murder is
> probably the easiest way to do it. It also has the advantage that mailboxes
> can be moved and clients updated independently. And that roaming users can
> always connect to the closest regardless of where their mailbox really
> resides.
>
>
>
>> For email client for china users i will declare mail.example.com in
>> incoming mail server to fetch emails from US host mail.example.com and
>> will
>> set mail1.example.com in outgoing mail server option to send email for
>> china users.
>>
>> I declared send_to_gatewary router just above dnslookup as follows.
>> Also, please check following routers those will work as anticipitation ?
>> And help me on this this solution is appropriate for my situation or not.
>>
>> Thanks in advance.
>>
>> send_to_gateway:
>> driver = manualroute
>> domains = mail.example.com
>> transport = remote_smtp
>> ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
>> route_list = * mail.example.com
>> host_find_failed = defer
>> no_more
>>
>> dnslookup:
>> driver = dnslookup
>> domains = ! +local_domains : mail.example.com
>> transport = remote_smtp
>> ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
>> no_more
>>
>>
> Well, if I read your previous posts correctly then domains should be
> example.com - i.e. your users have addresses of the form bob@???;
> not bob@???
>
> The domains condition on the dnslookup router is wrong (I think) - see
> http://www.exim.org/exim-html-**current/doc/html/spec_html/**
> ch10.html#SECID76<http://www.exim.org/exim-html-current/doc/html/spec_html/ch10.html#SECID76>for an explanation of how negative list items work
> - As it is after a router which would handle example.com (once
> corrected), then it isn't necessary to exclude example.com anyway, so you
> could just drop the second part
> - If you did need to exclude multiple host lists, I think you would have
> to negate each one. Or possibly you can negate the entire condition
> (!domains=...), it works in an ACL, but I don't know if it does in a router
> definition.
>
>
>
> --
> ## List details at https://lists.exim.org/**mailman/listinfo/exim-users<https://lists.exim.org/mailman/listinfo/exim-users>
> ## Exim details at http://www.exim.org/
> ## Please use the Wiki with this list - http://wiki.exim.org/
>