SMTP module can not pass authentication

pku - June 4, 2009 - 17:23
Project:SMTP Authentication Support
Version:6.x-1.x-dev
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:needs review
Description

Hi all,

I am confused as I am getting such a smtp module <->server dialog:

SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "220 m047.home.net.pl ESMTP "
SMTP -> get_lines(): $data is "220 m047.home.net.pl ESMTP "
SMTP -> FROM SERVER: 220 m047.home.net.pl ESMTP
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "250-m047.home.net.pl "
SMTP -> get_lines(): $data is "250-m047.home.net.pl "
SMTP -> get_lines(): $data was "250-m047.home.net.pl "
SMTP -> get_lines(): $str is "250-AUTH LOGIN PLAIN "
SMTP -> get_lines(): $data is "250-m047.home.net.pl 250-AUTH LOGIN PLAIN "
SMTP -> get_lines(): $data was "250-m047.home.net.pl 250-AUTH LOGIN PLAIN "
SMTP -> get_lines(): $str is "250-AUTH=LOGIN PLAIN "
SMTP -> get_lines(): $data is "250-m047.home.net.pl 250-AUTH LOGIN PLAIN 250-AUTH=LOGIN PLAIN "
SMTP -> get_lines(): $data was "250-m047.home.net.pl 250-AUTH LOGIN PLAIN 250-AUTH=LOGIN PLAIN "
SMTP -> get_lines(): $str is "250-PIPELINING "
SMTP -> get_lines(): $data is "250-m047.home.net.pl 250-AUTH LOGIN PLAIN 250-AUTH=LOGIN PLAIN 250-PIPELINING "
SMTP -> get_lines(): $data was "250-m047.home.net.pl 250-AUTH LOGIN PLAIN 250-AUTH=LOGIN PLAIN 250-PIPELINING "
SMTP -> get_lines(): $str is "250 8BITMIME "
SMTP -> get_lines(): $data is "250-m047.home.net.pl 250-AUTH LOGIN PLAIN 250-AUTH=LOGIN PLAIN 250-PIPELINING 250 8BITMIME "
SMTP -> FROM SERVER: 250-m047.home.net.pl 250-AUTH LOGIN PLAIN 250-AUTH=LOGIN PLAIN 250-PIPELINING 250 8BITMIME
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "334 VXNlcm5hbWU6 "
SMTP -> get_lines(): $data is "334 VXNlcm5hbWU6 "
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "334 UGFzc3dvcmQ6 "
SMTP -> get_lines(): $data is "334 UGFzc3dvcmQ6 "
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "235 ok, go ahead (#2.0.0) "
SMTP -> get_lines(): $data is "235 ok, go ahead (#2.0.0) "
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "530 no auth during mail transaction... brak autoryzacji SMTP uzytkownika... "
SMTP -> get_lines(): $data is "530 no auth during mail transaction... brak autoryzacji SMTP uzytkownika... "
SMTP -> FROM SERVER: 530 no auth during mail transaction... brak autoryzacji SMTP uzytkownika...
SMTP -> ERROR: MAIL not accepted from server: 530 no auth during mail transaction... brak autoryzacji SMTP uzytkownika...
SMTP -> get_lines(): $data was ""
SMTP -> get_lines(): $str is "250 flushed "
SMTP -> get_lines(): $data is "250 flushed "
SMTP -> FROM SERVER: 250 flushed

it seems server expect authentication.
Provider is home.pl in Poland.

What's strange module seems to work only using the first mailbox - one which was configured as first after plain install.

The other issues is that in the log I am getting message:

Error sending e-mail from XXXXX@4x4.org.pl to YYYY@poczta.onet.pl : The following From address failed: XXXXX@4x4.org.pl

While XXXXX@4x4.org.pl is the first ever configured FROM field and is suitable for the only account module seems to work with.

For me: FROM field value is not being flashed upon configuration change or some caching issues are here.

Thanks for you help in advance,

Paul

#1

pku - June 4, 2009 - 17:56

I have found how can I make it working,
I am not sure if it is expected but the only email account you can use for authentication HAS TO be the same account as one given on Site Information form /the same where you are putting slogan etc/

Paul

#2

pku - June 5, 2009 - 11:04
Status:active» needs review

Finally I have found the solution.

As it seems problem may rise on other providers hosted sites let me explain a little.

As you can read above. The problem was that provider's smtp server did not want to pass communication.
Server closed protocol due to improperly configured email headers.

In my case if I want to route the email it HAS to follow two rules
1. I have to pass authorization /user+pass/
2. Email header HAS to be build in such a way, that address corresponding to above given account HAS TO properly included in email header.

When I realize that solution came quickly by changing header fields alignment, aspecialy by ADDING the ReplyTO field.

I've just added corresponding line below originals - not to mess original code.

So:

Just after this lines inside mail_wraper function:

// Defines the From value to what we expect.
$mail->From = $from;
$mail->FromName = $from_name;
$mail->Sender = $from;

I have added this:

//pku
$mail->RepltTo = $from; //so recipient can just press reply button
$mail->From = $from; //to satisfy server and SMTP rules
$mail->Sender = variable_get('smtp_from', ''); // to allow that mail go threw account given in SMTP module auth. fields

What is important you may have to play a little with that lines to "satisfy" your providers spam rules but finaly it's now simple.

My idea would be to include such a solution as a simple checkbox in module configuration (You may call it "Send in name of bla bla bla")

-------------------------------------------------------------------------------------------------------------------

Below some words just to leave some search tags for my friends in Poland using this provider (hope it will help a little)

home.pl problem drupal poczta email autoryzacja authorization

 
 

Drupal is a registered trademark of Dries Buytaert.