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
79b92727cc
prefer get_config_bool() where appropriate
...
for db input/output, we still use get_config_int() to convert to/from 0/1.
also for info() we prefer get_config_int() to show the real value.
2019-10-04 11:15:11 +02:00
björn petersen
8dfd04672f
Merge pull request #670 from deltachat/tweak-config
...
tweak config
2019-10-03 21:19:45 +02:00
holger krekel
603761e4b7
add DC_EVENT_DELETED_BLOB_FILE
2019-10-03 18:01:56 +02:00
holger krekel
467c09f491
introduce DC_EVENT_NEW_BLOB_FILE event and test for it
2019-10-03 18:01:56 +02:00
B. Petersen
a953b494cb
cargo fmt
2019-10-03 17:41:09 +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
B. Petersen
23d2d87c24
do not panic on missing or wrong formatted values in the database
2019-10-03 17:15:40 +02:00
B. Petersen
c6b2d640ae
prefer context.get_config() over context.sql.get_config() as the latter does not handle default values.
2019-10-03 17:15:40 +02:00
björn petersen
b4b8a1d15b
Merge pull request #667 from deltachat/resilient-writes
...
more resilient database writes
2019-10-03 14:48:21 +02:00
Alexander Krotov
130d485cac
Fix some clippy warnings
2019-10-03 14:30:40 +02:00
B. Petersen
d5b92744ed
increase number of simultan database-connections, wait for write if another thread writes
...
- increase the number of simultan database-connections handled by the r2d2 pool.
currently we have already at least 5 threads threads,
but also the ui may call from any thread.
- the busy-timeout for all connections is set to 10 seconds.
this means, if a connection-A wants to write,
but connection B-is already writing,
connection-A waits multiple times a few ms and tries over.
this is repeated until the 10 seconds are accumulated.
2019-10-03 14:09:43 +02:00
Alexander Krotov
a5c4e16405
Merge pull request #647 from deltachat/tls_checks_config
...
Add certificate check configuration options
2019-10-02 23:21:03 +00: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
f93f3d6012
Do not set minimal TLS version for SMTP manually
2019-10-03 01:26:07 +03:00
Alexander Krotov
41806f86ba
Return certificate check information from get_info()
2019-10-03 01:26:07 +03:00
Alexander Krotov
59df97944f
Enable strict certificate checks for test online accounts
2019-10-03 01:26:07 +03:00
Alexander Krotov
468651534e
Manually specify values for CertificateChecks enum
...
This is what we are doing in constants.rs
2019-10-03 01:26:07 +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
641bd5eb15
Write configured_{mail,send}_certificate_checks to database
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
Alexander Krotov
b8ca7b1591
Add CertificateChecks::Automatic option and make it default
...
It is the same as AcceptInvalidCertificates for now,
but can be replaced with better heuristics later,
such as a database of known providers or TOFU.
2019-10-03 01:25:19 +03:00
Alexander Krotov
e222f49c9d
Use send_certificate_checks configuration
2019-10-03 01:25:19 +03:00
Alexander Krotov
297bc635e8
Add certificate check configuration options
2019-10-03 01:25:19 +03:00
holger krekel
230c65594c
add test for markseen not sending out smtp on second call
2019-10-02 23:51:14 +02: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
5c1b9c83f7
fixes #661 and also contains a cleanup of config access (only for e2ee and mdns)
2019-10-02 22:51:09 +02:00
holger krekel
92438737c9
- introduce and test BccSelf config, to prevent bcc-self on outgoing mails
...
- introduce context.get_config_int() which respects default values
declared in config.rs (Config)
2019-10-02 22:51:09 +02:00
holger krekel
489cdd1b24
- resultify send-out pipeline for better error reporting
...
- early ignore sending out smtp messages with no recipients
2019-10-02 22:51:09 +02:00
holger krekel
3f7995a7ea
start with some refactoring of the outgoing pipeline
2019-10-02 22:51:09 +02:00
Alexander Krotov
f7ad93229d
test_account.py: fix a typo in test message
2019-10-02 13:10:16 +02:00
Alexander Krotov
555b4bc8c7
python/README.rst: s/mail_pwd/mail_pw/
...
mail_pw is the option that is actually read by the tests
2019-10-02 13:09:45 +02:00
björn petersen
75f41bcb90
Merge pull request #658 from deltachat/fix-contact-requests
...
move contact-requests to the beginning of chatlists
2019-10-01 13:29:44 +02:00
B. Petersen
97e1fbc198
move contact-requests to beginning of chatlists
...
contact-requests of non-blocked senders are shown in the chatlist,
so that the user gets aware of them without opening the contact-request-chat.
however, for that, the contact-request virtual-chat-id
must be added to the beginning of the list,
otherwise it won't get noticed by the user.
2019-10-01 12:50:31 +02:00
holger krekel
ee6d16f1b1
on some call sites: peerstate.save_to_db() should bubble up errors instead of crashing.
...
also write a test that double-creation of an addr-row is fine.
2019-10-01 10:34:36 +02:00
björn petersen
22d2097132
log all database-migration actions ( #654 )
2019-09-30 20:56:19 +02:00
björn petersen
c376de9b5e
add sticker type ( #653 )
...
* add sticker type
this pr adds the message type 'sticker'.
stickers are handled as normal images
but tagged with the header `Chat-Content: sticker`
it's up to the ui to render these stickers appropriate.
* cargo fmt
2019-09-30 20:55:27 +02:00
holger krekel
ab2ef1e1e4
shift most mmime functions to wrapmime
2019-09-30 00:52:14 +02:00
holger krekel
18030fa61e
remove duplicate code and possibly a leak
2019-09-30 00:52:14 +02:00
holger krekel
064337b5d3
refactor one occassion of determinig transfer encoding
2019-09-30 00:52:14 +02:00
Dmitry Bogatov
a6a6fc48c1
Remove unused outlk_autodiscover_t.redirect field
2019-09-29 23:35:01 +02:00
holger krekel
d72e9bb05b
remove dc_get_fine_* method and validate_filename
2019-09-29 22:49:01 +02:00