Commit Graph

87 Commits

Author SHA1 Message Date
holger krekel 243f1cf593 address @dignifiedquire err.to_string() comment and avoid extra virtualenv building 2019-11-22 10:50:36 +01:00
holger krekel 0cd3dfa872 some comments fix imap->inbox naming in example 2019-11-22 10:50:36 +01:00
holger krekel e73978a156 simplify double-fetching 2019-11-22 10:50:36 +01:00
holger krekel bdb36fb862 merge JobThread::connect_to_imap with Imap::connect_configured for simplicity 2019-11-22 10:50:36 +01:00
holger krekel ea882c18f3 resultify fetch and simplify fake_idle 2019-11-22 10:50:36 +01:00
holger krekel fa5a24febd proper handling of IdleResponse codes 2019-11-22 10:50:36 +01:00
holger krekel a711b6efab remove context.inbox in favour of a context.inbox_thread following the mvbox_thread and sentbox_thread patterns. Also some streamlining of shutdown logic. 2019-11-22 10:50:36 +01:00
holger krekel 267518094b resultify some imap operations 2019-11-22 10:50:36 +01:00
holger krekel 9ce2a5a81a reconfigure running of rust and python tests 2019-11-22 10:50:36 +01:00
holger krekel 8925203873 introduce a trigger_reconnect helper 2019-11-22 10:50:36 +01:00
holger krekel 96f3438b5c shortcut fetch/idle on mvbox/sentbox if we don't know the folder and prevent busy-looping 2019-11-22 10:50:16 +01:00
holger krekel b69c1be13c steramline some teardown decision code, and add webpki_roots for cert-checking 2019-11-22 10:50:16 +01:00
holger krekel 464eef9e20 * fix interrupt_idle by signalling "skip_next_idle_wait" to the potentially concurrently "fn idle" function
* fixes double-export issue
2019-11-22 10:49:57 +01:00
holger krekel fb32d159d8 make select_folder return ImapActionResult's and early-return from idle if there is no selected folder 2019-11-22 10:49:57 +01:00
dignifiedquire 2dfe24dbfc cleanup imap impl 2019-11-22 10:49:04 +01:00
dignifiedquire b1fad7d284 implement idle again 2019-11-22 10:47:51 +01:00
dignifiedquire 6e0f10f283 it compiles with async-imap, remove local dependency 2019-11-22 10:43:37 +01:00
holger krekel 911c0e45dc expose empty server functionality and test it (also introducing a new DC_EVENT_IMAP_FOLDER_EMPTIED event) 2019-10-29 22:19:13 +01:00
holger krekel 7628ee1e05 rust-part of empty_server 2019-10-29 22:19:13 +01:00
holger krekel de3e5e1c39 fix deadlock issue with config access 2019-10-29 16:08:24 +01:00
B. Petersen 27627b4f74 show better error message for a simple 'bad credentials' error and give some more hints for other errors 2019-10-29 16:08:24 +01:00
Floris Bruynooghe c8d296ea0e A MsgId newtype
This more strongly types the ubiquitous message id type by no longer
making it an integer.  It keeps the actual ID opaque.  Only for the
generic job API the number keeps being used.  Some locations also need
to create it from an integer and call MsgId::new().
2019-10-29 15:30:53 +01:00
holger krekel b4464ab0a3 address @dignifiedquire comments 2019-10-28 20:51:17 +01:00
holger krekel 1cc4f56025 make imap-idle survive disconnects (during and at the beginning of an app) 2019-10-28 20:51:17 +01:00
holger krekel 1d03e0822e seems to work 2019-10-28 20:51:17 +01:00
B. Petersen 049077f13b reconnect on io errors and broken pipes 2019-10-22 09:58:05 +02:00
dignifiedquire 076616bfb9 fix(imap): read server greeting 2019-10-20 13:10:17 +02:00
Alexander Krotov 66e53e6804 Return bool from Imap::fetch()
It is unused anyway
2019-10-11 21:52:47 +02:00
holger krekel 7f5b362eda remove ok_to_continue and simplify/refactor imap and smtp connection trying
address @r10s review comments and also remove unneccessary "unsafe fn"
2019-10-07 13:39:01 +02:00
B. Petersen 2317518e5e cargo fmt 2019-10-04 23:07:34 +02:00
B. Petersen 477af413c6 if in doubt, prefer unwrap_or_default()
if the past we had lots of crashes because of unexpected unwrap failures,
mostly related to string.
this commit avoids them eg. for string-conversions that may panic
eg. when encountering a null-byte or by logical programming errors
where an object is assumed to be set but is not under unexpected circumstances.
2019-10-04 23:07:33 +02:00
B. Petersen 93f0f5ccae rename sql-config-setters to set_raw_config*()
the rename is reasonable as the getter is called get_raw_config*()
and to make the functional difference to context.set|get_config() clearer.
2019-10-04 11:18:26 +02:00
B. Petersen dca9afa10b rename sql.get_config() to sql.get_raw_config() to make clearer that there is not default handling 2019-10-03 17:35:43 +02:00
Alexander Krotov 130d485cac Fix some clippy warnings 2019-10-03 14:30:40 +02:00
Alexander Krotov 216266d7bf Apply imap_certificate_checks config to StartTLS connections 2019-10-03 02:02:51 +03:00
Alexander Krotov bf1652a1be Move common code for IMAP and SMTP to login_param.rs 2019-10-03 01:26:38 +03:00
Alexander Krotov 6343ae8161 Rename {mail,send}_certificate_checks into {imap,smtp}_certificate_checks 2019-10-03 01:26:07 +03:00
Alexander Krotov 063d989225 Use mail_certificate_checks configuration in imap.rs 2019-10-03 01:26:07 +03:00
holger krekel 509a21ff05 introduce DC_IMAP_MESSAGE_MOVED event and try harder to send out MDNs 2019-10-02 23:51:14 +02:00
holger krekel 96066712bd add and test for DC_IMAP_MESSAGE_DELETED event 2019-10-02 23:51:14 +02:00
holger krekel d83aa1e898 perform heuristic moves only if a job is not delete 2019-10-02 23:51:14 +02:00
holger krekel f0a7bdb6d6 properly parse message ids in imap prefetch 2019-10-02 23:51:14 +02:00
holger krekel 9c077c98cd remove MdnSent logic 2019-10-02 23:51:14 +02:00
holger krekel 6dc45642b7 rework API 2019-10-02 23:51:14 +02:00
holger krekel 86369148ee fix #616 -- allow invalid certs for smtp and imap connections -- this is the behaviour of C-core. 2019-09-27 21:44:21 +02:00
Alexander Krotov 3933353b5f Pass slice to dc_receive_imf
instead of pointer and length
2019-09-27 17:53:41 +03:00
dignifiedquire 0bdcc3d616 refactor(message): remove remaining unsafe and c types 2019-09-21 16:37:19 +02:00
dignifiedquire 1265016a55 refactor(message): rustiy api 2019-09-21 16:37:19 +02:00
Dmitry Bogatov 2f5d74dbf4 Remove unused constants from src/imap.rs 2019-09-20 17:35:26 +00:00
Dmitry Bogatov 4bf5ba594c Make Imap::set_mdnseen return enum, not int 2019-09-20 17:35:26 +00:00