Author Topic: Why SMTP Error (250): Authentication failed?  (Read 37582 times)

Offline maximise

  • Jr. Member
  • **
  • Posts: 18
Re: Why SMTP Error (250): Authentication failed?
« Reply #15 on: February 21, 2019, 01:57:09 AM »
It sounds like roundcube is working properly and that log entry says that sendmail queued the message for delivery. I think you are going to have to keep tracing the message through the delivery process to find out where its gone. Perhaps the sendmail community can help you.

SMTP debug:

[21-Feb-2019 09:48:09 +0300]: <8n0nfa0s> Recv: 220 *DOMAIN* ESMTP Postfix
[21-Feb-2019 09:48:09 +0300]: <8n0nfa0s> Send: EHLO localhost
[21-Feb-2019 09:48:09 +0300]: <8n0nfa0s> Recv: 250-*DOMAIN*
[21-Feb-2019 09:48:09 +0300]: <8n0nfa0s> Recv: 250-PIPELINING
[21-Feb-2019 09:48:09 +0300]: <8n0nfa0s> Recv: 250-SIZE 10240000
[21-Feb-2019 09:48:09 +0300]: <8n0nfa0s> Recv: 250-VRFY
[21-Feb-2019 09:48:09 +0300]: <8n0nfa0s> Recv: 250-ETRN
[21-Feb-2019 09:48:09 +0300]: <8n0nfa0s> Recv: 250-STARTTLS
[21-Feb-2019 09:48:09 +0300]: <8n0nfa0s> Recv: 250-ENHANCEDSTATUSCODES
[21-Feb-2019 09:48:09 +0300]: <8n0nfa0s> Recv: 250-8BITMIME
[21-Feb-2019 09:48:09 +0300]: <8n0nfa0s> Recv: 250 DSN
[21-Feb-2019 09:48:09 +0300]: <8n0nfa0s> Send: MAIL FROM:<admin@*DOMAIN*>
[21-Feb-2019 09:48:09 +0300]: <8n0nfa0s> Recv: 250 2.1.0 Ok
[21-Feb-2019 09:48:09 +0300]: <8n0nfa0s> Send: RCPT TO:<admin@*DOMAIN*>
[21-Feb-2019 09:48:09 +0300]: <8n0nfa0s> Recv: 250 2.1.5 Ok
[21-Feb-2019 09:48:09 +0300]: <8n0nfa0s> Send: DATA
[21-Feb-2019 09:48:09 +0300]: <8n0nfa0s> Recv: 354 End data with <CR><LF>.<CR><LF>
[21-Feb-2019 09:48:09 +0300]: <8n0nfa0s> Send: MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8;
 format=flowed
Content-Transfer-Encoding: 8bit
Date: Thu, 21 Feb 2019 09:48:09 +0300
From: admin@*DOMAIN*
To: admin@*DOMAIN*
Subject: =?UTF-8?Q?=D1=84=D0=B0=D1=84?=
Message-ID: <59fe8aca337dfe66045682d73eda1cf3@*DOMAIN*>
X-Sender: admin@*DOMAIN*
User-Agent: Roundcube Webmail/1.3.8

test
[21-Feb-2019 09:48:09 +0300]: <8n0nfa0s> Send:
.
[21-Feb-2019 09:48:09 +0300]: <8n0nfa0s> Recv: 250 2.0.0 Ok: queued as D459022B95E1
[21-Feb-2019 09:48:09 +0300]: <8n0nfa0s> Send: QUIT
[21-Feb-2019 09:48:09 +0300]: <8n0nfa0s> Recv: 221 2.0.0 Bye

Offline maximise

  • Jr. Member
  • **
  • Posts: 18
Re: Why SMTP Error (250): Authentication failed?
« Reply #16 on: February 21, 2019, 02:01:07 AM »
Turn on debugging and check the Roundcube logs. Maybe you overwrote your config file? And the defaults are hitting the wrong port on the server that doesn't support authentication.

Port = 25 on all config files.

Quote
Did you git pull from a release tag or master?

I don't understand what you mean.

Offline maximise

  • Jr. Member
  • **
  • Posts: 18
Re: Why SMTP Error (250): Authentication failed?
« Reply #17 on: February 22, 2019, 01:41:12 AM »
I can't find the problem  :(

Offline maximise

  • Jr. Member
  • **
  • Posts: 18
