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 auth error after upgrade #8639

Closed
damnms opened this issue Jul 30, 2022 · 21 comments
Closed

smtp auth error after upgrade #8639

damnms opened this issue Jul 30, 2022 · 21 comments

Comments

@damnms
Copy link

damnms commented Jul 30, 2022

i had 1.5.3 running fine, then upgraded to 1.6.0, now i get an error. the error log contains:

[30-Jul-2022 16:19:01 +0200]: PHP Error: SMTP server does not support authentication (POST /?_task=mail&_unlock=loading1659190741401&_framed=1&_action=send)
[30-Jul-2022 16:19:01 +0200]: SMTP Error: Authentication failure: xxx.de
PIPELINING
SIZE 100000000
ETRN
STARTTLS
ENHANCEDSTATUSCODES
8BITMIME
DSN
SMTPUTF8
CHUNKING (Code: 250) in /var/lib/roundcube/program/lib/Roundcube/rcube.php on line 1795 (POST /?_task=mail&_unlock=loading1659190741401&_framed=1&_action=send)

debian stable

edit:
as i dont have time to dig further into this (and must have the web client working), i moved the old folder (/var/lib/roundcube_backup, containing 1.5.3) back to /var/lib/roundcube and moved the broken one (1.6.0) to /var/lib/roundcube_broken. works again now. so something seems to be broken in migrating from 1.5.3->1.6.0

@navossoc
Copy link
Contributor

Did you adjust your config.php?

https://github.com/roundcube/roundcubemail/releases/tag/1.6.0

There are some breaking changes, you will need to fix that first.

@damnms
Copy link
Author

damnms commented Jul 31, 2022

no i did not touch anything because the installer (updater) told me, it would do that for me. i answered 'y' in the dialog.

edit: just checked the old config and the new generated config, there is no smtp_server nor smtp_host in the new config. i'll try to see if that fixes it. then its a bug in the upgrade-function.

edit 2: i added that entry in the config, now i get that error in the log:

[31-Jul-2022 09:49:11 Europe/Berlin] PHP Fatal error: Uncaught Error: Call to undefined method Net_SMTP::starttls() in /var/lib/roundcube/program/lib/Roundcube/rcube_smtp.php:164
Stack trace:
#0 /var/lib/roundcube/program/lib/Roundcube/rcube.php(284): rcube_smtp->connect()
#1 /var/lib/roundcube/program/lib/Roundcube/rcube.php(1784): rcube->smtp_init()
#2 /var/lib/roundcube/program/include/rcmail_sendmail.php(425): rcube->deliver_message()
#3 /var/lib/roundcube/program/actions/mail/send.php(245): rcmail_sendmail->deliver_message()
#4 /var/lib/roundcube/program/include/rcmail.php(275): rcmail_action_mail_send->run()
#5 /var/lib/roundcube/index.php(278): rcmail->action_handler()
#6 {main}
thrown in /var/lib/roundcube/program/lib/Roundcube/rcube_smtp.php on line 164

whats wierd is, with 1.5.3 it was working like a charm. i also installed php-net-smtp for testing, did not made any difference (apt-get install)

@alecpl
Copy link
Member

alecpl commented Jul 31, 2022

You might need more recent Net_SMTP version for Roundcube 1.6. Also make sure you changed the config appropriately:

- renamed smtp_server to smtp_host
- removed smtp_port option (non-standard port can be set via smtp_host)
- set "localhost:587" as a default for smtp_host

@damnms
Copy link
Author

damnms commented Jul 31, 2022

is there more information about which version exactly is needed? it worked with 1.5.3, so if that changed, i would highly recommend to point that out in the README or UPGRADING, because then its broken with current debian stable.
regarding the settings: i would have expected the updater does exactly that.

@navossoc
Copy link
Contributor

navossoc commented Jul 31, 2022

is there more information about which version exactly is needed? it worked with 1.5.3, so if that changed, i would highly recommend to point that out in the README or UPGRADING, because then its broken with current debian stable. regarding the settings: i would have expected the updater does exactly that.

https://pear.php.net/package/Net_SMTP/download/1.10.0
It's available on 1.10.0.

@damnms
Copy link
Author

damnms commented Jul 31, 2022

the latest version available in debian stable is php-net-smtp 1.9.0-1
is it a must have to have that version or that package at all? why did it work in 1.5.3 even without that package?

