mail-in-a-box / mailinabox

Mail-in-a-Box helps individuals take back control of their email by defining a one-click, easy-to-deploy SMTP+everything else server: a mail server in a box.
https://mailinabox.email/
Creative Commons Zero v1.0 Universal
13.95k stars 1.44k forks source link

Python 3.10.12 breaks backup.py #2295

Open AussieTerror opened 1 year ago

AussieTerror commented 1 year ago

Hi All,

I am looking into this, but have noticed after yesterdays updates to python in Ubuntu 22.04.3 that the duplicity command line options '--gpg-options:' previously used by MIAB no longer work and is now expecting a different argument.

Aug 9 09:34:05 box start[2170]: duplicity collection-status: error: argument --gpg-options: expected one argument

I suspect the duplicity isn't the cause as there is only one argument used in the backup.py script '--cipher-algo=AES256"' .

Upon trying to switch back to local backups I also receive an error: in the Admin page

<!doctype html> <html lang=en> <title>500 Internal Server Error</title> <h1>Internal Server Error</h1> <p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>

jeremitu commented 1 year ago

See #2294. You need to downgrade duplicity to 1.2.3. See also Duplicity 732 and Duplicity 727.

AussieTerror commented 1 year ago

See #2294. You need to downgrade duplicity to 1.2.3. See also Duplicity 732 and Duplicity 727.

Tried that before posting, it didn't resolve it unfortunately.

jvolkenant commented 1 year ago

We use ppa repo for duplicity

root@m:~/mailinabox# cat /etc/apt/sources.list.d/duplicity-team-ubuntu-duplicity-release-git-jammy.list
deb https://ppa.launchpadcontent.net/duplicity-team/duplicity-release-git/ubuntu/ jammy main
# deb-src https://ppa.launchpadcontent.net/duplicity-team/duplicity-release-git/ubuntu/ jammy main

There is no duplicity 1.2.3 package for 22.04 to downgrade to anymore https://ppa.launchpadcontent.net/duplicity-team/duplicity-release-git/ubuntu/pool/main/d/duplicity/

There are two versions available (at least for me) in apt

root@m:~/mailinabox# apt list -a duplicity
Listing... Done
duplicity/jammy 2.0.0-ppa202308071821~ubuntu22.04.1 amd64 [upgradable from: 0.8.21-1build1]
duplicity/jammy,now 0.8.21-1build1 amd64 [installed,upgradable to: 2.0.0-ppa202308071821~ubuntu22.04.1]

I downgraded to 0.8.21-1build1 and was able to run ok

apt-get install duplicity=0.8.21-1build1

And hold that package until a 2.0.0+ update fixes things (or we have to rework the cli arguments)

apt-mark hold duplicity
jvolkenant commented 1 year ago

2.0.0 has been removed https://gitlab.com/duplicity/duplicity/-/issues/732 confirmed that only 1.2.3 exists now on https://ppa.launchpadcontent.net/duplicity-team/duplicity-release-git/ubuntu/pool/main/d/duplicity/

dms00 commented 1 year ago

I've just submitted this patch, https://github.com/mail-in-a-box/mailinabox/pull/2301, to fix the issue where duplicity complains about the --gpg-options parameter expecting one value. This is my first PR with mailinabox, so apologies if I haven't followed the correct process/workflow here. I haven't used this workflow for years.