SMTP and LARAVEL issue

9 posts / 0 new
Last post
#1 Tue, 01/12/2016 - 08:31
juliereader

SMTP and LARAVEL issue

So i was trying to setup ny SMTP email in a laravel app and it is giving me following error

Swift_TransportException in AuthHandler.php line 181: Failed to authenticate on SMTP server with username "info@domain.com" using 2 possible authenticators

here are my SMTP details:

MAIL_DRIVER=smtp
MAIL_HOST=mail.domain.com
MAIL_PORT=25
MAIL_USERNAME=info@domain.com
MAIL_PASSWORD=password
MAIL_ENCRYPTION=

can anyone please suggest what can be the issue here?

Tue, 01/12/2016 - 12:23
andreychek

Howdy,

What error do you see in your email logs when trying to authenticate? Those would be located in either /var/log/maillog or /var/log/mail.log, depending on your distribution.

-Eric

Fri, 01/15/2016 - 07:23 (Reply to #2)
juliereader

*sorry for late reply..i am not getting any notification about email due to the new cms of virtualmin forums

here are the maillogs

Jan 15 05:14:58 domain postfix/anvil[15641]: statistics: max connection rate 1/60s for (smtp:199.16.156.149) at Jan 15 05:11:33
Jan 15 05:14:58 domain postfix/anvil[15641]: statistics: max connection count 1 for (smtp:199.16.156.149) at Jan 15 05:11:33
Jan 15 05:14:58 domain postfix/anvil[15641]: statistics: max cache size 1 at Jan 15 05:11:33
Jan 15 07:15:49 domain postfix/smtpd[22294]: connect from domain.com [107.1a5.87.13]: SASL LOGIN authentication failed: authentication failure
Jan 15 07:15:53 domain postfix/smtpd[22294]: warning: SASL authentication failure: Password verification failed
Jan 15 07:15:53 domain postfix/smtpd[22294]: warning: domain.com[107.1a5.87.13]: SASL PLAIN authentication failed: authentication failure
Jan 15 07:15:54 domain postfix/smtpd[22294]: lost connection after RSET from domain.com[107.1a5.87.13]
Jan 15 07:15:54 domain postfix/smtpd[22294]: disconnect from domain.pk[107.1a5.87.13]

where domain = user, domain.com = actial domain and 1a5 = actual IP

Wed, 01/20/2016 - 03:18
juliereader

any update ?

Wed, 01/20/2016 - 09:32
andreychek

Howdy,

It does appear that you're seeing a username or password problem.

Are you able to log into that email account using another client, such as RoundCube or Outlook?

-Eric

Thu, 01/21/2016 - 05:21 (Reply to #5)
juliereader

yes i can login with same user and password using domain.com:20000

Tue, 01/26/2016 - 06:17
juliereader

any possible solution for this ?

Sun, 01/31/2016 - 21:05
joe443

i don't know the solution, but here is how you can try to diagnose the problem. Either enable extremely verbose logging in Postfix (see debugging howto http://www.postfix.org/DEBUG_README.html) or use tcpdump on the server to monitor tcp traffic. The idea is to see what login name and password is being transmitted.

The "SASL authentication failure: Password verification failed" error means that there is mismatch between the login/password being transmitted and the one that the SASL process is looking up somewhere. If you can see that the correct login/password is being transmitted (previous paragraph) then the value stored, that is being looked up, is wrong. Or vice versa.

Where is your SASL process looking up the login/password? It's probably either in /etc/shadow or some other Postfix-specific file. See SASL howto http://www.postfix.org/SASL_README.html for details.

So here is the summary: 1. use postfix verbose logging or tcpdump to figure out what login/password is being transmitted. 2. compare its value with the stored value.

Sun, 01/31/2016 - 21:07
joe443

Also, ltrace is really good at letting you see what's happening inside a running program. Usage: ltrace -p pid. It will show you all the shared library calls, and usually you can tell what strings are being sent to library functions.

Topic locked