d4d69bc7603dc65fac4f7eed755f8ed5e7fd0788 |
|
27-Feb-2018 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Fix crash when untagged FETCH reply doesn't have key-value pairs
The last key with the missing value is just silently ignored. |
f8f30bd27e41e1041a8de0b97f35d7d75e0a412e |
|
18-Jan-2018 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Fix sending initial FETCH after reconnection SELECTs mailbox
Move sending the FETCH when the SELECT returns tagged OK reply instead of
delaying it until mailbox is next synced. Most importantly this allows
sending the FETCH before any retried commands that are also sent after
SELECT receives tagged reply. |
989d4299cbd252eace8b09175910cd2ab341bf8d |
|
18-Jan-2018 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: gmail-migration: Fetch X-GM-MSGID for new mails as well
I'm not sure why it was originally restricted only for the initial FETCH.
Fetching GUIDs for new mails can be just as useful. |
04f1db1a0de276abc5b9f93f1c1c99fb41f253af |
|
18-Jan-2018 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Move imapc_mailbox_fetch_state*() to imapc-mailbox.c
Mainly to make the next commit smaller. |
468830ef7df7d9c5c5b73ecf78c732d0b39646a2 |
|
18-Jan-2018 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Handle untagged UIDVALIDITY immediately
This is part of the changes to fix mailbox resyncing after reconnect. |
315dcc5eb03651bdb4c59aa10b25980229865c14 |
|
18-Jan-2018 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: If mailbox select fails, rollback any changes done to it
Required by the following changes that start adding changes immediately
after SELECT. If the initial syncing doesn't finish successfully, these
changes need to be reverted. |
3d709b4208dd3ef76b4ec37dc3dff1f05a4a7292 |
|
18-Jan-2018 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Fix leaking mail_index_view on delayed expunge handling
Fixes:
Panic: Leaked view for index (in-memory index): Opened in imapc-mailbox.c:47 |
6303446550dae335bc8c4b147d909e04894e4064 |
|
16-Jan-2018 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Fix imap_features=no-msn-updates to not fail on SELECT
The initial EXISTS reply shouldn't be ignored, only the following ones. |
bcb4e51a409d94ae670de96afb8483a4f7855294 |
|
01-Jan-2018 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2018. |
7484b1b01bee9b767f8b67396e1f4af4b0ea1dd3 |
|
25-Dec-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Add imapc_features=no-msn-updates
This is a stricter version of fetch-msn-workarounds. The MSNs aren't trusted
at all. This means any new untagged EXISTS and EXPUNGE replies are ignored,
as well as untagged FETCH replies that don't include UID.
A potential downside with this feature is that UID FETCH/STORE commands
sent to expunged messages will likely fail without the IMAP client being
notified of the EXPUNGEs. New mails are also not noticed, so this should
be used only when it's known that the clients don't keep the connection
open for long. |
7efe57b10e55b29d3e618fa8194c01a9093f0d07 |
|
19-May-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Make sure a valid UIDVALIDITY is returned by SELECT
Fixes errors such as:
Error: Synchronization corrupted index header (in-memory index): uidvalidity=0, but next_uid=9 |
78aafd062427cb22e9cf57ff08ced5b08baf55b3 |
|
19-May-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Fix infinite reconnection when server keeps sending corrupted state
When corrupted state was found, imapc_client_mailbox_reconnect() is called
to reconnect. This call skipped the normal "is it safe to reconnect?"
checks causing potentially infinite reconnections. |
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. |
a9ba935a40c04a86ff20973c52af9ff43831b871 |
|
24-Apr-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Support imapc_features=search without ESEARCH extension |
6e40a39f6886edbba5ad498391c299983f8f94e9 |
|
24-Apr-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Rename imapc_storage_has_modseqs() to imapc_mailbox_has_modseqs()
Simplifies the following patch. |
2454dfa32c93c20a8522c6ed42fe057baaac9f9a |
|
01-Jan-2017 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2017. |
f2c3abe802df6fdbe7d0cd456e13817f44ca23c2 |
|
15-Dec-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Don't allow "*" in SEARCH replies
Doesn't fix anything, but makes the parsing a bit more correct. |
724c4a962ea72d9c7ad719740f4351368f8eee51 |
|
23-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Cleanup - change delayed_expunged_uids to seq_range.
This simplifies the next commit. |
de8fc9d21460bf0369d671e9ba9361592379a7c5 |
|
29-Apr-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Fixed EXPUNGE handling when imapc_features didn't have modseq |
90355e35d1139e446a99733986a9181bd7f05dd4 |
|
22-Apr-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Added support for imapc_features=modseq
If the remote server supports CONDSTORE or QRESYNC extensions we'll use the
remote's MODSEQ and HIGHESTMODSEQ counts.
There are some situations where the HIGHESTMODSEQ isn't updated exactly
correctly on an open mailbox, so this feature shouldn't be fully relied on.
It was primarily implemented for dsync+imapc support - both for preserving
modseqs and also for HIGHESTMODSEQ lookups. |
53841bd6c67a24b60b64cec41b72eb8b474cfbc7 |
|
24-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Added imapc_features=fetch-msn-workarounds
This can be used to work around broken servers that send invalid MSNs. This
avoids errors like:
imapc: Mailbox 'INBOX' state corrupted: FETCH UID mismatch (78976 != 82589) |
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/' |
aa8338d49a050fd83e9383f08a00fba392bfc398 |
|
13-Dec-2015 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Removed commented out code.
It was probably accidentally committed debug code. |
d464e2ef8699b5c6991f57c979114beeb6e5cc33 |
|
19-Oct-2015 |
Timo Sirainen <tss@iki.fi> |
imapc: Set storage's error to "internal error" if we detect mailbox state corruption.
This fixes "unknown internal error" in at least syncing code when an
expunged message reappears. |
4ce25b6f7ff304d40916dadc3341973eb88b0a50 |
|
24-Mar-2015 |
Timo Sirainen <tss@iki.fi> |
imapc: Fix to previous change - labels are strings and not atoms.
Allow also atoms just in case |
dce8b33992e89d4145c544a8b5e573776f53b9e4 |
|
24-Mar-2015 |
Timo Sirainen <tss@iki.fi> |
imapc: Ignore \Muted GMail label |
71417d43ad8f3082f6426a6dd0bfe0e6db9df86e |
|
11-Mar-2015 |
Timo Sirainen <tss@iki.fi> |
imapc: If imapc_features has gmail-migration, fetch X-GM-MSGID at startup and cache it.
This works only if index files haven't been disabled. |
acfdd1b1625fae310faee8e5e2480c4f224fb648 |
|
17-Feb-2015 |
Timo Sirainen <tss@iki.fi> |
imapc: Fixed STATUS_FIRST_RECENT_UID to return the (mostly) correct UID. |
6e1cac3defe84a222b804f3ef41ff558e1a86391 |
|
03-Feb-2015 |
Timo Sirainen <tss@iki.fi> |
imapc: Added imapc_features=search support for sending SEARCH commands.
Currently requires the remote server to support ESEARCH (but this would be
easy to avoid). This is only minimally tested for now, so bugs may exist
(especially related to sub-queries). |
f424c157faae226f153578442fab1512275889fc |
|
23-Jan-2015 |
Timo Sirainen <tss@iki.fi> |
imapc: Merged gmail-pop3 and gmail-labels-keyword features into a single gmail-migration feature
There's really no other reason to use them except for migration. |
6b23e5a3fff511cd64f1edb880fd080016c23c0f |
|
20-Jan-2015 |
Timo Sirainen <tss@iki.fi> |
imapc: Implemented imapc_features=gmail-pop3 that also migrates pop3_deleted_flag.
This also caused gmail-pop3-uidl feature to be renamed to simply gmail-pop3,
which includes both the features. |
3394dcb43382e094b0707c1640efbf46adac9e7d |
|
20-Jan-2015 |
Timo Sirainen <tss@iki.fi> |
imapc: Added imapc_features=gmail-labels-keyword
This is a bit kludgy feature mainly intended for migrations from GMail.
Unfortunately I couldn't figure out any nicer way to do this for now.
GMail's "All Mail" folder contains all messages in all folders, but it also
contains some messages that don't exist in other folders. For migrations we
want to copy only those messages that don't exist elsewhere. This can now be
achieved with something like:
doveadm -o imapc_features='gmail-labels-keyword ...' \
backup -F '-$GmailHaveLabels' mdbox:~/mdbox
Note that dsync can't handle inserting mails into folders, so if doveadm
backup is already run once and one of the existing mails loses all labels,
doveadm backup will delete the whole folder and start again. |
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> |
2d2d7c4d0458e534bee8621613865a06b44eae02 |
|
12-Jun-2014 |
Timo Sirainen <tss@iki.fi> |
imapc: Avoid crashing if server happens to send invalid resp-text-codes.
If [KEY VALUE] is missing the VALUE, just set it to "" instead of NULL.
Found by Coverity |
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) |
8236d57101e1cc557057461fac333188a8d44d61 |
|
06-Sep-2013 |
Timo Sirainen <tss@iki.fi> |
imapc: Don't crash if server sends EXISTS while mailbox isn't selected. |
03f2a189a0985d87cfe443a1a5cc8ab6da052c30 |
|
10-Apr-2013 |
Timo Sirainen <tss@iki.fi> |
imapc: If APPEND to selected mailbox doesn't send EXISTS, try if NOOP sends it.
This makes Dovecot behave better with Courier. |
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. |
1f1ee8db68d9ae1604350801cd8dc33ebe29fe8a |
|
29-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Renamed mail_storage_set_index_error() to mailbox_set_index_error() |
31a574fda352ef4f71dbff9c30e15e4744e132c0 |
|
25-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
Added array_append_zero() to write a zero-filled record to an array.
Replaced (void)array_append_space() calls with it. |
35d6ae1135dca628a962af86900e299e15964bf4 |
|
16-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
imapc: Removed brokenly used explicit data stack frame.
Fixes crashes when a message has more than 8 keywords. |
4b335788eb41dec2de5f78459d96387fcc710010 |
|
20-May-2012 |
Timo Sirainen <tss@iki.fi> |
Use timeout_add_short() for sub-second timeouts. Fail at compile time if timeout_add() is <1s.
In future timeout_add() could perhaps also be made less precise, so that it
would try to group timeouts to run around at the same time. |
5f5870385cff47efd2f58e7892f251cf13761528 |
|
12-Feb-2012 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2012. |
f4ec0cc449a750d9c76029c2e215962cac8d34b1 |
|
09-Oct-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Fixed expunging too many messages from index. |
b50e80d237435686c4ea525643f266731a600981 |
|
09-Oct-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Fixed detecting when messages are missing from index. |
edcd6f7223568e080d5a6767c5038e3bc891e963 |
|
09-Oct-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Initial support for automatically reconnecting to remote server. |
34bc7b583d5f34ac786ff16ff0f7d6c169ebe857 |
|
08-Oct-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Fixed updating message flags from another session. |
c33cf2266c8557b186343eb4212cf6b4e26e074a |
|
07-Oct-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Fixed handling keywords.
The status->keywords must point to mail_index's keywords. |
dcb96a0dc2e3081a80440081cfcae22de71844ab |
|
07-Oct-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Detect when message has been unexpectedly expunged from index. |
4769563679932e0b90f1506ed61dfd88e47403ba |
|
07-Oct-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: IDLE didn't notify immediately about new mails. |
f5be4f5b4a1bba7f3497f52d01e582b82af2b355 |
|
07-Oct-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Code cleanup: avoid unnecessarily accessing imapc-client-private.h |
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. |
afb49e8adab954708e3f192386a3c7faa07e5ae5 |
|
22-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
iampc: Small code cleanup. |
edb71d39ee28d42005345d633903dc6234ecd3e8 |
|
20-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Added more checks to catch buggy IMAP server responses. |
0b5ae5cabb25fdf7f9237f37bb4835acc9c7523e |
|
20-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: When remote IMAP server becomes confused, don't mark our indexes corrupted.
Mark them corrupted only when after a reconnection the initial mailbox sync
doesn't work. |
d30c35e25ea6d935393e031509e6e22422b1e006 |
|
07-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Don't crash if a newly seen uncommitted message is expunged. |
e8443917ef5586eeeec39b482b5657134935120f |
|
07-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Removed accidentally committed debug sleeps. |
d1b3f17d857237ea9a27bb58785bd5c6f0d3a185 |
|
05-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: mailbox_status now returns permanent flags/keywords as they are on remote server. |
b0b14c64cc6ade3052f8da14726c382d1a9a8a9f |
|
04-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Another compiler warning fix. |
b0cfc1ced62cf026cdad0ff1b8d51a692023cfd0 |
|
04-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Compiler warning fix. |
faa489c310aefafee3d2cdfefff4bb06dd227860 |
|
04-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Syncing fixes |
1af95e0fea59835842dafe207e86ebc53691c596 |
|
04-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Redesigned remote sequence <-> index file record mapping is done.
The previous code didn't work when multiple connections modified the same
index files. |
92f9aaf8957c8542d7497b00b5e1859645f7b3c0 |
|
04-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Delay handling new messages and setting uidvalidity/uidnext until sync. |
5caec68be97ed35c99e6bcafd11bfe45550b5fc5 |
|
04-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Never use box->view for syncing related purposes.
The view isn't up to date when MAILBOX_SYNC_FLAG_NO_EXPUNGES is used to sync
it. Instead always use a separate sync view. |
228e0b0846b3573e68923f3188607e6e4339b12d |
|
03-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Avoid assert-crashing if a new message's UID is smaller than next_uid. |
b328a8f1feee6b66a8589098a589a958a78da2d4 |
|
03-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Fixed error handling while opening mailbox. |
3fd0bcdff26bb8840f71a80c6a6c106940ae89f8 |
|
04-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Fixed syncing external changes to mailbox when opening it. |
bf190046cff33271920e9888dc0e613e3044c7c2 |
|
04-Apr-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Minor code cleanup. |
8ddc45fe2080010715c212ecbb2b12b6734f6d4b |
|
04-Apr-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Fixes to handling expunges. |
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. |
2b0856fd2ba6c9d16a67f2e4e851241e79684a39 |
|
17-Mar-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Fixed setting flags for newly seen messages. |
d83e46e7cd1ffd76210823dadcac549124c96d4e |
|
10-Mar-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Initial support for local index files. |
df48643c3c240ad5b8a3e2e2132c46f7dc541b5e |
|
24-Feb-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Many fixes related to syncing and error handling. |
8c98b8adba0e70743d5d8c35ae922038881b1f47 |
|
02-Feb-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Support IDLE even if remote IMAP server doesn't support it. |
8a26102b8b1e08a774398980a8f92ae8f8575da8 |
|
31-Jan-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Write large message bodies to temp files rather than keeping in memory. |
94a77d6e5d7600859e4c5e4a7ea19dc3e91998b9 |
|
30-Jan-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Send UID FETCH commands with larger uidset parameter if possible.
This code assumes that server doesn't reorganize FETCH replies when it's
given an increasing UID range, which in theory IMAP server would be allowed
to do, but I doubt there are any. |
689b06e33729491b593fe34ad3267d65b79be149 |
|
28-Jan-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Added support for saving and copying messages. |
83a03a417e58abc278ad094238ab3f278d8a2fd0 |
|
25-Jan-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Added support for keywords. |
51130f00bbd1e119ec042d63c148a78ac06ab85e |
|
23-Jan-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Fixed mailbox deletion and some error handling. Code cleanups. |
6f9a5ecb55d8c024a0953647b77711b5622e9bbb |
|
23-Jan-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Handle properly mailbox changes while it's selected. Added support for IDLE. |
c5c71245fec4331d6598376f0ff2f3b9d4372cc8 |
|
21-Jan-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Code cleanups and fixes. |