holger krekel
8ef0ea8aea
simplify double-fetching
2019-11-22 12:28:19 +01:00
holger krekel
34c766dc2b
merge JobThread::connect_to_imap with Imap::connect_configured for simplicity
2019-11-22 12:28:19 +01:00
holger krekel
a30fa710ad
resultify fetch and simplify fake_idle
2019-11-22 12:28:19 +01:00
holger krekel
fa01884350
proper handling of IdleResponse codes
2019-11-22 12:28:19 +01:00
holger krekel
eae9ad6f8b
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 12:28:19 +01:00
holger krekel
be533fa66a
resultify some imap operations
2019-11-22 12:28:19 +01:00
holger krekel
8e7dc5e86f
reconfigure running of rust and python tests
2019-11-22 12:28:19 +01:00
holger krekel
e13ce3140b
introduce a trigger_reconnect helper
2019-11-22 12:28:19 +01:00
holger krekel
0405c945e2
shortcut fetch/idle on mvbox/sentbox if we don't know the folder and prevent busy-looping
2019-11-22 12:28:19 +01:00
holger krekel
5293ea70ae
steramline some teardown decision code, and add webpki_roots for cert-checking
2019-11-22 12:28:19 +01:00
holger krekel
c6f4d6d8bd
* fix interrupt_idle by signalling "skip_next_idle_wait" to the potentially concurrently "fn idle" function
...
* fixes double-export issue
2019-11-22 12:28:19 +01:00
holger krekel
8723aa097e
make select_folder return ImapActionResult's and early-return from idle if there is no selected folder
2019-11-22 12:28:19 +01:00
dignifiedquire
86f66f4d78
cleanup imap impl
2019-11-22 12:28:19 +01:00
dignifiedquire
1a1a59a14e
implement idle again
2019-11-22 12:28:19 +01:00
dignifiedquire
1687e8d26f
it compiles with async-imap, remove local dependency
2019-11-22 12:28:19 +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
Dmitry Bogatov
6e2da27f45
Change return type of Imap::set_seen to enum
2019-09-20 17:35:26 +00:00
Dmitry Bogatov
6ee9465d43
Make return type of Image::mv an enum
...
Replace named constants with enum to improve type-safety and make
exhausiveness checks possible.
Note, that since this enum never pass FFI border, its numeric values
does not need to be specified explicitly and can be left on compiler's
discretion.
2019-09-20 17:35:25 +00:00