Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SMTP Error: Authentication failure: SMTP server does not support authentication #7130

Closed
madcreativebg opened this issue Dec 26, 2019 · 9 comments

Comments

@madcreativebg
Copy link

Hello,

I get the error when trying to send mail:

[27-Dec-2019 00:16:41 +0200]: SMTP Error: Authentication failure: SMTP server does not support authentication (Code: ) in /usr/share/nginx/html/webmail/program/lib/Roundcube/rcube.php on line 1689 (POST /webmail/?_task=mail&_unlock=loading1577398601567&_framed=1&_lang=bg&_action=send)

when using Roundcube 1.4.1. With Roundcube 1.3.10 on the same server and settings there is no problem.

@alecpl
Copy link
Member

alecpl commented Dec 27, 2019

Some config defaults changed in 1.4. See #7011. Because smtp_pass/smtp_user is now set and your server does not allow authentication over insecure channel, you have to either disable authentication (clearing smtp_pass/smtp_user) or add tls:// prefix to smtp_server.

@alecpl alecpl closed this as completed Dec 27, 2019
@johnnyutahh
Copy link

johnnyutahh commented Sep 2, 2020

... you have to either disable authentication (clearing smtp_pass/smtp_user)...

For me, "clearing" the variables means the following (assigning said variables to null does not seem to work in my Roundcube 1.4.3 rig):

$config['smtp_user'] = '';
$config['smtp_pass'] = '';

(This might be obvious to most Roundcube admins, but I'm a newbie.)

@trasherdk
Copy link

It could also mean to comment out those 2 lines. Did you try that?

@johnnyutahh
Copy link

johnnyutahh commented Sep 2, 2020

Thanks. I just did. Commenting out the above lines in /etc/roundcube/config.inc.php does not work. (The SMTP auth fails when attempting to send an email.) Setting the variables = '' (an empty string) seems to be the only way to do make an SMTP-server-with-no-auth work (to send an email).

So there seems to be 3 different ways one can interpret "clearing" a variable, depending on the context:

  1. set variable to empty string
  2. set variable to null
  3. comment out the variable (although said variable could be defined in another area)

If there's enough confusion in the Roundcube community about this, would it be helpful to clarify things surrounding "clearing a variable"?

@RichyT
Copy link

RichyT commented Jan 20, 2021

I have an SMTP server with no auth for the local subnet. I came here because although I unclicked "Use the current IMAP username and password for SMTP authentication", it wasn't clear that I had to delete the %u and %p to not use them and I was getting SMTP auth failures. Not to step on toes but I would suggest this could be cleaned up a little as it's a bit ambiguous.

(Edit: To be clear, it's all working fine now though 👍)

@GwynethLlewelyn
Copy link

Piping in late on a two-year-old closed thread, but since I have also encountered the same error, I'd like just to add my .02 ...

Under PHP 7.4/Roundcube 1.4.3, 'clearing' those variables really means:

$config['smtp_user'] = '';
$config['smtp_pass'] = '';

Setting them to null will not work.

Under Ubuntu 20.04, Roundcube will be installed with at least a defaults.inc.php which gets loaded before config.inc.php (as it should be). So, skipping those two settings will not work, since defaults.inc.php has the following settings:

$config['smtp_user'] = '%u';
$config['smtp_pass'] = '%p';

So these two configuration variables must be explicitly overwritten in config.inc.php with the empty string '', or else SMTP will refuse to authenticate.

Of course, some Roundcube configurations may be even more convoluted and include several other configuration files beyond these. Actually, I had a few of those around, which I thought weren't being included, but, to be on the safe side, I backed them up and deleted them — just keeping defaults.inc.php around, since it's expectable that it will be overwritten with sensible defaults when Roundcube 1.4.4 ships. In other words, if the only configuration file you have is defaults.inc.php, do not touch it, but keep it intact, and just override what you wish/need on config.inc.php. I believe that at least those two are guaranteed to work, but it's possible that some configurations only ship with defaults.inc.php (and you need to add your own config.inc.php) or possible just config.inc.php, filled in with all possible configuration values, which you may change — until the next Roundcube version comes around and wipes it clean...

An extra 👍 on the request for documenting this properly! After all, it might just require an extra comment line on defaults.inc.php... as @johnnyutahh so well mentioned, there are at least 3 ways to interpret 'clearing', according to context (i.e. each configuration variable may be 'cleared' differently...).

@Goe66els
Copy link

Goe66els commented Dec 2, 2021

... you have to either disable authentication (clearing smtp_pass/smtp_user)...

For me, "clearing" the variables means the following (assigning said variables to null does not seem to work in my Roundcube 1.4.3 rig):

$config['smtp_user'] = '';
$config['smtp_pass'] = '';

(This might be obvious to most Roundcube admins, but I'm a newbie.)

А ларчик просто открывался, 3 дня гугления проб и ошибок... Чувак ты сделал мой день. Спасибо!!!!!

thank you dear friend you made my day !!!

@trasherdk
Copy link

After a new installation Roundcube Webmail 1.6.5, 3 years later, I got bitten by this thing, again 😢

$config['smtp_user'] = '';
$config['smtp_pass'] = '';

Overriding the default fixes that problem.

@ETNyx
Copy link

ETNyx commented Jan 21, 2024

Same error, fix suggested in first response works too,...

// default.inc.php
$config['smtp_server'] = 'localhost';
// config.inc.php
$config['smtp_server'] = 'tls://localhost';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants