fmbiete / Z-Push-contrib

Z-Push fork with changes that I will try to contrib
GNU Affero General Public License v3.0
134 stars 61 forks source link

Problem w/ SMTP-Login #254

Closed basbebe closed 8 years ago

basbebe commented 8 years ago

I'm having a problem with SMTP logins:

Everything works until the Auth-process. This is my setup in Z-Push:

$imap_smtp_params = array('host' => '10.0.0.3', 'port' => 587, 'auth' => true, 'username' => 'imap_username', 'password' => 'imap_password', 'localhost' => 'push.xxx.yy', 'debug' => true, 'verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true);

But the Username that is being transmitted is not the imap_username. It is a 12-digit alphanumerical gibberish but the login should be "plain"…

fmbiete commented 8 years ago

Umm??? This shouldn't be happening... Are you sure you are not looking at it after being encrypted by STARTTLS?

basbebe commented 8 years ago

Yes, I'm sure. Both the Z-Push log and the Postfix log show the same username (which is not the email-address as it's supposed to as I wrote). Login-process should be plain.

fmbiete commented 8 years ago

Can you try using the port 25. 587 is the port where you should use STARTTLS. The library Net:SMTP will try to use STARTTLS if the SMTP server is offering it (and it should in the 587 port).

basbebe commented 8 years ago

25 doesn't allow authentication in my setup. I already tried and confirmed that STARTTLS worked as supposed.

The problem isn't there anymore. I assume it was a misconfiguration in the way Dovecot stored it's passwords in the database. Sending from other systems worked all the time but since I changed it now Z-Push does as well. Now the Postfix log shows the correct username and not the encoded version (?).