I have two servers connected via vpn. Got sending emails through an SMTP server on another server. My server runs CentOS. I am using phpmailer (in php: P), and on the other hand we have Microsoft Exchange 2010 Server.
An IT server running on an MS Exchange server created a VPN and loggon from its location and authenticated NTLM correctly.
The situation is as follows:
- It can connect without problems.
- Can send anonymous letters without any problems.
- It is not possible to authenticate through NTLM no matter what.
The error is always the same; I tried hundreds, if not thousands, of combinations before giving up. MS-E does not seem to recognize auth type transfers.
Server response when trying to send mail:
250-SIZE 31457280 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 <br />SMTP -> FROM SERVER:220 2.0.0 SMTP server ready <br />SMTP -> FROM SERVER: 250-APOLO.xxxxxx.local Hello [xxx.xxx.xxx.xxx] 250-SIZE 31457280 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-AUTH NTLM 250-X-EXPS GSSAPI NTLM 250-8BITMIME 250-BINARYMIME 250-CHUNKING 250-XEXCH50 250-XRDST 250 XSHADOW
With SMTP-Debug ON, the answer is:
<br />SMTP -> ERROR: AUTH not accepted from server: 504 5.7.4 Unrecognized authentication type <br />SMTP -> FROM SERVER:250 2.0.0 Resetting <br />SMTP Connect() failed. 2012-09-18 11:48:46 >> Error de envío: SMTP Connect() failed.
Confirmation was received from them (IT guys) that they expect NTLM as auth type.
This is the configuration I'm sending (phpmailer's):
PHPMailer Object ( [From] => noreply@asdasd.net [FromName] => Entorno Virtual de Aprendizaje de asdasd [Sender] => desarrollopersonas@asdasd.net [ReturnPath] => [Mailer] => smtp [UseSendmailOptions] => 1 [Hostname] => apolo.asdasd.local [Host] => apolo.asdasd.local [Port] => 25 [Helo] => [SMTPSecure] => tried all three of them (ssl, tls and "") [SMTPAuth] => 1 [Username] => desarrollopersonas@asdasd.net [Password] => xxx_2012 [AuthType] => NTLM [Realm] => [Workstation] => [SMTPDebug] => 2 [Debugoutput] => echo [SMTPKeepAlive] => [smtp:protected] => [language:protected] => Array ( [authenticate] => SMTP Error: Could not authenticate. [connect_host] => SMTP Error: Could not connect to SMTP host. [data_not_accepted] => SMTP Error: Data not accepted. [empty_message] => Message body empty [encoding] => Unknown encoding: [execute] => Could not execute: [file_access] => Could not access file: [file_open] => File Error: Could not open file: [from_failed] => The following From address failed: [instantiate] => Could not instantiate mail function. [invalid_address] => Invalid address [mailer_not_supported] => mailer is not supported. [provide_address] => You must provide at least one recipient email address. [recipients_failed] => SMTP Error: The following recipients failed: [signing] => Signing Error: [smtp_connect_failed] => SMTP Connect() failed. [smtp_error] => SMTP server error: [variable_set] => Cannot set or reset variable: )
I need a hand or at least a hint, I hope that this information will be enough.
source share