Re: [exim] Using DA POP3 together with Exchange

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Ian Eiloart
Dátum:  
Címzett: exim users
Tárgy: Re: [exim] Using DA POP3 together with Exchange

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

> I've made the following router for the domain, domain.com with the
> info@??? 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
>
> The info@??? 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).



Your router needs to query your Active Directory server, with a condition something like this:

            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}


where:
    AD_USER is the DN of an AD account with appropriate permissions
    AD_PASS is the password
    AD_HOST is the host name
    AD_BASE is the appropriate search base - don't include too here, because there may be other objects that match, in other parts of the tree. 


The key thing here is that you're looking for an LDAP attribute called proxyAddresses, with value "SMTP:$local_part@$domain".



>
>
> Op 02-04-11 00:29 schreef Sven Hartge <sven@???>:
>
>> Pierre Munnichs <p.munnichs@???> 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:
>>> - email1@???
>>> - email2@???
>>
>>> 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.
>>> - email3@???
>>> - email4@???
>>
>>> 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: email1@??? -> deliver to POP3 box on DA
>>> webserver.
>>> mail send to: email3@??? -> 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 doesnotexist@??? 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