Usage With Exchange

tdldp

Verified User
Joined
May 9, 2005
Messages
169
Hi all

I have a particular need on one domain handled on a DA server.
I need for this domain, that all mails received on it gets relay / forwarded to an Exchange 2010 server that will be for that domain the main Email Server.

After a little exim search, i ended up with following :

smarthost:
driver = manualroute
transport = remote_smtp
local_parts = /etc/virtual/relay_exchange
route_list = relaydomain.ext exchange.fqdn.ext

The local_parts is only intended to make the tests, and once validated will be removed.

My problem is that when doing this, i do get email starting to outgo from the DA Box to the exchange box, but i get this error :

SMTP error from remote mail server after RCPT TO:<[email protected]>:
host exchange.fqdn.ext [90.xxx.xxx.149]: 530 SMTP authentication is required.

Must i understand that my exchange server is refusing that mail incomes from my DA Box, or that my DA Box has refused SMTP remote router for authentication problems ?

In second case, how do i implement for that router an authentication mechanism that won't interfere with normal authentication mecanism on DA ?


Thks for your answers...

Tdldp
 
Seems like your exchange server is sending the error.

You could easily test by using raw mail commands:

Code:
telnet <exchangeip> 25
HELO testing
MAIL FROM: <[email protected]>
RCPT TO: <[email protected]>

mail from - email address that the email is coming from
rcpt to - email address of the person the mail is going to

After you send the rcpt to command it should tell you if it is going to accept or not. You should just be able to type quit to end the connection.
 
Thks for your answer scsi

It is indeed my exchange server that answer : 530 SMTP Authentication...
So it means either i can provide via DA an smtp authentification for the router used .. Is this possible ? Is there a tuto somewhere ?
Either i must accept relay in exchange 2010 which is what i did : I created a receiving connector on DA's IP for port 25/587 and forced anonymous connection.

But something is weird : I telneted both ports 25/587 and depending port i don't get same responses :

Apparently when i telnet on port 25 i get :
220 EMAIL-INTRA ESMTP
EHLO testing
250-EMAIL-INTRA
250-SIZE 20480000
250 AUTH LOGIN
MAIL FROM: [email protected]
250 OK
RCPT TO: [email protected]
530 SMTP authentication is required.

but when i telnet on port 587 i get :
220 email.intra.fqdn.ext Microsoft ESMTP MAIL Service ready at Fri, 1 Jul 2011 12:05:59 +0200
EHLO TESTING
250-email.intra.fqdn.ext Hello [10.10.100.90]
250-SIZE 10485760
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-AUTH
250-8BITMIME
250-BINARYMIME
250 CHUNKING
MAIL FROM: [email protected]
250 2.1.0 Sender OK
RCPT TO: [email protected]
250 2.1.5 Recipient OK
DATA
354 Start mail input; end with <CRLF>.<CRLF>
TEST

.
250 2.6.0 <[email protected]> [InternalId=2] Queued mail for delivery

I tend to believe there is a problem with port 25 which is used by default by DA's exim conf... How could i force my routeur to use port 587 ?

Thks for your help

Tdldp
 
The use of smarthost is for sending email. Is that what you want? do you want all outgoing email coming from the server to be sent through the Exchange server? If so, I'd tell my users to use the Exchange server for outgoing email. I'd continue to let email from your DirectAdmin-powered server go out from DirectAdmin.

I don't know if you can tell DirectAdmin to relay outgoing mail using authentication on port 587; I'd suggest asking that on the exim-users mailing list.

If what you want to is use Exchange for incoming email you do that by clicking on MX settings, unchecking the box, and changing the MX records to point to theExchange server.

Jeff
 
Thanks jeff for your answer...

In theory, yes, i want my exim (DA) server to send some specific email accounts mail's to the exchange Server, not all domains, not all emails of a domain... And i need also for one domain once the first tests done, to relay all boxes email to the exchange account... In the later i'll use what i had planned to do the mx checkbox method you indicate.

I do believe it is a smarthost role that is needed for my first tests though i could make error (thus my topic).

So i believe to have managed to set up a relay on port 587 using following in exim.conf :

In Router Section :

smarthost:
driver = manualroute
transport = relay_exchange
ignore_target_hosts = 127.0.0.0/8
local_parts = /etc/virtual/relay_exchange_short
route_list = domaintorealay.fqdn.ext exchange.fqdn.ext::587

In Transport Section :
# This Transport is used for Exchange relaying
relay_exchange:
driver = smtp


It seems to work at this stage..

My only question, is eventually around syntax i feed the file relay_exchange_short.
For moment i only put : forename.name instead of [email protected].
I tried with full email but this didn't work (i believe there must be an lsearch syntax, but i don't understand it, if someone could provide a living example to identify in each case of the search the local parts (forename.name) and the domain (fqdn.ext), i'd appreciate...

Thanks for your replys..

Tdldp
 
There are other versions of lsearch syntax; I remember seeing them recently on the Exim users mailing list.

Something to do with partial-lsearch, but don't take my word for it; Google it.

Jeff
 
Back
Top