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

keyring has broken user environment and scripts #173

Open
sudipm-mukherjee opened this issue Dec 24, 2023 · 5 comments
Open

keyring has broken user environment and scripts #173

sudipm-mukherjee opened this issue Dec 24, 2023 · 5 comments
Labels
question Further information is requested

Comments

@sudipm-mukherjee
Copy link
Contributor

sudipm-mukherjee commented Dec 24, 2023

General informations

  • system/distribution (with version): Debian
  • offlineimap version (offlineimap -V): packaged from SHA d29a4dc459401f8a78e347cb0f8ae7670add0975
  • Python version: 3.11.7
  • server name or domain: any domain, I have used gmail in the conf file.
  • CLI options: any, do not add ignore-keyring

Configuration file offlineimaprc

[general]
accounts = Gmail
utime_from_header = yes
filename_use_mail_timestamp = yes
maxconnections = 8

[Account Gmail]
localrepository = Gmail-Local
remoterepository = Gmail-Remote

[Repository Gmail-Local]
type = GmailMaildir
localfolders = ~/Mail/Gmail

[Repository Gmail-Remote]
type = Gmail
remoteuser = <userid>
realdelete = no
maxconnections = 8
maxsyncaccounts = 8
sslcacertfile = /etc/ssl/certs/ca-certificates.crt

Steps to reproduce the error

  • Use a Debian system with xfce4
  • Use the command offlineimap -o.
  • With old offlineimap3 it would have asked for password and then fetched the mail, But now offlineimap3 just hangs and does not ask for password.

ignore-keyring is False by default, and so offlineimap3 will check for password from keyring. So, all users will now need to modify their scripts or workflow to use offlineimap3. Since the new feature forces the users to modify their script/usage it should be considered as a regression.
Instead of ignore-keyring, there should have been an option enable-keyring and users who want to use keyring should have added it to their command or conf file. Since this is a new features, it is expected that users will need to modify their scripts to use it, instead of breaking all the other user's scripts.

@thekix I am marking enable-keyring as True in Debian for now, so that it does not break user's scripts and enviroment. One of the user mailed me today about it and I can reproduce the problem.

@sudipm-mukherjee sudipm-mukherjee changed the title keyring has broken user envirnment and scripts keyring has broken user environment and scripts Dec 24, 2023
@sudipm-mukherjee
Copy link
Contributor Author

On a System using gnome, it now asks to set password for keyring.

image

@sudipm-mukherjee
Copy link
Contributor Author

@thekix I am adding this patch:

--- offlineimap3-0.0~git20231218.d29a4dc+dfsg.orig/offlineimap/init.py
+++ offlineimap3-0.0~git20231218.d29a4dc+dfsg/offlineimap/init.py
@@ -284,7 +284,7 @@ class OfflineImap:
         # ignore_keyring? Set [general]ignore_keyring=True.
         if options.ignore_keyring:
             config.set('general', 'ignore-keyring', 'True')
-        config.set_if_not_exists('general', 'ignore-keyring', 'False')
+        config.set_if_not_exists('general', 'ignore-keyring', 'True')

         # update_keyring? Set [general]update_keyring=True.
         if options.update_keyring:

So, now any Debian user who wants to use keyring needs to menttion ignore-keyring = False in [general] of offlineimaprc.

@thekix
Copy link
Member

thekix commented Aug 15, 2024

Hi @sudipm-mukherjee

I added the patch to make keyring optional (Merge pull request #191 from WhyNotHugo/optional-keyring). Now it is working fine for you?

Best Regards,
kix

@thekix thekix added the question Further information is requested label Aug 15, 2024
@etbuira
Copy link

etbuira commented Aug 22, 2024

@sudipm-mukherjee, it is fixed in a better maintained fork (and drop-in replacement) https://github.com/IMAPMirror/imapmirror

@thekix
Copy link
Member

thekix commented Aug 26, 2024

@sudipm-mukherjee Please, try now with the latest changes. I think now this issue could be closed.

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

No branches or pull requests

3 participants