@navossoc
Copy link
Contributor

the latest version available in debian stable is php-net-smtp 1.9.0-1 is it a must have to have that version or that package at all? why did it work in 1.5.3 even without that package?

The package is needed in both versions (1.5 or 1.6), there is call to that new method starttls so that why it is required on 1.6.

You can try to install pecl packages manually or something like docker.

@damnms
Copy link
Author

damnms commented Jul 31, 2022

The package is needed in both versions (1.5 or 1.6)

it worked without that package in 1.5.3

@navossoc
Copy link
Contributor

navossoc commented Jul 31, 2022

The package is needed in both versions (1.5 or 1.6)

it worked without that package in 1.5.3

AFAIK it was always needed.

Tag 1.5.0

* Class to provide SMTP functionality using PEAR Net_SMTP

$this->conn = new Net_SMTP($smtp_host, $smtp_port, $helo_host, false, 0, $CONFIG['smtp_conn_options'],

Did you checked the vendor folder?
vendor/pear/net_smtp

@damnms
Copy link
Author

damnms commented Jul 31, 2022

i am noob with php "administration/deployment", i have no idea of pear and so on, only basic php programming.
in that case it is not required to use apt-get to install any package at all, it is shipped with roundcube?
i have that folder in both, containing version 1.7.3

@navossoc
Copy link
Contributor

i am noob with php "administration/deployment", i have no idea of pear and so on, only basic php programming. in that case it is not required to use apt-get to install any package at all, it is shipped with roundcube?

Did you install the SMTP package from debian? If so, may be that the problem, since it may be using the wrong version.

@damnms
Copy link
Author

damnms commented Jul 31, 2022

i installed it after the error indicated that package is missing. i removed it now, so its the same state i was before. but that does not fix anything, because the vendor/pear/smtp thingen is still the old one.

@navossoc
Copy link
Contributor

navossoc commented Jul 31, 2022

You need to download the complete package to get the vendor folder as well...

https://github.com/roundcube/roundcubemail/releases/download/1.6.0/roundcubemail-1.6.0-complete.tar.gz

@damnms
Copy link
Author

damnms commented Jul 31, 2022

i downloaded the complete package

do i have to manually run pear/whatever to update the vendor packages?

@navossoc
Copy link
Contributor

I don't think so...

I suggest you first try a clean install on another VM with the same debian version, just to make sure is not on your current install.

Since the required libs are bundled on the complete package.
Maybe is something with your include_path on php.

I'm running it on docker, so I'm not having this problem. I don't think I can help more than that...

[]'s

@damnms
Copy link
Author

damnms commented Jul 31, 2022

i always download the complete package and then do a ./bin/installto /var/lib/roundcube, confirm the upgrade and keep going.
this time however it is somehow broken. what happens on a fresh install with this pear folder? the files do not magically go there, so maybe i can run that command by myself to get the latest versions of the vendor classes

@navossoc
Copy link
Contributor

navossoc commented Jul 31, 2022

The latest version 1.6.0 already comes with the required Net_SMTP version 1.10.

The clean install is just to avoid mess with your current install before you figure out what is going on.

@damnms
Copy link
Author

damnms commented Jul 31, 2022

in that case the updater does not overwrite the vendor classes, thats why it fails.
i will try to overwrite the old file with the new one and see if it works then.
that might get security related if there are old vendor packages that contain bugs and are not updated with the updater-script

edit: i can confirm that works. i was able to send an email now. so there are 2 problems:

  1. the migration does not correctly replace the deprecated configs and rename them correctly
  2. the updater does not overwrite/update the vendor packages

@navossoc
Copy link
Contributor

navossoc commented Jul 31, 2022

I think you should do it manually:
https://github.com/roundcube/roundcubemail/blob/master/UPGRADING#L45

But as I said, I'm using it on docker.
So it's always "fresh files" on each release.

[]'s

@damnms
Copy link
Author

damnms commented Aug 1, 2022

I think you should do it manually:

makes absolutely no sense if there is an update script that (should) do everything. as it does not, its a bug.

@damnms
Copy link
Author

damnms commented Aug 1, 2022

closing this and separate the 2 bugs

@damnms damnms closed this as completed Aug 1, 2022
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

3 participants