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. |
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. |
7b0a52bf38f8a7ab0c262acf4c761d6a0f22a07c |
|
07-Sep-2017 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
lib-storage: convert imapc to use container_of |
28576b6283287ef3ca6ae0d818ebd4ce6c879107 |
|
12-Jun-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Cleanup - Rename auth_error to auth_failed_reason for consistency |
be21b9e65a37c29995899f7923f6d7e5771dc3ad |
|
12-Jun-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Change auth_failed boolean to more specific auth_failed_state
Since we now rely on auth_failed_state being initialized to zero,
explicitly set IMAPC_COMMAND_STATE_OK to be defined as 0. |
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. |
150542702397445873dca327c82c5c7f09322437 |
|
24-Apr-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Add imapc_mailbox.capabilities
Use it instead of imapc_client_get_capabilities(). Simplifies the
following patch. |
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. |
92cd929df2ebf3291886a11542b2815a426e906d |
|
26-Mar-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Fail user creation if login to imapc_host fails.
This causes imapc to actually wait for the login to succeed or fail.
Such a wait was already done by the imap code, which will be removed by
the next patch. |
724c4a962ea72d9c7ad719740f4351368f8eee51 |
|
23-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Cleanup - change delayed_expunged_uids to seq_range.
This simplifies the next commit. |
0dffa25d211be541ee3c953b23566a1a990789df |
|
06-Jun-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: unsigned int:1 -> bool:1
perl -i -pe 's/unsigned int ([^,:;]+):1;/bool $1:1;/' **/*.[ch] |
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. |
f97b503210435b74de3b26cba07315cbc9ea1dfc |
|
14-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Fixed escaping/unescaping mailbox names.
This fixes accessing mailbox names with '%' (the escape_char). It also fixes
local namespace separator being different from the remote separator. |
9a717bf84366bdd2ee25f95c49ffc911999dbd1f |
|
23-Jun-2015 |
Timo Sirainen <tss@iki.fi> |
imapc: If login is aborted at deinit, don't log an error. |
ce7c2091ca9f19a13c835d1d522832a73f7cfaa0 |
|
18-Mar-2015 |
Timo Sirainen <tss@iki.fi> |
imapc: If authentication fails, preserve the error message as storage/list error.
This isn't very helpful yet, because the mailbox list creation itself fails. |
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). |
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. |
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. |
1a878b9d2a823abc6b1c8b1631e50a15d534665f |
|
17-Nov-2013 |
Timo Sirainen <tss@iki.fi> |
imapc: Merge identical FETCH commands together (only updating UID range) |
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. |
3ec969c5cee55a7b08ab5c5bf7afae310176e2bd |
|
06-Jun-2013 |
Timo Sirainen <tss@iki.fi> |
imapc: If imapc isn't the inbox=yes namespace, do the login and initial LIST in background. |
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. |
0db42260be85e797aa9909a29b20296996f52e75 |
|
06-Nov-2012 |
Timo Sirainen <tss@iki.fi> |
Reverted 269104a0821b (Build imapc and pop3c always as plugins.)
This is no longer needed now that lib-ssl-iostream can be linked without
linking openssl. |
8c909e451d14075c05d90382cf8eebc4e354f569 |
|
29-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
Replaced *_INDEX_PREFIX macros with a common MAIL_INDEX_PREFIX. |
69af83d4e6c2c5c825a17edd7a41a4fb014caa8f |
|
12-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Added support for "broken_char" setting for escaping invalid mailbox names.
This is currently enabled only for imapc backend, where '~' character is
used for it.
Most importantly this allows migrating mailboxes from other IMAP servers
that contain mailbox names that Dovecot's imapc backend couldn't otherwise
access. |
83b97bc7787aa31094bafbf5e08e2a491c84a851 |
|
12-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
Build imapc and pop3c always as plugins.
This avoids having to link openssl library to all binaries that use
lib-storage. It appears that simply by linking with openssl causes each
such process to use 100-200 kB of more memory. With 10k imap processes this
is 1-2 GB of wasted memory.
The imapc and pop3c are still registered as stubs, and their plugins are
automatically loaded when needed. |
d6c06730a0a1ba6ac784d95eadc42c8c9a62661c |
|
02-Sep-2012 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Added MAILBOX_METADATA_BACKEND_NAMESPACE |
4ee00532a265bdfb38539d811fcd12d51210ac35 |
|
19-Aug-2012 |
Timo Sirainen <tss@iki.fi> |
Array API changed: ARRAY_DEFINE(name, type) -> ARRAY(type) name
Easy way to update your existing code:
perl -i -pe 's:ARRAY_DEFINE\(([^,]+), *([^)]+)\);:ARRAY($2) $1;:' **/*.[ch] |
adcb46fe2c6d1139dfbd8ab08a8fbe96e53f8fd6 |
|
30-Mar-2012 |
Timo Sirainen <tss@iki.fi> |
imapc: Added imapc_features=rfc822.size setting to use RFC822.size for physical sizes. |
8783c6a13c6107267d71bcb740fd096e96518883 |
|
23-Mar-2012 |
Timo Sirainen <tss@iki.fi> |
Compiler warning fixes. |
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. |
7cf1c7dd3dfd989cba1ed32a8e17c1b031c4629b |
|
04-Nov-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Don't use separate indexes/ directory anymore. Fixes/cleanups to make it possible. |
f87844c400cf9741abad57d9815121d0738a738f |
|
09-Oct-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Support retrying some IMAP commands if we get disconnected. |
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. |
c33cf2266c8557b186343eb4212cf6b4e26e074a |
|
07-Oct-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Fixed handling keywords.
The status->keywords must point to mail_index's keywords. |
f5be4f5b4a1bba7f3497f52d01e582b82af2b355 |
|
07-Oct-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Code cleanup: avoid unnecessarily accessing imapc-client-private.h |
13f6c879a84b3edd2fcc8f9832812be1f8c5d3b6 |
|
05-Oct-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Fixed fetching data for a saved, but uncommitted, mail. |
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. |
4bb24a20bb017b6e3301d6a8e961a08aa71cf10f |
|
09-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Another try at fixing mUTF-7 mailbox names. |
56956c0bba7b2bf734699ed198a1b2ad84a494cf |
|
08-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Use mUTF-7 for mailbox names. |
d30c35e25ea6d935393e031509e6e22422b1e006 |
|
07-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Don't crash if a newly seen uncommitted message is expunged. |
d1b3f17d857237ea9a27bb58785bd5c6f0d3a185 |
|
05-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: mailbox_status now returns permanent flags/keywords as they are on remote server. |
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. |
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. |
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. |
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. |
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. |
eef4ba0cc3e78f8c26804c1c9251a76580a41f0c |
|
29-Mar-2011 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Changed mailbox_search_*() API to return pointer struct mail.
This reduces the flexibility, because now different mailbox_search_next()
calls can't have different mail parameters with possibly different
wanted_fields settings. This flexibility was never used though, and removing
it gives a couple of benefits:
* it's now easier for backends to implement prefetch and parallel search
* usage is easier since mail_alloc()/mail_free() is no longer needed |
d83e46e7cd1ffd76210823dadcac549124c96d4e |
|
10-Mar-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Initial support for local index files. |
29371e68adc180501454783b44ec8e43b4e6ddc1 |
|
28-Feb-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Use multiple client connections when necessary. Some other fixes. |
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. |
c5d6b453eccc0962eae967abc10e028a740e1256 |
|
01-Feb-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Moved settings from plugin {} section to proper imapc_* settings. |
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. |
9ca6d68fbad1892423ca798818f579c95475a19a |
|
23-Jan-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Fixed mail_set_seq/uid() to work. |
719bda7961b0ceced935b56a4f4494f2f6191b15 |
|
23-Jan-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Implemented more methods. |
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. |
90de49eb151c2be7655ce6aef5aa3b58295d5c84 |
|
20-Jan-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Added support for LIST/LSUB. |
9fb018dea4e2073639249ea8a14ae27cab2c0aac |
|
16-Jan-2011 |
Timo Sirainen <tss@iki.fi> |
Added initial implementation of "imapc" storage.
It can be used to create a "smart IMAP proxy" where Dovecot uses remote IMAP
server as a mail storage.
This is a very rough early implementation. Performance isn't good, many
required features are missing, error handling is lacking and code needs
de-uglification. Still, it should be enough for selecting INBOX and
accessing mails in it. |