On 18 Apr 2011, at 21:35, Pierre Munnichs wrote:

> I've made the following router for the domain, domain.com with the
> [email protected] email box :
> 
> # Exchange route
> exchange_mailboxes:
>  driver = manualroute
>  transport = remote_smtp
>  domains = domain.com
>  local_parts = info
>  route_data = 123.123.123.123
>  no_verify
>  no_more

So, you need to add something like this:

condition =  ${if eq {${lookup ldap {\
                                user=AD_USER \
                                pass=AD_PASS \
                                ldap://AD_HOST/\
                                    AD_BASE?\
                                    proxyAddresses?\
                                    sub?\
                                    
proxyAddresses=${quote_ldap:SMTP:$local_part@$domain}} \
                            {true}{false}}}\
                        {true} } 

And set the macros AD_USER AD_PASS AD_HOST and AD_BASE to the correct values 
for your AD server. 

> 
> The [email protected] box is on the Exchange server with IP adres
> 123.123.123.123
> When I activate the above mentioned router all the e-mail is forwarded to
> the exchange server.
> Even if the e-mail for the POP3 boxes that are on the local server.
> 
> So the router works fine, and the exchange server does reply correct. I'm
> getting 'user does not exists' error when I send an e-mail to an adres
> that is not on the exchange.
> The only problem is, the router doesn't check if the account exists on the
> local server before forwarding it.
> Because when it exists on the local server is doesn't have to be
> forwarded, it has to be delivered to the POP3 box of that e-mail adres on
> the local server.
> 
> 
> Hope someone can help me with this problem.
> It is no problem at all if I have to add the exchange e-mail adresses hard
> coded to the exim.conf to be forwarded.
> However, this is a problem when I have to do it for all the local adresses
> (POP3).
> 
> 
> 
> 
> Op 02-04-11 00:29 schreef Sven Hartge <[email protected]>:
> 
>> Pierre Munnichs <[email protected]> wrote:
>> 
>>> I'm strugling with this problem for a few weeks now. Hope somebody can
>>> help me with this.
>> 
>>> I've got a webserver with DirectAdmin (DA). On this webserver i'm
>>> hosting a domain, for example mydomain.com.
>> 
>>> I've got 2 POP3 e-mail accounts on this domain:
>>> - [email protected]
>>> - [email protected]
>> 
>>> Then i also have an external Exchange 2010 server. The Exchange server
>>> is
>>> taking care for another 2 e-mail adressen on the same domain.
>>> - [email protected]
>>> - [email protected]
>> 
>>> Is it posible to configure exim that when an e-mail message arrives it
>>> checkes if that user exists, otherwise reject the message so it will go
>>> to
>>> the next adres in de MX records list?
>> 
>> If you reject a mail (with an 5xx response), it is gone, the delivering
>> MTA _will_ bounce it.
>> 
>> If you defer a mail (with an 4xx response) there is no guarantee the
>> delivering MTA will try the next MX or even when it will retry the
>> transmission. With some bad luck, it could always try the first MX and
>> then bounce the mail after some hours/days.
>> 
>> Some services like Yahoo are know to throw away mails which have been in
>> their queue for only 1 hour (!!), so better get the mail out of their
>> queue as fast as possible.
>> 
>>> For example:
>>> mail send to: [email protected] -> deliver to POP3 box on DA
>>> webserver.
>>> mail send to: [email protected] -> doesn't exist on DA server,reject
>>> ->
>>> forward to next MX records what will be the Exchange server.
>> 
>> You probably want your Exim4 MX to receive all mail for mydomain.com
>> (thus being the only MX) and just forward any non-local users to your
>> Exchange server.
>> 
>> This can be achieved by two routers, the first one to check local users
>> (normally already existing) and a second one after that, which routes
>> all other mails to your Exchange server. Maybe with a little recipient
>> lookup to reject mails to [email protected] instead of blindly
>> forwarding them along and causing late bounces which will result in
>> DNSBL entries.
>> 
>> Grüße,
>> Sven.
>> 
>> -- 
>> Sig lost. Core dumped.
>> 
>> 
>> -- 
>> ## List details at http://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/
> 
> 
> -- 
> ## List details at http://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/

-- 
Ian Eiloart
Postmaster, University of Sussex
+44 (0) 1273 87-3148


-- 
## List details at http://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/

Reply via email to