677b75f90d81eafe742896d6570a2f63ce501d05 |
|
19-Jan-2018 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
global: don't cast NULL to void *
NULL is guaranteed to be a void * thanks to
dd6043c05e32a8e8db1233ed711a2c74d1477a89. |
bcb4e51a409d94ae670de96afb8483a4f7855294 |
|
01-Jan-2018 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2018. |
d4002fe1f64d25a792f76fb102ef7dc519cd4e24 |
|
11-Dec-2017 |
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi> |
global: Use mail_set_critical() and mailbox_set_critical() if possible
Replace calls to mail_storage_set_critical() with mail_set_critical()
or mailbox_set_critical() in places where mailbox or mail are easily
available. |
e01ebd51ac369430ec81945e3c5317d6d6244138 |
|
30-Oct-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Add imapc_features=fetch-empty-is-expunged
When FETCH returns an empty mail, the mail is assumed to be expunged. |
a943ed0f901e312445fd393249b91932797bba79 |
|
03-Oct-2017 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
global: use i_close_fd{,_path}() instead of open-coding them |
204ee6ed414f5e4eeb6f6c10763b55daf56f11ac |
|
19-Sep-2017 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
global: start relying on [io]_stream_unref(NULL) being a no-op
Cleanup performed with the following semantic patch:
@@
expression E;
@@
- if (E != NULL) {
- i_stream_unref(&E);
- }
+ i_stream_unref(&E);
@@
expression E;
@@
- if (E != NULL) {
- o_stream_unref(&E);
- }
+ o_stream_unref(&E); |
0d1b8b6bec79746c5d89d57dd8c1688946bd9237 |
|
19-Sep-2017 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
global: start relying on timeout_remove(NULL) being a no-op
Cleanup performed with the following semantic patch:
@@
expression E;
@@
- if (E != NULL) {
- timeout_remove(&E);
- }
+ timeout_remove(&E); |
7dd326f772ed4193e1bfdafdb46fea616970e1ac |
|
18-Sep-2017 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
lib-storage: convert struct imapc_mail casts to container_of |
6a384c0f8980bfdefe40c42bf39d43302e58ad14 |
|
18-Sep-2017 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
lib-storage: convert missed imapc casts to container_of |
7b0a52bf38f8a7ab0c262acf4c761d6a0f22a07c |
|
07-Sep-2017 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
lib-storage: convert imapc to use container_of |
e1777cb59a96d8710a6c5cefe6a17c7c15159c9f |
|
03-Jul-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Prefech - Initialize cached stream only if needed
If the mail is immediately accessed for other purposes (e.g. fetching
message flags), there's no need to go through all the trouble of
initializing the mail stream. |
fe080d248e2bd374e9d86c8a34ec6f14e88b8a14 |
|
14-Jun-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Fix prefetching specific headers
FETCH BODY[HEADER.FIELDS ...] shouldn't be used if imapc_features doesn't
include fetch-headers. Also neither this nor BODY[HEADER] should be sent
if we already have header/body stream. |
25fecf139625e35bbcd9262be8b28cbb4e8407fa |
|
14-Jun-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Avoid sending FETCH BODY[HEADER] when BODY[] is already being fetched
This probably only shows up in some special situations with plugins. |
d15de28720491cd9bdf3f6734aaea66c271bbbd3 |
|
24-Apr-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: include imapc-client.h in imapc-storage.h
It was already required to be able to successfully include imapc-storage.h. |
e1005f8bf9190e1778010032dbd20c64acb53610 |
|
24-Apr-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Add imapc_features=fetch-bodystructure
This allows using the remote IMAP server's BODY and BODYSTRUCTURE replies. |
fc1584e525d413183d37e1052081f3685a06c7fc |
|
05-Apr-2017 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
imapc: Use IMAPC_COMMAND_STATE_AUTH_FAILED to indicate auth failure |
1b0b44348d1f94f1f0e418d80323646e1e335c2b |
|
21-Feb-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Error handling wasn't setting storage error everywhere.
This would have used the previous error, which might not have been correct. |
7204b8112e005ff81dcf628f7880ef1feed1effe |
|
19-Feb-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Add mail.mail_stream_opened and .mail_metadata_accessed
These allow determining after mail_*() calls how efficiently they were
performed. |
2454dfa32c93c20a8522c6ed42fe057baaac9f9a |
|
01-Jan-2017 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2017. |
e93184a9055c2530366dfe617e07199603c399dd |
|
06-Jun-2016 |
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi> |
lib: remove autoclose parameter from [io]_stream_create_fd
Use [io]_stream_create_fd_autoclose() for autoclose. |
b540a53c8ac2f5d012149d39cf43a3868c927028 |
|
25-Apr-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Fixed crash caused by pool_unref() API change.
Calling pool_unref() set the mail_private->pool=NULL, which crashed in
index_mail_free(). Fixed this by removing the unnecessary ref/unref
entirely. We're already waiting in imapc_mail_close() for all the
existing FETCHes to finish, so the callback will always have only
valid mails with valid pools. |
969f57f722570982a5febbaab2462b692aa68733 |
|
29-Mar-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Don't try to FETCH uncommitted mails, because it would attempt to FETCH uid=0 |
14fb3a2f6af1d75aeec6deb766026b4ea6a4db53 |
|
28-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: If FETCH didn't send our wanted data, log the tagged FETCH reply text. |
740e369c027c3589f4074e7ea0a51204082853cb |
|
28-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Don't use fetch-fix-broken-mails for NO [LIMIT] FETCH replies |
b8947936e65a9b79ffe1a4f7a9835c946a9b635b |
|
28-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Remove X-Message-Flag filtering if imapc_features has rfc822.size |
638734376d265a1529985755da671c09cfc22e06 |
|
27-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Don't use fetch-fix-broken-mails for OK and NO [SERVERBUG] FETCH replies
Hopefully no servers are actually returning OK without returning a FETCH
reply. If they are, maybe we need another workaround..
In any case Yahoo IMAP sometimes loses state and starts returning OK without
FETCH replies to all UID FETCH requests (and BADs to FETCHes). It also may
return NO [UNAVAILABLE] for both permanent and temporary FETCH failures, so
we can't do anything with that.
I added NO [SERVERBUG] because that's what Dovecot responds to temporary
failures. I'm not sure how useful that check is though. |
5085686ff2b4be28e7d631e1bbfa32afe427b7c7 |
|
25-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Prefetching shouldn't send FETCH requests for headers that are already cached. |
02c335c23bf5fa225a467c19f2c063fb0dc7b8c3 |
|
12-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: freshen copyright
git ls-files | xargs perl -p -i -e 's/(\d+)-201[0-5]/$1-2016/g;s/ (201[0-5]) Dovecot/ $1-2016 Dovecot/' |
14fd61e73569f356c57ccc253cfbbb6d77cccdf9 |
|
25-Aug-2015 |
Timo Sirainen <tss@iki.fi> |
imapc: If FETCH commands fail, have imapc_mail_fetch() always return failure.
Earlier it may have returned success and imapc would later complain about a
missing FETCH field. |
50ffc12831eff618d35a8ee7537b61eaa95a4ade |
|
04-May-2015 |
Timo Sirainen <tss@iki.fi> |
imapc: Various optimization fixes to fetching messages' virtual size. |
eb1365e61674c54c7c453143356a891fb2e2b3d6 |
|
15-Apr-2015 |
Timo Sirainen <tss@iki.fi> |
imapc: Added imapc_features=zimbra-workarounds
Zimbra (at least v5.0.18_GA_3011.RHEL4_64) can return different headers
depending on whether the whole message body was fetched or only (partial)
headers. This probably happens only for invalid characters that are
translated into '?'. With this workaround enabled we don't use FETCH
BODY.PEEK[], but we do FETCH (BODY.PEEK[HEADER] BODY.PEEK[TEXT]) and merge
the results together. This way the results are always consistent and headers
don't suddenly change. |
13a7cda8a48bba9f360efe9048913eef741fff30 |
|
11-Mar-2015 |
Timo Sirainen <tss@iki.fi> |
imapc: Prefetching wasn't done for headers if there weren't also other fields. |
b43d7e2b753d69fa6eafcf647d75e6af1dcc0fc8 |
|
11-Mar-2015 |
Timo Sirainen <tss@iki.fi> |
imapc: Don't flush prefetch FETCH command before it has mail_prefetch_count number of mails. |
2a1d9dda6e05f596b70703b74721847308127e3e |
|
11-Mar-2015 |
Timo Sirainen <tss@iki.fi> |
imapc: Make sure we don't flush prefetch FETCH command unneededly. |
7cb128dc4cae2a03a742f63ba7afee23c78e3af0 |
|
05-Jan-2015 |
Phil Carmody <phil@dovecot.fi> |
global: freshen copyright
Robomatically:
git ls-files | xargs perl -p -i -e 's/(\d+)-201[0-4]/$1-2015/g;s/ (201[0-4]) Dovecot/ $1-2015 Dovecot/'
Happy 2015 everyone!
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
fda7b3649d2ccdb4a95f5bf09eb8cf5435d57261 |
|
20-Mar-2014 |
Timo Sirainen <tss@iki.fi> |
imapc: Avoid hanging when running into server problems.
imapc_mail_fetch_flush() caused imail->fetch_count to drop to 0, but
imapc_mailbox_run() still started imapc_client_run() which was doing
nothing. |
b7a672661c5642d6e8db9e96f7028b1af1e3255a |
|
20-Mar-2014 |
Timo Sirainen <tss@iki.fi> |
imapc: Fixed crash when FETCH command immediately failed due to connection error. |
a8c5a86d183db25a57bf193c06b41e092ec2e151 |
|
04-Feb-2014 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2014. |
1a878b9d2a823abc6b1c8b1631e50a15d534665f |
|
17-Nov-2013 |
Timo Sirainen <tss@iki.fi> |
imapc: Merge identical FETCH commands together (only updating UID range) |
d81b80bac97040d5e737f23ce1ee2eb4d7cc16cf |
|
16-Nov-2013 |
Timo Sirainen <tss@iki.fi> |
imapc: Fixes to imapc_feature fetch-headers |
d02af9610cf5d6560c5ebf4491f59eca2ba810a8 |
|
16-Nov-2013 |
Timo Sirainen <tss@iki.fi> |
imapc: When sending FETCH, always request also missing wanted_fields.
This avoids sending multiple FETCH commands when prefetch hadn't already
fetched everything. |
bf611d43256ef8ee3e1c1ce8e1257920f2075278 |
|
16-Nov-2013 |
Timo Sirainen <tss@iki.fi> |
imapc: Avoid FETCH INTERNALDATE for getting save_date when we already know received_date. |
ffb886eb9c3682bb891206cced9623368035d739 |
|
16-Nov-2013 |
Timo Sirainen <tss@iki.fi> |
imapc: Don't send FETCHes for data that is already in cache. |
0f641fb49bf0a934556717a2c209566ac387d7bb |
|
16-Nov-2013 |
Timo Sirainen <tss@iki.fi> |
imapc: Crashfix for previous change |
b8eb60a9ba83e2f3f6d969e810553eb937be2128 |
|
16-Nov-2013 |
Timo Sirainen <tss@iki.fi> |
imapc: Added imapc_feature fetch-header.
It uses FETCH BODY.PEEK[HEADER.FIELDS (...)] whenever possible instead of
fetching the entire header. |
8e1dbcb9b249c37d00b420705777b103ffa6145d |
|
10-Jul-2013 |
Timo Sirainen <tss@iki.fi> |
imapc: Reorganize code so that imapc_list works without imapc_storage.
Most importantly fixes crashes when imapc_list is trying to lookup hierarchy
separator before storage is created. |
5a580c3a38ced62d4bcc95b8ac7c4f2935b5d294 |
|
02-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
Oops :) Update copyrights to 2013 without breaking all .c files. |
cca4ba2a504d70a9fe9fee37f8433997359de52c |
|
02-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2013. |
27a44fcfd8d19bffe0f267f20a2b5d3fe7600fdd |
|
19-Aug-2012 |
Timo Sirainen <tss@iki.fi> |
Removed CONTEXT_TYPE_SAFETY macro and reimplemented its functionality better.
gcc/clang now gives a compiler error in many places if callback isn't
exactly what was expected. It's also now much easier to add more of these
checks. |
adcb46fe2c6d1139dfbd8ab08a8fbe96e53f8fd6 |
|
30-Mar-2012 |
Timo Sirainen <tss@iki.fi> |
imapc: Added imapc_features=rfc822.size setting to use RFC822.size for physical sizes. |
5f5870385cff47efd2f58e7892f251cf13761528 |
|
12-Feb-2012 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2012. |
2ed248fba21fdd3abcc4bb4d07c2822b9ba3f66f |
|
14-Dec-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Avoid assert-crashing when replacing mail stream with a new one. |
df452e9628fe8d3356c42dd644b020ea9733c0c1 |
|
12-Dec-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Added support for fetching GUID from remote server, if supported.
Currently this is only done for GMail. |
ecd69c4e8371853667e01b0c16d436ef7f7393e2 |
|
12-Oct-2011 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Added mail_log_update_wanted_fields() |
f87844c400cf9741abad57d9815121d0738a738f |
|
09-Oct-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Support retrying some IMAP commands if we get disconnected. |
81d3c215bb1fdbda2cf7ccd9519f6b4fd03c3791 |
|
07-Oct-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Command sending API changed to be more extensible. |
13f6c879a84b3edd2fcc8f9832812be1f8c5d3b6 |
|
05-Oct-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Fixed fetching data for a saved, but uncommitted, mail. |
6ac48a4295edbeb6b962700be3c563ad015c0a4e |
|
05-Oct-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Memory leak fixes. |
7c3f90095b4168d89a268ac1ec820c5925d48fd3 |
|
04-Oct-2011 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Verify that cached message size matches actually read size. |
cdf00df4dc5d0ae5acfdf200d2e846dbb92fda7e |
|
01-Oct-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Changed imapc_client_mailbox_cmd() parameter order to be same as in _cmdf(). |
b1a2d2042e8c7e99983175eb462b82cc7a8cb70b |
|
30-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Keep the last fetched message body cached until mailbox is closed.
This primarily helps partial IMAP fetches so each partial fetch doesn't
redownload the message body. |
530f80fcbfa8be7378ff0d36ec7ecef41f198e2c |
|
22-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Allow accessing a mail that is being saved without crashing.
This fixes crashes with LDA, LMTP, mail_log plugin, etc. |
00bf64c70c231f647c12c2fd49925ef73cb07f07 |
|
20-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Filter out X-Message-Flag: header from incoming mails.
This is only added by MS Exchange when \Flagged flag is set, so it could be
made optional, but it probably doesn't really hurt to just make it
unconditional to ease the configuration. |
063254ba79239f1c0a78ea08d4aa22f8f11d984c |
|
08-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: If mail prefetching fails because of disconnection, don't log about it again. |
951c92a29c36d22a60e56cae4b47d5d0fa5dd6b5 |
|
03-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Fixed handling immediate changes when starting IDLE. |
e809db9220c804b16d4d74782433a1075da12274 |
|
03-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Error logging cleanups.
Don't bother to log disconnection errors for NOOP. |
8ddc45fe2080010715c212ecbb2b12b6734f6d4b |
|
04-Apr-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Fixes to handling expunges. |
86520ddddf88bce4bb27b3c6e3e5a2375d7b2bdb |
|
04-Apr-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Removed support for connection locking and multiple connections to mailbox.
If needed they can be added back by reversing this change, but for now
they're no longer needed. |
9ed77dd00248e88d731ec129116db5dddc0dd3b5 |
|
04-Apr-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Stop FETCH wait after untagged reply is received, don't wait for tagged reply. |
e15b305e90c9834734ccf35ed78f0ad29d570ee9 |
|
31-Mar-2011 |
Timo Sirainen <tss@iki.fi> |
Search supports now prefetching data for returned mails. Dropped imapc's own prefetching.
mail_prefetch_count specifies how many mails can be kept open and issue a
prefetch.
This works using posix_fadvise(POSIX_FADV_WILLNEED) for maildir, sdbox and
cydir backends. Apparently only Linux supports this.
imapc backend also implements this internally by sending wanted IMAP
commands to remote server. The command pipelining helps with latency. This
change also makes it actually possible for imapc backend to first check if
wanted data is already cached in local index and avoid sending unnecessary
IMAP commands to remote server. |