Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Problem with Mail::SendEasy and Exchange server

by dracos (Sexton)
on Apr 03, 2013 at 14:39 UTC ( #1026867=perlquestion: print w/replies, xml ) Need Help??
dracos has asked for the wisdom of the Perl Monks concerning the following question:

I am having issues with using Mail::SendEasy with our Exchange server. The code I am using worked fine on our old Lotus Notes server.

My IT people and I used an ethernet sniffer and found that the script is sending the "EHLO main" command and getting a valid response(see below). Then the send mail fails returning "Authentication error". Then the SMTP session times out.

The "Authentication error" does not make any sense. The only authentication we allow is based on IP address there is no username/password authentication used.

The funny thing is if I change the string to be HELO instead of EHLO I can send mail with out a problem.

Does any one have any suggestions as to what to do?

Using a telnet client connecting to port 25 I got the following responses form the old Notes server

EHLO main 250-CHIMAIL1.TMRIUSA.COM Hello main ([xxx.xx.xx.xx]), pleased to meet +you 250-HELP 250-SIZE 250 PIPELINING HELO main 250 CHIMAIL1.TMRIUSA.COM Hello main ([xxx.xx.xx.xx]), pleased to meet +you

And this is what I get from the Exchange server

EHLO main 250-chiexc.TMRIUSA.COM Hello [xxx.xx.xx.xx] 250-SIZE 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-STARTTLS 250-X-ANONYMOUSTLS 250-AUTH NTLM 250-X-EXPS GSSAPI NTLM 250-8BITMIME 250-BINARYMIME 250-CHUNKING 250-XEXCH50 250-XRDST 250 XSHADOW HELO main 250 chiexc.TMRIUSA.COM Hello [xxx.xx.xx.xx]

Further information:

This is perl 5, version 14, subversion 1 (v5.14.1) built for MSWin32-x +86-multi-thread Binary build 1401 [294969] provided by ActiveState http://www.ActiveSt Built Jun 16 2011 18:54:40
Mail::SendEasy Version: 1.2 Released: 2004-04-09

Replies are listed 'Best First'.
Re: Problem with Mail::SendEasy and Exchange server
by blue_cowdawg (Monsignor) on Apr 03, 2013 at 14:46 UTC
        Then the send mail fails returning "Authentication error". Then the SMTP session times out.

    Find out from your Exchange Server admin if they've enabled a feature that is very common in a lot of MTAs where you need to log in (authenticate) in order to relay mail through the server. That's what the statement above would imply.

    My own personal email relays will not allow non-authenticated users to relay to remote domains without authenticating.

    Peter L. Berghold -- Unix Professional
    Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg
Re: Problem with Mail::SendEasy and Exchange server
by marto (Bishop) on Apr 03, 2013 at 14:52 UTC

    It looks as though the Exchange server requires NTLM authenticaion, it doesn't look as though Mail::SendEasy supports this, and it has not been updated in years. Consider using something like Mail::Sender which does support NTLM.

    Update: fixed typo s/NTLM/NTLM/. Thanks MidLifeXis

Re: Problem with Mail::SendEasy and Exchange server
by dracos (Sexton) on Apr 03, 2013 at 16:07 UTC

    Again an I stated our IT department has verified the only limit on sending mail is that the machine it is coming from has to be in its IP address list, which it is.

    According to the logs on the Exchange server they see the "EHLO main" from the module they send the above response then a while later it disconnects the session do to inactivity.

    Also if any other Authentication was required changing the initial command from "EHLO" to "HELO" would have no effect where as that four leter change in the Mail::SendEasy module fixes the issue and I can then send Mail

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1026867]
Approved by marto
and cookies bake in the oven...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2018-02-19 22:01 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (266 votes). Check out past polls.