pulb / mailnag

An extensible mail notification daemon
GNU General Public License v2.0
253 stars 32 forks source link

Mailnag doesn' t work after connecting VPN sometimes or WiFi disappeared suddenly always #188

Closed SFBB closed 3 years ago

SFBB commented 5 years ago

Ubuntu 18.10 Mailnag 1.3.0

Hello,

1. VPN I just find that if I connected to a VPN, sometimes Mailnag won't work well even I clicked the "Check for Mail" button. I connected VPN at about 21:11:41. And I clicked the "Click for Mail" button at 21:13:29 and later to make Mailnag report some messages, otherwise, it will report nothing. Messages are like "Checking 0 email account(s)."

g[24177]: INFO (2019-05-13 21:11:40): Checking 1 email account(s). g[24177]: INFO (2019-05-13 21:11:41): Checking 1 email account(s). g[24177]: INFO (2019-05-13 21:11:41): Checking 1 email account(s). g[24177]: INFO (2019-05-13 21:11:41): Checking 1 email account(s). g[24177]: INFO (2019-05-13 21:11:41): Checking 1 email account(s). g[24177]: INFO (2019-05-13 21:11:41): Checking 1 email account(s). g[24177]: INFO (2019-05-13 21:13:29): Checking 0 email account(s). g[24177]: WARNING (2019-05-13 21:13:29): No internet connection. g[24177]: INFO (2019-05-13 21:13:34): Checking 0 email account(s). g[24177]: WARNING (2019-05-13 21:13:34): No internet connection. g[24177]: INFO (2019-05-13 21:13:38): Checking 0 email account(s). g[24177]: WARNING (2019-05-13 21:13:38): No internet connection. g[24177]: INFO (2019-05-13 21:18:13): Checking 0 email account(s). g[24177]: INFO (2019-05-13 21:18:14): Checking 0 email account(s). g[24177]: INFO (2019-05-13 21:18:16): Checking 0 email account(s).

2. WiFi And always after I make my WiFi disappear when my laptop still connected to it, Mailnag will have the same issue. For example, my laptop connected to my phone's mobile network, and I disabled the network on my phone when my laptop still connected to it, and after some minutes, I enabled this network, and make my computer connect to it, Mailnag will not work well.

g[19691]: INFO (2019-05-13 20:56:06): Checking 1 email account(s). g[19691]: INFO (2019-05-13 20:56:06): Checking 1 email account(s). g[19691]: INFO (2019-05-13 20:56:07): Checking 1 email account(s). g[19691]: INFO (2019-05-13 20:56:07): Checking 1 email account(s). g[19691]: INFO (2019-05-13 21:02:32): Checking 0 email account(s). g[19691]: INFO (2019-05-13 21:02:36): Checking 0 email account(s). g[19691]: INFO (2019-05-13 21:02:38): Checking 0 email account(s). g[19691]: INFO (2019-05-13 21:03:28): Checking 0 email account(s). g[19691]: INFO (2019-05-13 21:03:29): Checking 0 email account(s). g[19691]: INFO (2019-05-13 21:03:31): Checking 0 email account(s). g[19691]: INFO (2019-05-13 21:04:06): Checking 0 email account(s). g[19691]: INFO (2019-05-13 21:04:08): Checking 0 email account(s). g[19691]: INFO (2019-05-13 21:04:10): Checking 0 email account(s).

3. More Testing And I tested the sudo netstat -tup -W | column -t command to see if Mailnag is checking to my IMAP email sites, and the answer is no.

4. My Opinion Since I am not familiar with those things in python, I just can make some guesses. I think the VPN and WiFi issues are caused by the same exception. And you don't handle this exception. Maybe something related to dbus.

SFBB commented 5 years ago

Update

I used mailnag tomorrow, and suspend my laptop when I went to bed. And today, I opened my laptop, mailnag didn't work, and I had to restart it.

5月 19 21:07:27 tom-Inspiron-7566 mailnag[6659]: INFO (2019-05-19 21:07:27): Checking 1 email account(s). 5月 19 21:07:29 tom-Inspiron-7566 mailnag[6659]: INFO (2019-05-19 21:07:29): Checking 1 email account(s). 5月 19 21:07:32 tom-Inspiron-7566 mailnag[6659]: INFO (2019-05-19 21:07:32): Checking 1 email account(s). 5月 19 21:07:36 tom-Inspiron-7566 mailnag[6659]: INFO (2019-05-19 21:07:36): Checking 1 email account(s). 5月 19 21:07:39 tom-Inspiron-7566 mailnag[6659]: INFO (2019-05-19 21:07:39): Checking 1 email account(s). 5月 19 22:07:37 tom-Inspiron-7566 mailnag[6659]: ERROR (2019-05-19 22:07:37): Caught an exception. Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/Mailnag/daemon/mailnagdaemon.py", line 208, in sync_func self._mailchecker.check([account]) File "/usr/lib/python2.7/dist-packages/Mailnag/daemon/mailchecker.py", line 58, in check all_mails = self._mailsyncer.sync(accounts) File "/usr/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/lib/python2.7/dist-packages/Mailnag/daemon/mails.py", line 73, in collect_mail for folder, msg in acc.list_messages(): File "/usr/lib/python2.7/dist-packages/Mailnag/backends/imap.py", line 88, in list_messages conn.select(folder, readonly = True) File "/usr/lib/python2.7/dist-packages/Mailnag/common/imaplib2.py", line 976, in select typ, dat = rqb.get_response('command: %s => %%s' % rqb.name) File "/usr/lib/python2.7/dist-packages/Mailnag/common/imaplib2.py", line 173, in get_response raise typ(exc_fmt % str(val)) abort: command: EXAMINE => socket error: <class 'socket.error'> - [Errno 22] 无效的参数 5月 20 07:53:05 tom-Inspiron-7566 mailnag[6659]: Theme parsing error: gtk.css:6778:29: Missing opening bracket in color definition 5月 20 07:53:05 tom-Inspiron-7566 mailnag[6659]: Theme parsing error: gtk.css:6780:34: Missing opening bracket in color definition 5月 20 07:53:05 tom-Inspiron-7566 mailnag[6659]: Theme parsing error: gtk.css:6786:28: Missing opening bracket in color definition 5月 20 08:17:16 tom-Inspiron-7566 mailnag[6659]: INFO (2019-05-20 08:17:16): Shutting down... 5月 20 08:17:26 tom-Inspiron-7566 mailnag[6659]: WARNING (2019-05-20 08:17:26): Cleanup takes too long. Enforcing termination. 5月 20 08:17:26 tom-Inspiron-7566 mailnag[989]: INFO (2019-05-20 08:17:26): Successfully enabled plugin 'dbusplugin'. 5月 20 08:17:26 tom-Inspiron-7566 mailnag[989]: INFO (2019-05-20 08:17:26): Successfully enabled plugin 'libnotifyplugin'. 5月 20 08:17:26 tom-Inspiron-7566 mailnag[989]: INFO (2019-05-20 08:17:26): Successfully enabled plugin 'soundplugin'. 5月 20 08:17:26 tom-Inspiron-7566 mailnag[989]: INFO (2019-05-20 08:17:26): Checking 2 email account(s). 5月 20 08:17:43 tom-Inspiron-7566 mailnag[989]: INFO (2019-05-20 08:17:43): Checking 1 email account(s). 5月 20 08:17:45 tom-Inspiron-7566 mailnag[989]: INFO (2019-05-20 08:17:45): Checking 1 email account(s).

SFBB commented 5 years ago

Another Update

I downloaded your source coed and modified it to try to solve my issue. But I have no idea on it. And this exception occured. Modified souce code can be found in attach files. mailnag-master.zip

INFO (2019-05-20 09:07:33): imap_152 INFO (2019-05-20 09:07:33): imap_165 INFO (2019-05-20 09:07:33): idlers_87 INFO (2019-05-20 09:07:33): idlers_92 INFO (2019-05-20 09:07:33): idlers_92 INFO (2019-05-20 09:07:33): idlers_97 INFO (2019-05-20 09:07:33): imap_71 INFO (2019-05-20 09:07:33): idlers_100 INFO (2019-05-20 09:07:33): imap_71 INFO (2019-05-20 09:07:33): mailnagdaemon_258 INFO (2019-05-20 09:07:33): mailchecker_49 INFO (2019-05-20 09:07:33): Checking 1 email account(s). INFO (2019-05-20 09:07:33): mailchecker_53 INFO (2019-05-20 09:07:33): mailchecker_58 INFO (2019-05-20 09:07:33): conntest_77 INFO (2019-05-20 09:07:33): conntest_79 INFO (2019-05-20 09:07:33): mailchecker_63 INFO (2019-05-20 09:07:33): mails_216 INFO (2019-05-20 09:07:33): mails_61 INFO (2019-05-20 09:07:33): mails_65 INFO (2019-05-20 09:07:33): mails_67 INFO (2019-05-20 09:07:33): imap_71 INFO (2019-05-20 09:07:33): mails_75 INFO (2019-05-20 09:07:33): imap_71 INFO (2019-05-20 09:07:35): mails_90 INFO (2019-05-20 09:07:35): mails_96 INFO (2019-05-20 09:07:35): mails_220 INFO (2019-05-20 09:07:35): mails_227 INFO (2019-05-20 09:07:35): mails_239 INFO (2019-05-20 09:07:35): mails_249 INFO (2019-05-20 09:07:35): mailchecker_68 INFO (2019-05-20 09:07:35): mailchecker_84 INFO (2019-05-20 09:07:35): mailchecker_89 INFO (2019-05-20 09:07:35): mailchecker_96 INFO (2019-05-20 09:07:35): mailchecker_99 INFO (2019-05-20 09:07:35): mailchecker_111 INFO (2019-05-20 09:07:35): idlers_82 INFO (2019-05-20 09:07:35): imap_140 INFO (2019-05-20 09:07:35): imap_71 INFO (2019-05-20 09:07:35): imap_148 INFO (2019-05-20 09:07:35): imap_168 07:35.95 mail.zju.edu.cn handler last 20 log messages: INFO (2019-05-20 09:07:35): imap_152 INFO (2019-05-20 09:07:35): imap_165 INFO (2019-05-20 09:07:35): idlers_87 INFO (2019-05-20 09:07:35): idlers_92 INFO (2019-05-20 09:07:35): idlers_92 INFO (2019-05-20 09:07:35): idlers_97 INFO (2019-05-20 09:07:35): imap_71 INFO (2019-05-20 09:07:35): idlers_100 INFO (2019-05-20 09:07:35): imap_71 INFO (2019-05-20 09:07:35): mailnagdaemon_258 INFO (2019-05-20 09:07:35): mailchecker_49 INFO (2019-05-20 09:07:35): Checking 1 email account(s). INFO (2019-05-20 09:07:35): mailchecker_53 INFO (2019-05-20 09:07:35): mailchecker_58 INFO (2019-05-20 09:07:35): conntest_77 INFO (2019-05-20 09:07:35): conntest_79 INFO (2019-05-20 09:07:35): mailchecker_63 INFO (2019-05-20 09:07:35): mails_216 INFO (2019-05-20 09:07:35): mails_61 INFO (2019-05-20 09:07:35): mails_65 INFO (2019-05-20 09:07:35): mails_67 INFO (2019-05-20 09:07:35): imap_71 INFO (2019-05-20 09:07:35): mails_75 INFO (2019-05-20 09:07:35): imap_71 23:45.21 mail.zju.edu.cn reader last 20 log messages: WARNING (2019-05-20 09:23:45): Folder INBOX does not exist. INFO (2019-05-20 09:23:45): mails_90 INFO (2019-05-20 09:23:45): mails_96 INFO (2019-05-20 09:23:45): mails_220 INFO (2019-05-20 09:23:45): mails_227 INFO (2019-05-20 09:23:45): mails_239 INFO (2019-05-20 09:23:45): mails_249 INFO (2019-05-20 09:23:45): mailchecker_68 INFO (2019-05-20 09:23:45): mailchecker_84 INFO (2019-05-20 09:23:45): mailchecker_89 INFO (2019-05-20 09:23:45): mailchecker_96 INFO (2019-05-20 09:23:45): mailchecker_99 INFO (2019-05-20 09:23:45): mailchecker_111 INFO (2019-05-20 09:23:45): idlers_82 INFO (2019-05-20 09:23:45): imap_140 INFO (2019-05-20 09:23:45): imap_71 INFO (2019-05-20 09:23:45): imap_245 INFO (2019-05-20 09:23:45): Raising in imap.py INFO (2019-05-20 09:23:45): Raising in accounts.py INFO (2019-05-20 09:23:45): Retrying Exception in thread Thread-9: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner self.run() File "/usr/lib/python2.7/threading.py", line 754, in run self.target(*self.args, **self.__kwargs) File "/home/tom/文档/mailnag-master/Mailnag/daemon/idlers.py", line 88, in _idle raise InvalidOperationException("Account is not open") InvalidOperationException: Account is not open

SFBB commented 5 years ago

Third Update

Those exceptions happened after connecting VPN.

This time, in mailnagdaemon.py line 206, I added a "while true", and other code keep them original.

def sync_func(account): while True: try: self._mailchecker.check([account]) except: logging.exception('Caught an exception in mailnagdaemon.py.') pass else: logging.info("Breaking") break

And after the first exception, mailnag retried but another exception happened.

Shutting down existing Mailnag process...INFO (2019-05-21 11:40:43): Successfully enabled plugin 'dbusplugin'. INFO (2019-05-21 11:40:43): Successfully enabled plugin 'soundplugin'. INFO (2019-05-21 11:40:43): Successfully enabled plugin 'libnotifyplugin'. INFO (2019-05-21 11:40:43): Checking 2 email account(s). INFO (2019-05-21 11:40:55): Checking 0 email account(s). 40:56.22 mail.zju.edu.cn handler last 20 log messages: INFO (2019-05-21 11:40:56): Checking 1 email account(s). INFO (2019-05-21 11:40:57): Breaking 40:58.12 mail.zju.edu.cn handler last 20 log messages: INFO (2019-05-21 11:40:58): Checking 1 email account(s). INFO (2019-05-21 11:40:59): Breaking 40:59.97 mail.zju.edu.cn handler last 20 log messages: INFO (2019-05-21 11:40:59): Checking 1 email account(s). INFO (2019-05-21 11:41:01): Breaking 41:01.82 mail.zju.edu.cn handler last 20 log messages: INFO (2019-05-21 11:41:01): Checking 1 email account(s). INFO (2019-05-21 11:41:03): Breaking 41:03.87 mail.zju.edu.cn handler last 20 log messages: INFO (2019-05-21 11:41:03): Checking 1 email account(s). INFO (2019-05-21 11:41:05): Breaking 41:05.57 mail.zju.edu.cn handler last 20 log messages: INFO (2019-05-21 11:41:05): Checking 1 email account(s). INFO (2019-05-21 11:41:06): Breaking 41:07.57 mail.zju.edu.cn handler last 20 log messages: INFO (2019-05-21 11:41:07): Checking 1 email account(s). INFO (2019-05-21 11:41:08): Breaking 41:09.42 mail.zju.edu.cn handler last 20 log messages: INFO (2019-05-21 11:41:09): Checking 1 email account(s). INFO (2019-05-21 11:41:11): Breaking 41:12.27 mail.zju.edu.cn handler last 20 log messages: INFO (2019-05-21 11:41:12): Checking 1 email account(s). INFO (2019-05-21 11:41:13): Breaking 41:14.32 mail.zju.edu.cn handler last 20 log messages: INFO (2019-05-21 11:41:14): Checking 1 email account(s). INFO (2019-05-21 11:41:15): Breaking 41:16.32 mail.zju.edu.cn handler last 20 log messages: INFO (2019-05-21 11:41:16): Checking 1 email account(s). INFO (2019-05-21 11:41:18): Breaking 41:19.42 mail.zju.edu.cn handler last 20 log messages: INFO (2019-05-21 11:41:19): Checking 1 email account(s). INFO (2019-05-21 11:41:21): Breaking 41:21.87 mail.zju.edu.cn handler last 20 log messages: INFO (2019-05-21 11:41:21): Checking 1 email account(s). INFO (2019-05-21 11:41:23): Breaking 41:23.87 mail.zju.edu.cn handler last 20 log messages: INFO (2019-05-21 11:41:23): Checking 1 email account(s). INFO (2019-05-21 11:41:26): Breaking 41:26.77 mail.zju.edu.cn handler last 20 log messages: INFO (2019-05-21 11:41:26): Checking 1 email account(s). INFO (2019-05-21 11:41:28): Breaking 41:29.82 mail.zju.edu.cn handler last 20 log messages: INFO (2019-05-21 11:41:29): Checking 1 email account(s). INFO (2019-05-21 11:41:31): Breaking 41:31.62 mail.zju.edu.cn handler last 20 log messages: INFO (2019-05-21 11:41:31): Checking 1 email account(s). INFO (2019-05-21 11:41:33): Breaking 41:33.87 mail.zju.edu.cn handler last 20 log messages: INFO (2019-05-21 11:41:33): Checking 1 email account(s). INFO (2019-05-21 11:41:35): Breaking 41:35.67 mail.zju.edu.cn handler last 20 log messages: INFO (2019-05-21 11:41:35): Checking 1 email account(s). INFO (2019-05-21 11:41:37): Breaking 41:37.71 mail.zju.edu.cn handler last 20 log messages: INFO (2019-05-21 11:41:37): Checking 1 email account(s). INFO (2019-05-21 11:41:39): Breaking 41:40.46 mail.zju.edu.cn handler last 20 log messages: INFO (2019-05-21 11:41:40): Checking 1 email account(s). INFO (2019-05-21 11:41:42): Breaking INFO (2019-05-21 11:41:42): Checking 0 email account(s). 41:43.56 mail.zju.edu.cn handler last 20 log messages: INFO (2019-05-21 11:41:43): Checking 1 email account(s). INFO (2019-05-21 11:41:44): Breaking 41:45.61 mail.zju.edu.cn handler last 20 log messages: INFO (2019-05-21 11:41:45): Checking 1 email account(s). INFO (2019-05-21 11:41:48): Breaking 41:48.66 mail.zju.edu.cn handler last 20 log messages: INFO (2019-05-21 11:41:48): Checking 1 email account(s). INFO (2019-05-21 11:41:50): Breaking 41:51.76 mail.zju.edu.cn handler last 20 log messages: INFO (2019-05-21 11:41:51): Checking 1 email account(s). INFO (2019-05-21 11:41:52): Breaking 41:53.61 mail.zju.edu.cn handler last 20 log messages: INFO (2019-05-21 11:41:53): Checking 1 email account(s). INFO (2019-05-21 11:41:54): Breaking 41:55.61 mail.zju.edu.cn handler last 20 log messages: INFO (2019-05-21 11:41:55): Checking 1 email account(s). INFO (2019-05-21 11:41:56): Breaking 41:57.45 mail.zju.edu.cn handler last 20 log messages: INFO (2019-05-21 11:41:57): Checking 1 email account(s). INFO (2019-05-21 11:41:58): Breaking 41:59.50 mail.zju.edu.cn handler last 20 log messages: INFO (2019-05-21 11:41:59): Checking 1 email account(s). INFO (2019-05-21 11:42:00): Breaking 42:01.36 mail.zju.edu.cn handler last 20 log messages: INFO (2019-05-21 11:42:01): Checking 1 email account(s). INFO (2019-05-21 11:42:02): Breaking 42:03.20 mail.zju.edu.cn handler last 20 log messages: INFO (2019-05-21 11:42:03): Checking 1 email account(s). INFO (2019-05-21 11:42:04): Breaking 42:05.05 mail.zju.edu.cn handler last 20 log messages: INFO (2019-05-21 11:42:05): Checking 1 email account(s). INFO (2019-05-21 11:42:06): Breaking 42:07.10 mail.zju.edu.cn handler last 20 log messages: INFO (2019-05-21 11:42:07): Checking 1 email account(s). 57:45.00 mail.zju.edu.cn reader last 20 log messages: ERROR (2019-05-21 11:57:45): Caught an exception in mailnagdaemon.py. Traceback (most recent call last): File "/home/tom/文档/mailnag-master/mailnag-master/Mailnag/daemon/mailnagdaemon.py", line 209, in sync_func self._mailchecker.check([account]) File "/home/tom/文档/mailnag-master/mailnag-master/Mailnag/daemon/mailchecker.py", line 58, in check all_mails = self._mailsyncer.sync(accounts) File "/home/tom/文档/mailnag-master/mailnag-master/Mailnag/daemon/mails.py", line 219, in sync rcv_lst = MailCollector(self._cfg, accounts).collect_mail(sort = False) File "/home/tom/文档/mailnag-master/mailnag-master/Mailnag/daemon/mails.py", line 73, in collect_mail for folder, msg in acc.list_messages(): File "/home/tom/文档/mailnag-master/mailnag-master/Mailnag/backends/imap.py", line 88, in list_messages conn.select(folder, readonly = True) File "/home/tom/文档/mailnag-master/mailnag-master/Mailnag/common/imaplib2.py", line 976, in select typ, dat = rqb.get_response('command: %s => %%s' % rqb.name) File "/home/tom/文档/mailnag-master/mailnag-master/Mailnag/common/imaplib2.py", line 173, in get_response raise typ(exc_fmt % str(val)) abort: command: EXAMINE => socket error: <class 'socket.error'> - [Errno 22] 无效的参数 INFO (2019-05-21 11:57:45): Checking 1 email account(s). ERROR (2019-05-21 11:57:45): Failed to open mailbox for account 'Account Name' (Account is aready open). INFO (2019-05-21 11:57:45): Breaking Exception in thread Thread-9: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner self.run() File "/usr/lib/python2.7/threading.py", line 754, in run self.target(*self.args, *self.__kwargs) File "/home/tom/文档/mailnag-master/mailnag-master/Mailnag/daemon/idlers.py", line 78, in _idle self._account.notify_next_change(callback = self._idle_callback, timeout = 60 self._idle_timeout) File "/home/tom/文档/mailnag-master/mailnag-master/Mailnag/common/accounts.py", line 130, in notify_next_change self._get_backend().notify_next_change(callback, timeout) File "/home/tom/文档/mailnag-master/mailnag-master/Mailnag/backends/imap.py", line 140, in notify_next_change self._ensure_open() File "/home/tom/文档/mailnag-master/mailnag-master/Mailnag/backends/imap.py", line 236, in _ensure_open raise InvalidOperationException("Account is not open") InvalidOperationException: Account is not open

pulb commented 5 years ago

Can you please post the contents of ~/.config/mailnag/mailnag.cfg?

SFBB commented 5 years ago

Did some replacement of email address and user_name for privacy.

[spamfilterplugin]
filter_text = newsletter, viagra

[core]
imap_idle_timeout = 10
enabled_plugins = dbusplugin, soundplugin, libnotifyplugin
poll_interval = 10
credentialstore = auto
connectivity_test = auto
autostart = 1

[soundplugin]
soundfile = mailnag.ogg

[libnotifyplugin]
notification_mode = 1
max_visible_mails = 10

[account2]
enabled = 1
type = imap
name = My_User_Name(Asian Characters)
user = email_id
password = 
server = imap.zju.edu.cn
port = 993
ssl = 1
imap = 1
idle = 1
folder = []

[account1]
enabled = 1
type = imap
name = My_User_Name(English Characters)
user = email_id@outlook.com
password = 
server = imap-mail.outlook.com
port = 993
ssl = 1
imap = 1
idle = 1
folder = []

[userscriptplugin]
script_file = 
pulb commented 5 years ago

Confirmed.

alfabuster commented 5 years ago

I am using Ubuntu 19.04, after mailnag-config

mailnag-config                                                                                       
/usr/lib/python2.7/dist-packages/Mailnag/plugins/goaplugin.py:24: PyGIWarning: Goa was imported without specifying a version first. Use gi.require_version('Goa', '1.0') before import to ensure that the right version gets loaded.
  from gi.repository import Goa
Launching Mailnag daemon.

  den   OK                                                                                                   
/usr/lib/python2.7/dist-packages/Mailnag/plugins/goaplugin.py:24: PyGIWarning: Goa was imported without specifying a version first. Use gi.require_version('Goa', '1.0') before import to ensure that the right version gets loaded.
  from gi.repository import Goa
INFO (2019-07-29 18:01:19): Successfully enabled plugin 'dbusplugin'.
INFO (2019-07-29 18:01:19): Successfully enabled plugin 'libnotifyplugin'.
INFO (2019-07-29 18:01:19): Successfully enabled plugin 'soundplugin'.
INFO (2019-07-29 18:01:19): Successfully enabled plugin 'spamfilterplugin'.
INFO (2019-07-29 18:01:19): Successfully enabled plugin 'goaplugin'.
INFO (2019-07-29 18:01:19): Waiting for internet connection...
Sinutok commented 4 years ago

Ubuntu: 18.04 LTS Mailnag 1.2.1 (from the default repositories), and 1.3.0 Same Problem "Waiting for internet connection...." Wifi with VPN

pulb commented 4 years ago

@SFBB: your connection is terminated due to a socket error in the python2 implementation of imaplib. Mailnag has been ported to python3 recently - can you check out the latest code from master and see if the problem still persists?

@alfabuster @Sinutok please check if changing the conectivity_test setting from auto to ping in ~/.config/mailnag/mailnag.cfg will make it work for you.

etic4 commented 4 years ago

With VPN (wireguard) configured globally by provider application, launch at startup, dbus NetworManager connection state returned is 60 (ie NM_STATE_CONNECTED_SITE).

ConnectivityTest.is_offline() returns False if state != 70 (ie NM_STATE_CONNECTED_GLOBAL)

pulb commented 3 years ago

@machinbrol: Great finding, that's exactly what I was suspecting - when connected via VPN, the connection test indicates "offline" in networkmanager mode, since this mode checks for a direct internet connection.

Can somebody please confirm if changing the conectivity_test setting from auto to ping in ~/.config/mailnag/mailnag.cfg will fix the issue?

pulb commented 3 years ago

This should realy be fixed now. Can somebody please

alfabuster commented 3 years ago

This should realy be fixed now. Can somebody please

* Donwload the latest [zip](https://github.com/pulb/mailnag/archive/master.zip)

* Extract it

* Run ./mailnag in a terminal and post the output here (in both cases - if the probem is solved and in case it's still failing)
Shutting` down existing Mailnag process...OK
INFO (2021-01-26 18:00:47): Successfully enabled plugin 'libnotifyplugin'.
INFO (2021-01-26 18:00:47): Successfully enabled plugin 'soundplugin'.
INFO (2021-01-26 18:00:47): Successfully enabled plugin 'spamfilterplugin'.
INFO (2021-01-26 18:00:47): Checking 1 email account(s).
ERROR (2021-01-26 18:00:49): Failed to open mailbox for account '...@gmail.com (Gmail)' (b'[ALERT] Application-specific password required: https://support.google.com/accounts/answer/185833 `(Failure)')
pulb commented 3 years ago

@alfabuster this is onaother, Gmail specific issue, please have a look at the troubleshooting section of the readme.

alfabuster commented 3 years ago

@pulb Ok. Continue... This is maybe the longest time I spent for make program work...

./mailnag                                                         
Shutting down existing Mailnag process...OK
INFO (2021-01-27 20:58:20): Successfully enabled plugin 'libnotifyplugin'.
INFO (2021-01-27 20:58:20): Successfully enabled plugin 'soundplugin'.
INFO (2021-01-27 20:58:20): Successfully enabled plugin 'spamfilterplugin'.
INFO (2021-01-27 20:58:20): Checking 1 email account(s).
ERROR (2021-01-27 21:02:38): Failed to open mailbox for account '...@gmail.com' ([Errno 99] Cannot assign requested address).
pulb commented 3 years ago

@alfabuster i googled this up. This seems to be a gmail issue related to your environment/port setup. Are you behind a firewall/connected to a VPN?

alfabuster commented 3 years ago

@pulb Yes, I use nordvpn now...

pulb commented 3 years ago

Ok so this seems to be a port configuration problem of your vpn. It's not mailnag related, every other app accessing that port will have that issue.

alfabuster commented 3 years ago

Ok. But without VPN same problem. It seems like google close connection or something like that...

pulb commented 3 years ago

"Cannot assign requested address" means mailnag cannot bind to the specified mail server at the specified port. There must be something wrong with your network/routing setup. What mail server/port did you enter?

Am 27. Januar 2021 19:22:06 MEZ schrieb alfabuster notifications@github.com:

Ok. But without VPN same problem. It seems like google close connection or something like that...

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/pulb/mailnag/issues/188#issuecomment-768480046

alfabuster commented 3 years ago

I used same settings like in this tutorial only password what google give me 16 symbols... image

pulb commented 3 years ago

Should be fixed in 2.2.0 release. @alfabuster: Please open a new issue regarding your problem, it's not related to this issue.