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

using scripts #210

Open
OrionRandD opened this issue Jun 29, 2020 · 21 comments
Open

using scripts #210

OrionRandD opened this issue Jun 29, 2020 · 21 comments

Comments

@OrionRandD
Copy link

I have mailnag installed via apt in my debian box.
It used to have a field in its configuration for me to add personal scripts.
I was using "xcowsay" in a script to warn me when new emails arrived in my
Inbox.
But, I have noticed, for some time now, that the field to add a path to my script just
desappeared from mailnag configuration.
Does that feature was removed?

@pulb
Copy link
Owner

pulb commented Jul 2, 2020

No, the userscript plugin is still included in mailnag. What version are you using?

@OrionRandD
Copy link
Author

OrionRandD commented Jul 3, 2020 via email

@OrionRandD
Copy link
Author

OrionRandD commented Jul 3, 2020 via email

@pulb
Copy link
Owner

pulb commented Jul 3, 2020 via email

@pulb
Copy link
Owner

pulb commented Jul 3, 2020 via email

@OrionRandD
Copy link
Author

OrionRandD commented Jul 5, 2020 via email

@pulb
Copy link
Owner

pulb commented Jul 5, 2020

Mailnag is added to ~/.config/autostart automatically if you toggle the enable switch in mailnag-config.
libsecret is used automatically if it's available on your system. it's a dependency of the debian package.
What mailnag version are you using and where did you get it from?

@pulb
Copy link
Owner

pulb commented Jul 5, 2020

Please also provide the output of journalctl -b _COMM=mailnag

@OrionRandD
Copy link
Author

OrionRandD commented Jul 5, 2020 via email

@pulb
Copy link
Owner

pulb commented Jul 5, 2020

Ok, so you got a crash due to an invalid email inbox. Can you please also post the contents of ~/.config/mailnag/mailnag.cfg?
Please also note that version 1.3 uses gnome-keyring to store passwords (if gir1.2-gnomekeyring-1.0 is installed), not libsecret.

@OrionRandD
Copy link
Author

OrionRandD commented Jul 5, 2020 via email

@pulb
Copy link
Owner

pulb commented Jul 5, 2020

Ok, please let the folders field empty for now and check the output of journalctl -b _COMM=mailnag.
It also seems you didn't activate the userscript plugin in mailnag-config.

@OrionRandD
Copy link
Author

OrionRandD commented Jul 5, 2020 via email

@pulb
Copy link
Owner

pulb commented Jul 5, 2020

Please post the actual output

@OrionRandD
Copy link
Author

OrionRandD commented Jul 5, 2020 via email

@pulb
Copy link
Owner

pulb commented Jul 5, 2020

Maybe the plugin is not loaded successfully. Please run mailnag-config in a terminal and post the output here

@OrionRandD
Copy link
Author

-- Logs begin at Mon 2020-02-10 17:01:54 -03, end at Sun 2020-07-05 12:43:03 -03. --
jul 05 10:29:36 cypher mailnag[10322]: INFO (2020-07-05 10:29:36): Checking 1 email account(s).
jul 05 10:29:39 cypher mailnag[10322]: DEBUG (2020-07-05 10:29:39): Couldn't get Subject from message.
jul 05 10:29:42 cypher mailnag[10322]: WARNING (2020-07-05 10:29:42): Folder [Gmail] does not exist.
jul 05 10:29:42 cypher mailnag[10322]: ERROR (2020-07-05 10:29:42): Caught an exception.
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/Mailnag/daemon/mailnagdaemon.py", line 178, in _start
self._mailchecker.check(self._accounts)
File "/usr/local/lib/python2.7/dist-packages/Mailnag/daemon/mailchecker.py", line 58, in check
all_mails = self._mailsyncer.sync(accounts)
File "/usr/local/lib/python2.7/dist-packages/Mailnag/daemon/mails.py", line 219, in sync
rcv_lst = MailCollector(self._cfg, accounts).collect_mail(sort = False)
File "/usr/local/lib/python2.7/dist-packages/Mailnag/daemon/mails.py", line 92, in collect_mail
acc.close()
File "/usr/local/lib/python2.7/dist-packages/Mailnag/common/accounts.py", line 102, in close
self._get_backend().close()
File "/usr/local/lib/python2.7/dist-packages/Mailnag/backends/imap.py", line 66, in close
self._disconnect(self._conn)
File "/usr/local/lib/python2.7/dist-packages/Mailnag/backends/imap.py", line 219, in _disconnect
conn.close()
File "/usr/local/lib/python2.7/dist-packages/Mailnag/common/imaplib2.py", line 669, in close
raise self.error('No mailbox selected.')
error: No mailbox selected.
jul 05 10:33:38 cypher mailnag[26488]: INFO (2020-07-05 10:33:38): Shutting down...
jul 05 10:39:42 cypher mailnag[10322]: INFO (2020-07-05 10:39:42): Checking 1 email account(s).
jul 05 10:39:43 cypher mailnag[10322]: DEBUG (2020-07-05 10:39:43): Couldn't get Subject from message.
jul 05 10:39:46 cypher mailnag[10322]: WARNING (2020-07-05 10:39:46): Folder [Gmail] does not exist.
jul 05 10:39:46 cypher mailnag[10322]: ERROR (2020-07-05 10:39:46): Caught an exception.
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/Mailnag/daemon/mailnagdaemon.py", line 197, in poll_func
self._mailchecker.check(non_idle_accounts)
File "/usr/local/lib/python2.7/dist-packages/Mailnag/daemon/mailchecker.py", line 58, in check
all_mails = self._mailsyncer.sync(accounts)
File "/usr/local/lib/python2.7/dist-packages/Mailnag/daemon/mails.py", line 219, in sync
rcv_lst = MailCollector(self._cfg, accounts).collect_mail(sort = False)
File "/usr/local/lib/python2.7/dist-packages/Mailnag/daemon/mails.py", line 92, in collect_mail
acc.close()
File "/usr/local/lib/python2.7/dist-packages/Mailnag/common/accounts.py", line 102, in close
self._get_backend().close()
File "/usr/local/lib/python2.7/dist-packages/Mailnag/backends/imap.py", line 66, in close
self._disconnect(self._conn)
File "/usr/local/lib/python2.7/dist-packages/Mailnag/backends/imap.py", line 219, in _disconnect
conn.close()
File "/usr/local/lib/python2.7/dist-packages/Mailnag/common/imaplib2.py", line 669, in close
raise self.error('No mailbox selected.')
error: No mailbox selected.
jul 05 11:19:39 cypher mailnag[50093]: INFO (2020-07-05 11:19:39): Shutting down...
jul 05 11:19:45 cypher mailnag[50130]: INFO (2020-07-05 11:19:45): Checking 1 email account(s).
jul 05 11:19:48 cypher mailnag[50130]: DEBUG (2020-07-05 11:19:48): Couldn't get Subject from message.
jul 05 11:20:22 cypher mailnag[50130]: INFO (2020-07-05 11:20:22): Shutting down...
jul 05 11:20:22 cypher mailnag[50130]: INFO (2020-07-05 11:20:22): Idler closed
jul 05 11:25:57 cypher mailnag[52142]: INFO (2020-07-05 11:25:57): Checking 1 email account(s).
jul 05 11:26:00 cypher mailnag[52142]: DEBUG (2020-07-05 11:26:00): Couldn't get Subject from message.
jul 05 11:26:27 cypher mailnag[52142]: INFO (2020-07-05 11:26:27): Shutting down...
jul 05 11:26:28 cypher mailnag[52142]: INFO (2020-07-05 11:26:28): Idler closed
jul 05 11:28:05 cypher mailnag[52855]: INFO (2020-07-05 11:28:05): Shutting down...
jul 05 11:28:14 cypher mailnag[52897]: INFO (2020-07-05 11:28:14): Checking 1 email account(s).
jul 05 11:28:16 cypher mailnag[52897]: DEBUG (2020-07-05 11:28:16): Couldn't get Subject from message.
jul 05 11:28:17 cypher mailnag[52897]: WARNING (2020-07-05 11:28:17): Folder [Gmail] does not exist.
jul 05 11:28:31 cypher mailnag[52897]: DEBUG (2020-07-05 11:28:31): Couldn't get Subject from message.
jul 05 11:28:50 cypher mailnag[52897]: INFO (2020-07-05 11:28:50): Shutting down...
jul 05 11:28:51 cypher mailnag[52897]: INFO (2020-07-05 11:28:51): Polling thread exited successfully.
jul 05 12:29:55 cypher mailnag[72874]: INFO (2020-07-05 12:29:55): Checking 1 email account(s).
jul 05 12:29:58 cypher mailnag[72874]: WARNING (2020-07-05 12:29:58): Folder [Gmail] does not exist.
jul 05 12:40:13 cypher mailnag[72874]: INFO (2020-07-05 12:40:13): Checking 1 email account(s).
jul 05 12:40:16 cypher mailnag[72874]: WARNING (2020-07-05 12:40:16): Folder [Gmail] does not exist.

@OrionRandD
Copy link
Author

(mailnag-config:78781): Gtk-CRITICAL **: 12:45:36.679: gtk_widget_event: assertion 'WIDGET_REALIZED_FOR_EVENT (widget, event)' failed

(mailnag-config:78781): Gtk-CRITICAL **: 12:45:36.952: gtk_widget_event: assertion 'WIDGET_REALIZED_FOR_EVENT (widget, event)' failed
Launching Mailnag daemon.
INFO (2020-07-05 12:46:00): Shutting down...
Traceback (most recent call last):
File "/usr/bin/mailnag", line 141, in
if name == 'main': main()
File "/usr/bin/mailnag", line 127, in main
daemon = MailnagDaemon(
File "/usr/lib/python3/dist-packages/Mailnag/daemon/mailnagdaemon.py", line 55, in init
accountman.load_from_cfg(self._cfg, enabled_only = True)
File "/usr/lib/python3/dist-packages/Mailnag/common/accounts.py", line 251, in load_from_cfg
password = self._secretstore.get(self._get_account_id(user, server, imap))
File "/usr/lib/python3/dist-packages/Mailnag/common/secretstore.py", line 45, in get
return Secret.password_lookup_sync(self._schema, {'id': secret_id}, None)
gi.repository.GLib.Error: g-dbus-error-quark: The name org.freedesktop.secrets was not provided by any .service files (2)

@OrionRandD
Copy link
Author

Now I purged mailnag from debian with "apt-get purge mailnag" and installed it from sources and upon lauching it I get this error:

mailnag-config
Traceback (most recent call last):
File "/usr/local/bin/mailnag-config", line 62, in do_activate
self.win = ConfigWindow(self)
File "/usr/local/lib/python3.8/dist-packages/Mailnag/configuration/configwindow.py", line 112, in init
self._load_config()
File "/usr/local/lib/python3.8/dist-packages/Mailnag/configuration/configwindow.py", line 127, in _load_config
self._accountman.load_from_cfg(self._cfg)
File "/usr/local/lib/python3.8/dist-packages/Mailnag/common/accounts.py", line 251, in load_from_cfg
password = self._secretstore.get(self._get_account_id(user, server, imap))
File "/usr/local/lib/python3.8/dist-packages/Mailnag/common/secretstore.py", line 45, in get
return Secret.password_lookup_sync(self._schema, {'id': secret_id}, None)
gi.repository.GLib.Error: g-dbus-error-quark: The name org.freedesktop.secrets was not provided by any .service files (2)

@OrionRandD
Copy link
Author

OrionRandD commented Jul 5, 2020

Something is really wrong here or either in mailnag itself.
:(

I've installed with "./setup.py install
As referenced in the installations instructions...

and it seems to be installed:

$ which mailnag
/usr/local/bin/mailnag

@pulb
Copy link
Owner

pulb commented Jul 5, 2020

  • you need to have package gir1.2-secret-1 installed
  • there is still a "[GMAIL]" folder specified in your mailnag.cfg
  • maybe you can try the 2.0 package from the official debian repos https://packages.debian.org/sid/mailnag

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

2 participants