Koozali.org: home of the SME Server

[Solved] SMTP authentication (with LOGIN) with ISP server failed

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
I'm trying to relay messages to ISP SMTP.
but it's not working even I'm sure I'm using correct credentials.

I'm seing this error message:
SMTP authentication (with LOGIN) with ISP server failed
when do:
tail -30 /var/log/smtp-auth-proxy/current |tai64nlocal

I've change ISP (to my own, a bigger ISP here)
any tips ?
« Last Edit: April 01, 2016, 11:22:01 AM by jader »
...

Offline byte

  • *
  • 2,183
  • +2/-0
Re: SMTP authentication (with LOGIN) with ISP server failed
« Reply #1 on: March 29, 2016, 01:34:18 PM »
Try enabling debug to show more information...

Code: [Select]
config setprop smtp-auth-proxy Debug enabled
Code: [Select]
signal-event email-update
then take a look in the log and report back here or better open a bug ticket in case this is a potential bug.
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: SMTP authentication (with LOGIN) with ISP server failed
« Reply #2 on: March 29, 2016, 01:48:55 PM »
Done!
It still complain about user/pwd:

Code: [Select]
2016-03-29 08:47:04.426244500 Net::SMTP::SSL=GLOB(0xa27dde8)<<< 535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6
) with ISP server failed47500 SMTP authentication (with LOGIN
2016-03-29 08:47:04.426250500 all SMTP authentication methods failed
2016-03-29 08:47:04.426252500 Net::SMTP::SSL=GLOB(0xa27dde8)>>> QUIT
2016-03-29 08:47:04.455770500 Net::SMTP::SSL=GLOB(0xa27dde8)<<< 221 2.0.0 Bye
2016-03-29 08:47:05.443618500 Net::SMTP::SSL=GLOB(0xa27dd88)<<< 535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6
) with ISP server failed52500 SMTP authentication (with LOGIN
2016-03-29 08:47:05.443869500 all SMTP authentication methods failed
2016-03-29 08:47:05.444125500 Net::SMTP::SSL=GLOB(0xa27dd88)>>> QUIT
2016-03-29 08:47:05.470261500 Net::SMTP::SSL=GLOB(0xa27dd88)<<< 221 2.0.0 Bye
[root@casa ~]#


Should I use SMTP.ISP.TLD:587 or use PeerPort parameter ?
I´m sure I´ve tryed both ... but just to be sure!
...

Offline byte

  • *
  • 2,183
  • +2/-0
Re: SMTP authentication (with LOGIN) with ISP server failed
« Reply #3 on: March 29, 2016, 02:29:38 PM »
And have you doubled checked your username and password are correct?

There is a command which confirms what method authentication your ISP uses but for the life of me I cannot find in my notes or remember what that was  :?
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline byte

  • *
  • 2,183
  • +2/-0
Re: SMTP authentication (with LOGIN) with ISP server failed
« Reply #4 on: March 29, 2016, 02:33:00 PM »
There is a command which confirms what method authentication your ISP uses but for the life of me I cannot find in my notes or remember what that was  :?

Found it...

Code: [Select]
perl -MNet::SMTP -e  'die "fail" unless Net::SMTP->new("<your-mailserver.com>", Debug => 1);'
What does this show?
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: SMTP authentication (with LOGIN) with ISP server failed
« Reply #5 on: March 29, 2016, 04:21:55 PM »
I´ve run this command to all ISP I´ve tryed:

Code: [Select]
[root@casa ~]# config show SMTPSmartHost
SMTPSmartHost=smtplw.com.br:587

and this is the return of your command:
Code: [Select]
[root@casa ~]# perl -MNet::SMTP -e  'die "fail" unless Net::SMTP->new("smtplw.com.br:587", Debug => 1);'
Net::SMTP>>> Net::SMTP(2.29)
Net::SMTP>>>   Net::Cmd(2.26)
Net::SMTP>>>     Exporter(5.58)
Net::SMTP>>>   IO::Socket::INET(1.29)
Net::SMTP>>>     IO::Socket(1.29)
Net::SMTP>>>       IO::Handle(1.25)
Net::SMTP=GLOB(0x8d61790)<<< 220 saasauth0001.correio.biz ESMTP Postfix (Debian/GNU)
Net::SMTP=GLOB(0x8d61790)>>> EHLO localhost.localdomain
Net::SMTP=GLOB(0x8d61790)<<< 250-saasauth0001.correio.biz
Net::SMTP=GLOB(0x8d61790)<<< 250-PIPELINING
Net::SMTP=GLOB(0x8d61790)<<< 250-SIZE 37527614
Net::SMTP=GLOB(0x8d61790)<<< 250-VRFY
Net::SMTP=GLOB(0x8d61790)<<< 250-ETRN
Net::SMTP=GLOB(0x8d61790)<<< 250-STARTTLS
Net::SMTP=GLOB(0x8d61790)<<< 250-AUTH PLAIN LOGIN
Net::SMTP=GLOB(0x8d61790)<<< 250-ENHANCEDSTATUSCODES
Net::SMTP=GLOB(0x8d61790)<<< 250-8BITMIME
Net::SMTP=GLOB(0x8d61790)<<< 250 DSN

other configurations I´ve done and SHOULD work (because work in a program running on same network):


Code: [Select]
[root@casa ~]# perl -MNet::SMTP -e  'die "fail" unless Net::SMTP->new("mail-ssl.locaweb.com.br:587", Debug => 1);'
Net::SMTP>>> Net::SMTP(2.29)
Net::SMTP>>>   Net::Cmd(2.26)
Net::SMTP>>>     Exporter(5.58)
Net::SMTP>>>   IO::Socket::INET(1.29)
Net::SMTP>>>     IO::Socket(1.29)
Net::SMTP>>>       IO::Handle(1.25)
Net::SMTP=GLOB(0x9a867b0)<<< 220 bart0123.email.locaweb.com.br ESMTP Postfix (Debian/GNU)
Net::SMTP=GLOB(0x9a867b0)>>> EHLO localhost.localdomain
Net::SMTP=GLOB(0x9a867b0)<<< 250-bart0123.email.locaweb.com.br
Net::SMTP=GLOB(0x9a867b0)<<< 250-PIPELINING
Net::SMTP=GLOB(0x9a867b0)<<< 250-SIZE 50000000
Net::SMTP=GLOB(0x9a867b0)<<< 250-VRFY
Net::SMTP=GLOB(0x9a867b0)<<< 250-ETRN
Net::SMTP=GLOB(0x9a867b0)<<< 250-STARTTLS
Net::SMTP=GLOB(0x9a867b0)<<< 250-AUTH PLAIN LOGIN
Net::SMTP=GLOB(0x9a867b0)<<< 250-ENHANCEDSTATUSCODES
Net::SMTP=GLOB(0x9a867b0)<<< 250-8BITMIME
Net::SMTP=GLOB(0x9a867b0)<<< 250 DSN
This should work... but doesn´t
and yes, I´ve double check the credentials by using webmail.

Regards

Jáder
...

Offline byte

  • *
  • 2,183
  • +2/-0
Re: SMTP authentication (with LOGIN) with ISP server failed
« Reply #6 on: March 30, 2016, 10:40:11 AM »
Should I use SMTP.ISP.TLD:587 or use PeerPort parameter ?
I´m sure I´ve tryed both ... but just to be sure!

You should use PeerPort by using this command...

Code: [Select]
config setprop smtp-auth-proxy PeerPort 587
Code: [Select]
signal-event email-update
Is that how you configured the PeerPort option?

If you run this command...

Code: [Select]
config show smtp-auth-proxy
Does the username / password look correct (don't post the output), maybe you have some special characters in the password which is not being saved correctly when entered in the server-manager.

--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: SMTP authentication (with LOGIN) with ISP server failed
« Reply #7 on: March 30, 2016, 01:03:21 PM »
I have used :587 after ISP smtp server as in smtplw.com.br:587 and delete PeerPort.
Documentation is not clear about what right option.
Anyways, if I look at logs it appear to work:

Code: [Select]
2016-03-30 07:52:30.063779500 Trying authentication method PLAIN
2016-03-30 07:52:30.080445500 Net::SMTP::SSL=GLOB(0x9facfe0)>>> AUTH PLAIN XXXXXXX
2016-03-30 07:52:30.109162500 Net::SMTP::SSL=GLOB(0x9facfe0)<<< 235 2.7.0 Authentication successful

but I still have messages in queue:

Code: [Select]
[root@casa ~]# qmHandle -s
Total messages: 3
Messages with local recipients: 0
Messages with remote recipients: 3
Messages with bounces: 0
Messages in preprocess: 0

And at least one of them is a test I try to send a few minutes ago from CLI using:
Code: [Select]
mail -s "Teste CLI debora 0752 30mar" jader.marasca@gmail.com

This is my default test... should send immediatly!

Now I have a log saying auth is ok but server not sending messages.
What log should I search for a failure now ?

EDIT1:
Code: [Select]
# tail -30 /var/log/qmail/current
shows:


Code: [Select]
@4000000056fbb1e6035032ac delivery 415: deferral: 127.0.0.1_does_not_like_recipient./Remote_host_said:_450_4.7.1_<jader.marasca@gmail.com>:_Recipient_address_rejected:_Access_Denied/Giving_up_on_127.0.0.1./
@4000000056fbb1e603504e04 status: local 0/20 remote 1/20
@4000000056fbb1e6041789ec delivery 413: deferral: 127.0.0.1_does_not_like_recipient./Remote_host_said:_450_4.7.1_<debora@xxxx>:_Recipient_address_rejected:_Access_Denied/Giving_up_on_127.0.0.1./

Thanks

Jáder
« Last Edit: March 30, 2016, 01:44:02 PM by Daniel B. »
...

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: SMTP authentication (with LOGIN) with ISP server failed
« Reply #8 on: March 31, 2016, 04:42:06 PM »
What log should I search for a failure now ?
Quote

The logs on the ISP's mail server. Only they know why they are saying "Access denied".

Online ReetP

  • *
  • 3,740
  • +5/-0
Re: SMTP authentication (with LOGIN) with ISP server failed
« Reply #9 on: April 01, 2016, 10:34:41 AM »
One question. Could be wrong and barking up the wrong tree but....

What system do the ISP use for mail ?

If it is Office/Excange 365 thing then you need individual authentication per user and qpsmtpd cannot do that. There is a bug on it in bugzilla.

See https://bugs.contribs.org/show_bug.cgi?id=9050

Worth eliminating from your enquiries.

B. Rgds
John
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: SMTP authentication (with LOGIN) with ISP server failed
« Reply #10 on: April 01, 2016, 11:21:30 AM »
I'm not sure about what's the error... I just switch to another ISP and it's working.
But I'm using a personal account instead of  a client account because their ISP deny delivery.
Later I'll open a ticket on their ISP to find out why and change back.

For documentation for future: I'm using the 587 port as part of SmartHost parameter and not as PeerPort.
Edit: I changed subject line to [solved]
« Last Edit: April 01, 2016, 11:24:00 AM by jader »
...

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: [Solved] SMTP authentication (with LOGIN) with ISP server failed
« Reply #11 on: April 01, 2016, 12:09:37 PM »
if you need a smarthost, you can try sendgrid.net: you can send 12000 email/month for free
I'm using it for some customers of mine, works flawlessy..
I only needed to edit some params on sendgrid side to avoid custom headers (tracking)

Note: I'm not involved in any way with sendgrid

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: [Solved] SMTP authentication (with LOGIN) with ISP server failed
« Reply #12 on: April 01, 2016, 02:40:46 PM »
if you need a smarthost, you can try sendgrid.net: ...
I only needed to edit some params on sendgrid side to avoid custom headers (tracking)

Sounds like a good thing to write up on the wiki.

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: [Solved] SMTP authentication (with LOGIN) with ISP server failed
« Reply #13 on: April 01, 2016, 02:46:14 PM »
well.. maybe..

I can suggest mandrill.com too.. anyway, I don't know if this should be in the wiki.. :-)

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: SMTP authentication (with LOGIN) with ISP server failed
« Reply #14 on: April 01, 2016, 02:48:15 PM »
If it is Office/Excange 365 thing then you need individual authentication per user and qpsmtpd cannot do that. There is a bug on it in bugzilla.

I don't think that is the case here. The response is "Access denied", not "Client does not have permissions to send as this sender".

BTW, qpsmtpd isn't involved in sending mail messages. It's smtp-auth-proxy which is doing the SmartHost authentication here.

Online ReetP

  • *
  • 3,740
  • +5/-0
Re: [Solved] SMTP authentication (with LOGIN) with ISP server failed
« Reply #15 on: April 01, 2016, 02:52:59 PM »
I don't think that is the case here. The response is "Access denied", not "Client does not have permissions to send as this sender".

BTW, qpsmtpd isn't involved in sending mail messages. It's smtp-auth-proxy which is doing the SmartHost authentication here.

Thanks for the clarification.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation