Commit Graph

105 Commits

Author SHA1 Message Date
Patrick Ulbrich
3a9bd9f34b Use proper enums 2019-11-04 20:11:38 +01:00
Patrick Ulbrich
85855a35af Also fix assignments of that commit... 2019-10-28 19:31:15 +01:00
Patrick Ulbrich
4c18970e43 Fix lambda syntax of last commit 2019-10-28 19:27:10 +01:00
Patrick Ulbrich
210078447c Remove sort_mails() function 2019-10-28 19:24:50 +01:00
Patrick Ulbrich
965f91ad80 Fix wrong assignment of default subject 2019-10-28 19:14:45 +01:00
Patrick Ulbrich
6a9e0d7fb3 Remove bonkers _format_header_field() function 2019-10-27 18:01:59 +01:00
Patrick Ulbrich
63f21bf10c Replace MailCollector._convert() function by much shorter and more robust version by razer 2019-10-27 17:36:40 +01:00
Patrick Ulbrich
e7ad095937 Try to reconnect if an idle account can't be opened at the first try 2019-10-26 13:26:15 +02:00
Patrick Ulbrich
8464a5261a Remove uneccessary stuff from copyright headers 2019-10-22 19:13:15 +02:00
Patrick Ulbrich
c599706fb9 s/python2/python3/g 2019-10-19 17:28:32 +02:00
Patrick Ulbrich
d10831a995 Run '2to3 -W -n' on python files 2019-10-19 17:17:33 +02:00
Patrick Ulbrich
d576a6ba7a Merge pull request #165 from tikank/accountmembers
Refactorings related to Account class
2018-06-01 17:41:30 +02:00
Timo Kankare
74e987c94d Changed MailCollector._get_id() not to use server and user attributes of Account class, because not every account has those defined. Instead Account.get_id() is used. 2018-05-05 17:07:06 +03:00
Timo Kankare
88fdde4f46 Replaced references to Account idle and imap members with supports_notifications query. 2018-04-30 15:47:46 +03:00
Timo Kankare
a2939fd1c7 Replaced references to Account idle and imap members with supports_notifications
query.
2017-08-19 16:55:41 +03:00
Timo Kankare
00e91edf19 Removed reference to Accounts idle member. 2017-08-19 16:55:41 +03:00
Patrick Ulbrich
36bbff2079 Properly close connection if it has been reset by remote peer 2016-09-17 12:54:47 +02:00
Patrick Ulbrich
43cac375f3 Don't allow to re-open accounts (hack, not needed anymore) 2016-09-17 12:23:45 +02:00
Patrick Ulbrich
92b54e191b Remove obsolete code 2016-09-16 22:01:16 +02:00
Patrick Ulbrich
67e9aa7790 Comment fixes 2016-09-16 21:51:49 +02:00
Timo Kankare
0f058a83c7 Updated authors in modified files. 2016-09-16 17:52:40 +03:00
Timo Kankare
279cbd5efa Some cleanup. Renaming. Docstrings. Unused code removed. 2016-09-08 23:06:23 +03:00
Timo Kankare
3bdb85952d IMAP code moved from idlers.py to backends/imap.py.
Folder is always selected when new connection is opened, not only for idle accounts.
Callback is set using Account.notify_next_change method.
Connection abort checking in callback is moved to IMAP backend.
2016-09-07 22:46:50 +03:00
Timo Kankare
45677d081d Replaced protocol specific close with Account.close(). 2016-09-06 22:37:19 +03:00
Timo Kankare
1a0b2c9371 Removed duplicate code from mails.py. 2016-09-06 17:39:30 +03:00
Timo Kankare
f9dde27aff Extracted list_message code to account and backends. 2016-09-05 22:35:34 +03:00
Timo Kankare
c96d8fc8b7 Extracted close to account and backends. 2016-09-05 22:10:44 +03:00
Patrick Ulbrich
7321c117db Change PING_TEST_HOST to www.google.com 2016-07-18 17:59:06 +02:00
Patrick Ulbrich
f7ec6bacd3 Fix typo in idlers.py. Fixes #118 2016-03-31 12:50:58 +02:00
Patrick Ulbrich
337176fa19 Fix recurrent mails-removed signal 2016-02-24 18:49:51 +01:00
Patrick Ulbrich
546f1f7078 Add accountname to the Mail class and expose it via dbus
As requested in #84 and #96
2016-01-02 19:49:15 +01:00
Patrick Ulbrich
d7ee148912 Don't suppress exceptions occuring in Account.get_connection() 2015-04-18 16:44:23 +02:00
Patrick Ulbrich
a0371a0ee2 Remove accidently commited test output 2015-04-18 16:37:43 +02:00
Patrick Ulbrich
1288e531fa Rename srv into conn for the sake of consistancy 2015-04-18 14:09:52 +02:00
Patrick Ulbrich
ab71cf6304 Fix unitilized conn bug 2015-04-18 13:55:06 +02:00
Patrick Ulbrich
67fbc8fcdb Rename account.folder into account.folders and make it a list 2015-04-03 18:53:04 +02:00
Patrick Ulbrich
52b0a03c03 Move imaplib2 to common 2015-04-03 14:55:56 +02:00
Patrick Ulbrich
f01879c9c7 Add CredentialStore abstraction layer
* Add CredentialStore API
* Add CredentialStore implementation for GNOME keyring (makes GNOME keyring dependency optional)
* Further CredentialStore implementations (e.g. KDE) may be added to CredentialStore.py
* Mailnag tries to detect the supported CredentialStore backend automatically
* If no CredentialStore backend is supported on the system, Mailnag stores passwords in the config file (plaintext)
* A specific CredentialStore backend can be forced in the config file (currently one of 'auto', 'gnome', 'none')
* Closes issue #82
2015-01-27 17:07:28 +01:00
Patrick Ulbrich
dc8f1480f1 Misc improvements
* Remove bash scripts and start mailnag python scripts directly
  - Prevents duplicate process names
  - Fixes missing app icon in taskmanager
* Remove background startup functionality
  - Should be handled by modern init systems like systemd
    (see new-style-daemon: http://www.freedesktop.org/software/systemd/man/daemon.html)
  - Enables program termination via CTRL+C when running mailnag in a terminal
  - Doesn't hide the commandline prompt when running with options like --help (reported in issue #87)
  - Fixes wrapping issues in the log output
* Rename mailnagd into mailnag again
* Remove --backround option
* Fix and reorder module imports
* setup.py: patch BIN_DIR in dist_cfg
2014-12-19 21:22:45 +01:00
Patrick Ulbrich
cc164571b1 Add file missing in last commit 2014-12-13 17:04:05 +01:00
Patrick Ulbrich
7408cafe8c Improved connectivity tests, other fixes. Closes #86, #87
* Replace unreliable connectivity test by configurable ConnectivityTest
class
* Move connectivity check from main into MailnagDaemon
  (does no longer block if another instance tries to shutdown Mailnag)
* Fix crash occuring on failing Idler reconnect
* Log warning instead of error if no internet connection is available
2014-12-13 17:02:54 +01:00
Patrick Ulbrich
7a3843d932 Allow plugins to remove accounts 2014-12-07 21:01:50 +01:00
Patrick Ulbrich
d9a5291817 Don't pass the original AccountsList object to the ACCOUNTS_LOADED plugin hook
Prevents plugins from
* loading and saving accounts
* storing an internal reference to the original accounts list
* accessing the original accounts list after MailnagDaemon.dispose() has been called
2014-12-06 16:51:49 +01:00
Patrick Ulbrich
dece0102a8 Add ACCOUNTS_LOADED plugin hook, support OAuth2 authentication
* In preparation for GNOME Online Accounts Plugin
* Partially fixes #46
2014-12-06 16:40:16 +01:00
Patrick Ulbrich
5cf0ce63aa fixed MAILS_REMOVED hook logic 2014-05-29 21:07:12 +02:00
Patrick Ulbrich
72425ef05e renamed Reminder into Memorizer 2014-05-29 19:54:51 +02:00
Patrick Ulbrich
692649db16 only allow manual mail checks for non-idle accounts
(manually checking an idling account does abort the current idle state and results in two checks)
2014-03-23 17:02:59 +01:00
Patrick Ulbrich
9690234084 implemented mark-as-read feature, other fixes
implemented mark-as-read feature
refactored reminder class
don't write mailnag.dat on every mail check (only if its contend has changed)
minor other fixes
2014-02-23 19:13:54 +01:00
Patrick Ulbrich
113b3a1506 massive refactoring
* primary goal: reduce global vars, slim down main file
  (only do initialization of global stuff here, move everything else to a daemon class)
* properly close all open pop3/imap connections on shutdown
* throw/catch meaningful exceptions
* renamed IdleRunner/Idler run() methods to start() since 'run' suggests a blocking call (as in dialog.run())
2014-02-01 21:44:07 +01:00
Patrick Ulbrich
a71c7bce30 read imap idle timeout from the config file, just like the pop3 poll interval (fixes issue #60) 2014-01-07 20:31:06 +01:00