Re: Why SMTP Error (250): Authentication failed?
« Reply #18 on: February 22, 2019, 03:10:20 AM »
My postfix smtp config:

virtual_mailbox_base = /home/mail
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 1024
virtual_uid_maps = static:1024
virtual_gid_maps = static:1024
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1

smtpd_sasl_auth_enable = yes
smtpd_sasl_exceptions_networks = $mynetworks
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = /var/spool/postfix/private/auth

smtpd_tls_cert_file = /etc/ssl/mail/public.pem
smtpd_tls_key_file = /etc/ssl/mail/private.key
smtpd_use_tls = yes
smtpd_tls_auth_only = yes



Offline maximise

  • Jr. Member
  • **
  • Posts: 18
Re: Why SMTP Error (250): Authentication failed?
« Reply #19 on: February 25, 2019, 07:59:47 AM »

Offline maximise

  • Jr. Member
  • **
  • Posts: 18
Re: Why SMTP Error (250): Authentication failed?
« Reply #20 on: March 04, 2019, 02:34:11 AM »
Any solutions ?

Offline sathish

  • Newbie
  • *
  • Posts: 2
Re: Why SMTP Error (250): Authentication failed?
« Reply #21 on: March 26, 2019, 06:51:52 AM »
Why SMTP Error (220): Authentication failed?

Guys can u help me out about this problem too..!!
SMTP Error (220)

I am unable to send a mail from roundcube webmail but its working in outlook and Thunderbird mail clients.

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,845
Re: Why SMTP Error (250): Authentication failed?
« Reply #22 on: March 26, 2019, 02:40:33 PM »
That message comes from your SMTP server. Check your Roundcube config to ensure you have the correct authentication settings for your setup and may be have a look at the SMTP logs to see if there is any more info about why it failed. Just as an example if Roundcube and your SMTP server are on the same machine some setups only require authentication on remote connections not local ones.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline PavelD

  • Newbie
  • *
  • Posts: 2
Re: Why SMTP Error (250): Authentication failed?
« Reply #23 on: November 08, 2019, 02:31:52 AM »
Its a roundcube strange behavior.
First scenario: we use default smtp_server and default smtp_port.
When SMTP server configured to force tls connection on submission its no offer AUTH (but it offers STARTTLS) before secure connection established, and roundcube just show 250 error (in logs we can see "SMTP Error: Authentication failure: SMTP server does not support authentication", which not true), instead of establish TLS connection before trying to authenticate.
 Connecting to localhost:587...
 Recv: 220 <host> ESMTP Postfix
 Send: EHLO <host>
 Recv: 250-<host>
 Recv: 250-PIPELINING
 Recv: 250-SIZE 73400320
 Recv: 250-ETRN
 Recv: 250-STARTTLS
 Recv: 250-ENHANCEDSTATUSCODES
 Recv: 250-8BITMIME
 Recv: 250 DSN
 Send: QUIT
 Recv: 221 2.0.0 Bye

Second scenario: we use smtp_server = tls://<host> and default smtp_port.
All the same, but roundcube establish tls connection and then just send QUIT and we see a 220 error message. In logs we can see "SMTP Error: Authentication failure: STARTTLS failed", but SMTP server says "Anonymous TLS connection established" and right next "lost connection afer STARTTLS".
 Connecting to tls://localhost:587...
 Recv: 220 <host> ESMTP Postfix
 Send: EHLO <host>
 Recv: 250-<host>
 Recv: 250-PIPELINING
 Recv: 250-SIZE 73400320
 Recv: 250-ETRN
 Recv: 250-STARTTLS
 Recv: 250-ENHANCEDSTATUSCODES
 Recv: 250-8BITMIME
 Recv: 250 DSN
 Send: STARTTLS
 Recv: 220 2.0.0 Ready to start TLS
 Send: QUIT

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,845
Re: Why SMTP Error (250): Authentication failed?
« Reply #24 on: November 08, 2019, 12:59:28 PM »
have a look at this https://github.com/roundcube/roundcubemail/wiki/FAQ#problems-connecting-imapsmtp-server-via-ssltls because you are using `localhost` for your connection there is no way the cert is going to verify so you'll need to disable certificate verification.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline PavelD

  • Newbie
  • *
  • Posts: 2
Re: Why SMTP Error (250): Authentication failed?
« Reply #25 on: November 11, 2019, 02:30:13 AM »
Thanks for the info. Changing smtp_server to FQDN with valid certificate makes second scenario viable.