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. |
2352ce293bab6bb5371805d8c58a09f15a11e0c9 |
|
18-Jan-2018 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Keep "selected" state TRUE only while mailbox is successfully SELECTed |
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. |
67445e2ac5a75d361d3c68eedcb9e1a3655440b8 |
|
05-Oct-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: imapc_mailbox_get_selected_status() can't fail - remove dead code |
a943ed0f901e312445fd393249b91932797bba79 |
|
03-Oct-2017 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
global: use i_close_fd{,_path}() instead of open-coding them |
6307d76096764e66bddc63d4a3e5a1aa19cc528f |
|
19-Sep-2017 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
global: start relying on buffer_free(NULL) being a no-op
Cleanup performed with the following semantic patch:
@@
expression E;
@@
- if (E != NULL) {
- buffer_free(&E);
- }
+ buffer_free(&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); |
7b0a52bf38f8a7ab0c262acf4c761d6a0f22a07c |
|
07-Sep-2017 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
lib-storage: convert imapc to use container_of |
3c8055b25beef96e7be25895bac34f3eda7ceca1 |
|
08-Aug-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Add imapc_features=send-id to send ID x-session-ext-id |
f94abb02d228a078defac6d457f15cb6d8f82dda |
|
12-Jun-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Don't reconnect on STATUS if auth failure was already seen. |
ab838f1555795d5766bdaef795a14c98a5437c9e |
|
12-Jun-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Make sure storage error has the proper auth failure error string
The first failed command always had the correct error string, but the
following failed commands just returned -1 without updating storage error.
The storage error could have been something completely different by then. |
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. |
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 |
6e853fdf3a5670a2eb2d57b059afcee7fb6cbd47 |
|
19-May-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Fix assert-crash if server doesn't send EXISTS reply to SELECT
Fixes:
Panic: file imapc-sync.c: line 477 (imapc_sync_index): assertion failed: (mbox->sync_fetch_first_uid == 1) |
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. |
bc3309d262b7e38e20446d302caea9a05888f6c1 |
|
19-May-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: If initial SELECT fails, don't resend it twice on reconnect. |
e709efb3dc325b2badbefdf140c940281d415d14 |
|
26-Apr-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Fix memory leak when closing mailbox with delayed changes |
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. |
378653a02a5a673e995f47e48a3371804171f964 |
|
24-Apr-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Fix crash in mailbox_exists() when LAYOUT isn't imapc.
Especially breaks LAYOUT=none. |
e00612b245b41cc47a5c6214794c415aaa8c91b7 |
|
24-Apr-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Make sure client is logged in when checking capabilities
Especially with imapc_features=delay-login the capability could have been
looked at before the client was even connected. |
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. |
efd4de737ee4febffced006511f357959234a6ca |
|
10-Apr-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Change imapc_connection_retry_interval setting to be in milliseconds. |
4727aef38f51e62e27b4f2c1b77fb5438ad5e733 |
|
10-Apr-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-imap-client: Change connect_retry_interval_secs to _msecs
This allows caller to provide better precision. |
294c52ba40b626ab1288a27441980cf5285f87dd |
|
06-Apr-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Remove "_sec" suffix from imapc_connection_retry_interval_secs
Its type is SET_TIME, so the value doesn't have to be in seconds. |
1f31b38b6668439f0ee135c150dd2a71c2fa54c9 |
|
05-Apr-2017 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib-storage: Do not clobber error with imapc |
276c62e4538faf5bf3ae127a7b7c246c5d37add2 |
|
05-Apr-2017 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
global: Fix imapc_client_login usage |
c515f5c969f7a3a5b525ab15bde2f116cbe932de |
|
03-Apr-2017 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib-imap-client: Make retry count and interval configurable |
30871b77e627d3d6b244305fbea7aeee578f2927 |
|
26-Mar-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Add imapc_features=delay-login
The connection to imapc_host is delayed until it's actually needed to be
performed. |
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. |
d35da39e688b94bb7e9adc6c865a45004c64a506 |
|
19-Mar-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Use LOGOUT to cleanly disconnect from server.
This makes it clearer in the remote server's logs whether the disconnection
was intentional or not.
Use a hardcoded 5 second timeout for LOGOUT. It should be enough time for
the server to finish sending the tagged reply. |
2898ad0028a9b0c30df96dd6b68930fd4dc57527 |
|
19-Feb-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Add MAIL_ERROR_LIMIT |
adb27e42fb81b32ecb37193a3ce443181172ee99 |
|
15-Feb-2017 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
lib-imap-client: centralize authentication failed error logging |
64a36868b6e11c91da3d051d581e1a52c6da2f43 |
|
30-Jan-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Allow using LAYOUT=none without crashing. |
fc452ed724837734a04214bc8f9f112c603b28f7 |
|
20-Jan-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Fix assert-crash on some connect failures
imapc_storage_has_modseqs() causes imapc_client_get_capabilities() to be
called, which assert-crashes if there isn't a valid connection:
Panic: file imapc-client.c: line 438 (imapc_client_get_capabilities): assertion failed: (conn != NULL) |
2454dfa32c93c20a8522c6ed42fe057baaac9f9a |
|
01-Jan-2017 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2017. |
efe78d3ba24fc866af1c79b9223dc0809ba26cad |
|
24-Dec-2016 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
global: Replaced all instances of memset(p, 0, sizeof(*p)) with the new i_zero() macro.
Used the following script:
C_FILES=`git ls-files *.c`
H_FILES=`git ls-files *.h`
for F in "$C_FILES $H_FILES"; do
echo "$F"
perl -p -i -e 's/safe_memset\(&\(?([^,]*)\)?,\s*0,\s*sizeof\(\g1\)\)/i_zero_safe(&$1)/g' $F
perl -p -i -e 's/safe_memset\(([^,]*),\s*0,\s*sizeof\(\*\g1\)\)/i_zero_safe($1)/g' $F
perl -p -i -e 's/memset\(&\(?([^,]*)\)?,\s*0,\s*sizeof\(\g1\)\)/i_zero(&$1)/g' $F
perl -p -i -e 's/memset\(([^,]*),\s*0,\s*sizeof\(\*\g1\)\)/i_zero($1)/g' $F
done |
b80e0097ab96ca62d1b9ddf4b2d7b7c77c745307 |
|
17-Dec-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Log server disconnection error only once. |
2ac5f36aa7c2e7a07ba8815d43a6d7483f62e74c |
|
16-Dec-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: Change string position/length from unsigned int to size_t
Mainly to avoid truncating >4GB strings, which might potentially cause
some security holes. Normally there are other limits, which prevent such
excessive strings from being created in the first place.
I'm sure this didn't find everything. Maybe everything could be found with
compiler warnings. -Wconversion kind of does it, but it gives way too many
unnecessary warnings.
These were mainly found with:
grep " = strlen"
egrep "unsigned int.*(size|len)" |
857c471c13ca215f4be9dd4b336b742b8d434e31 |
|
25-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Add mail_storage.list_index_corrupted()
The actual implementation is in the next commit. |
2f26f75219804e775c44f6b45a201a941d5590c3 |
|
18-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: %zu isn't standard, use PRIuSIZE_T instead. |
46e917c9fa05cbe7bddf805d3a9838b61e3960e1 |
|
18-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Add mail_namespace_get_driver_settings() and use it.
It obsoletes mail_storage_get_driver_settings(). |
08b9350b17bb0abd822dd1f11452df1476077747 |
|
17-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Fix assert-crash when deleting mailbox triggers mailbox_get_open_status().
For example vsize header updating triggers this.
Fixes:
Panic: file mail-storage.c: line 1683: unreached |
1f4d459111419a47021e677839439f2e2ca78ad5 |
|
18-Oct-2016 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
imapc: use serialized settings as unique_root_dir
Without this, it is not possible to instantiate multiple imapc storages.
Any attempts to will result in multiple namespaces sharing the same storage,
regardless of if that was the intention. |
c23ebb9b0e0b760ca8da16fde34ff33f5ece5e07 |
|
06-Oct-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Added imapc_max_line_length to limit maximum memory usage.
The default is still unlimited, but this should be set to something smaller
for untrusted servers. |
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. |
06116e6a19bc4916ddf349108e59e38eda83d533 |
|
12-Apr-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Mark most of the commands retriable. |
e74f4afdd0cdeeb9a5cebd7973dfc9adbe6cb426 |
|
12-Apr-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Fixed mailbox_exists() error handling. |
e82efb347c91c199218e41065c2acb3464247b1a |
|
05-Apr-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: If we get disconnected during SELECT/EXAMINE, retry it once.
This seems to be happening especially with dsync migrations from IMAP
servers with small timeouts. The initial dsync run opens imapc connection
early to do a LIST + SELECT the first mailbox, but then dsync may spend a
while creating all the local mailboxes before it continues using the imapc
connection. |
d78eb0a68297f3588a9ffe5a78e496ad500fb1e0 |
|
01-Feb-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Compare INBOX in STATUS case-insensitively. |
cff23ec51177f11902c99b727268eb05ea7c97c7 |
|
24-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Added imapc_cmd_timeout setting to control the command wait timeouts. |
bd06c77a12bb02871b25dceb749fa955f4a272ff |
|
16-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Added support for PROXYAUTH command by setting imapc_features = proxyauth
This can be useful when talking to Sun/Oracle IMAP server, which wants you
to use LOGIN+PROXYAUTH to perform master user logins, instead of supporting
the standard SASL PLAIN authentication. |
df596e34b604e6ac873de9ca92fb5df2a5fed45f |
|
15-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Added imapc_features = no-examine |
e21baa33b4f1e7ad095566341515e65f51acadf6 |
|
15-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Fixed mailbox name escaping for STATUS |
6e2bb07ff164bbac054cc53a4b4ca0d8aee909d1 |
|
14-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
imapc: Fixed mailbox name escaping for CREATE, DELETE, RENAME, SUBSCRIBE, UNSUBSCRIBE |
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. |
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/' |
ae9b70a446dccba3160fb0df332f84ef98825604 |
|
26-Aug-2015 |
Timo Sirainen <tss@iki.fi> |
imapc: Fixed handling escape-char
The current code should now handle all kinds of mailbox names correctly, including:
~/foo
%7e/bar |
9a717bf84366bdd2ee25f95c49ffc911999dbd1f |
|
23-Jun-2015 |
Timo Sirainen <tss@iki.fi> |
imapc: If login is aborted at deinit, don't log an error. |
c1a2ab40974dc48ca68b9fc58799b01bbcb9520b |
|
23-Jun-2015 |
Timo Sirainen <tss@iki.fi> |
imapc: Don't automatically login to IMAP server for list=no namespaces. |
014cfdf92b145bc7ff4d1393ca24dfef5c109b0f |
|
02-Jun-2015 |
Timo Sirainen <tss@iki.fi> |
imapc: If auth fails due to connection failure, don't treat it the same as failed login. |
a7348c7fdc2c65d6452f740ccdfa29e66916e5d7 |
|
23-Apr-2015 |
Timo Sirainen <tss@iki.fi> |
imapc: After auth failed, return failure immediately when opening a mailbox.
Instead of trying to re-authenticate which again will most likely fail.
Based on patch by Michael M Slusarz |
4733d3729d64480179a30698bb3412d0a074b6eb |
|
19-Mar-2015 |
Timo Sirainen <tss@iki.fi> |
imapc: Don't crash in mailbox_is_inconsistent() with unopened mailbox. |
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. |
de26c21cfadf24c1fa59f06414854d58b3d8baad |
|
11-Mar-2015 |
Timo Sirainen <tss@iki.fi> |
imapc: Added throttling settings to imapc_features=throttle:a:b:c
This change could be reverted once good settings are found. |
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). |
c6033074ada5c7441ff7bb12c4b433cae737fea2 |
|
08-Jan-2015 |
Timo Sirainen <tss@iki.fi> |
imapc: Added imapc_sasl_mechanisms setting
The first supported SASL mechanism is used, otherwise the login fails
entirely. |
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> |
ad9403d54b5a0f312de6fa22abda6c120988d3de |
|
24-Sep-2014 |
Timo Sirainen <tss@iki.fi> |
imapc: Fixed potential crash when trying to send NOOP before mailbox was fully opened. |
2ed2459dbd183bb371da4a0aecb2d2b74ae7c815 |
|
15-Aug-2014 |
Timo Sirainen <tss@iki.fi> |
Handle "out of disk space" and "out of user quota" as separate cases.
"Out of disk space" is a temporary error that should be logged as error and
the failure should be sent to user as "Internal server error".
Obsolete the use of MAIL_ERROR_NOSPACE and MAIL_ERRSTR_NO_SPACE. Use the
clearer MAIL_ERROR_NOQUOTA and MAIL_ERRSTR_NO_QUOTA instead. |
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. |
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) |
b5d2b15b763729a19a03b905d5ae341f759c7db2 |
|
29-Oct-2013 |
Timo Sirainen <tss@iki.fi> |
imapc: Added a Courier-workaround for not returning UIDNEXT on SELECT. |
9a7f22e2c14b507e6044e5534df978a0c3b638d0 |
|
19-Sep-2013 |
Timo Sirainen <tss@iki.fi> |
imapc: Abort pending commands before any deinitialization to avoid crashes. |
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. |
4ee385fb4e4b007d3fa907b7616988006a21e85f |
|
10-Jul-2013 |
Timo Sirainen <tss@iki.fi> |
imapc: Minor code cleanup. |
af466fd3ee9d17f2e7b264079d25306c5598b200 |
|
08-Jun-2013 |
Timo Sirainen <tss@iki.fi> |
imapc: imapc_storage no longer requires imapc_mailbox_list. |
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. |
58ba0fe5a6904d3a65cfe268411f4cbb881234ee |
|
01-Jun-2013 |
Timo Sirainen <tss@iki.fi> |
imapc: Fixed mailbox deletion. |
0bf0c44fce1df29e60f4f5b312ebe862d44aa237 |
|
31-May-2013 |
Timo Sirainen <tss@iki.fi> |
imapc: Empty imapc_user expands to namespace's owner, or with public namespaces to user itself.
The main idea is that with shared namespaces it now expands to the shared
username, allowing shared mailbox access via imapc. |
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. |
56d1345c43bbd28c36b7faa85e4163bd9e874290 |
|
07-Apr-2013 |
Timo Sirainen <tss@iki.fi> |
Added ssl_client_ca_file to specify the CA certs as a file instead of as a dir.
This is required for Redhat-based systems where there isn't a CA directory
like in Debian/Ubuntu. |
6eeb3fd0f42be578ea846fd13398df23505fe3b7 |
|
04-Apr-2013 |
Timo Sirainen <tss@iki.fi> |
imapc: Give an early error message if imapc_list_prefix ends with separator. |
16cb5d65265dd0b216542803fd80c4b999ae118e |
|
19-Mar-2013 |
Timo Sirainen <tss@iki.fi> |
Moved ssl_client_ca_dir and ssl_crypto_device to mail_storage_settings.
Probably could also be moved to master_service_settings, but that makes
accessing them a bit more tricky with the current code. |
8969b39bc3034f841acad83e7b50e4678e49e3a4 |
|
25-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Replaced pop3c_ssl_ca_dir and imapc_ssl_ca_dir with generic ssl_client_ca_dir. |
8ae72ad7d0c69e972cfa65d1e2ce4e3e9a8b765c |
|
24-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
Replaced all -1U and (unsigned int)-1 with UINT_MAX.
It's somewhat clearer this way. Also clang's -fsanitize=integer gives
runtime errors about -1U (but not about explicit casts, so no need to change
(type)-1 casts). |
8b31f966d9688e07672ef1958dcbdb7686523c04 |
|
10-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Added mailbox_status.have_guids flag |
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. |
6bb12832eb490920803b5ad184b1759c63f455bf |
|
21-Jan-2013 |
Timo Sirainen <tss@iki.fi> |
imapc: Handle mailbox_update() when possible, instead of always just failing. |
40c0aad390ce459959f5e26bab8a2ea7818d1add |
|
21-Jan-2013 |
Timo Sirainen <tss@iki.fi> |
imapc: Avoid unnecessarily selecting a mailbox when looking up its GUID. |
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. |
1f1ee8db68d9ae1604350801cd8dc33ebe29fe8a |
|
29-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Renamed mail_storage_set_index_error() to mailbox_set_index_error() |
8c909e451d14075c05d90382cf8eebc4e354f569 |
|
29-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
Replaced *_INDEX_PREFIX macros with a common MAIL_INDEX_PREFIX. |
c6afd726060aae56b6622c6c52aec10231c4bf1c |
|
29-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Moved mail attribute dict to struct mail_storage.
This also means that index_storage_destroy() must always be called, so
removed now unnecessary mail_storage.destroy=NULL checks. |
62041dfb7d6ac6e9c633a557075999cdfcff7bd5 |
|
13-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Added support to get/set/iterate mailbox attributes.
The attributes are stored in a dict specified by mail_attribute_dict
setting. The idea is to use this as storage for extensions that require
per-mailbox key=value pairs, such as METADATA. |
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 |
cee50689ea9f3cfec451a6e105307ee2d86ed5dc |
|
14-Aug-2012 |
Timo Sirainen <tss@iki.fi> |
imapc: Added imapc_max_idle_time setting to force activity on connection.
Reducing this from the default 29 minutes should help when there's a
stateful firewall between imapc and the backend server. |
e34d170f8f0e084bd94bfbc1a7085ece67e508df |
|
25-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
Make sure we check all the functions' return values. Minor API changes to simplify this.
Checked using a patched clang that adds attribute(warn_unused_result) to all
functions. This commit fixes several error handling mistakes. |
e160cd1c4674b3f9df72bc0a1e7438031266dc8a |
|
21-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
imapc: Don't crash when using multiple imapc namespaces. |
9438ecaf1caee1bb33c8d7f638742875ac42c4e5 |
|
26-Feb-2012 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Removed min_timeout parameter from mailbox_notify_changes()
It's now internally taken from mailbox_idle_check_interval setting. |
5f5870385cff47efd2f58e7892f251cf13761528 |
|
12-Feb-2012 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2012. |
067b80dd7801ad8474f401a12a548fcc1d7e75b6 |
|
02-Feb-2012 |
Timo Sirainen <tss@iki.fi> |
imapc: If base_dir isn't set, do a blocking DNS lookup.
This is mostly a workaround for being able to run imapc from standalone
programs (e.g. doveadm) without running Dovecot. |
5c6aa687a33a4d819f4b50bb9ec02535395865d6 |
|
09-Jan-2012 |
Timo Sirainen <tss@iki.fi> |
imapc: Added imapc_master_user setting. |
6469cf211a57433335641725dc236ebb2b9fdd3b |
|
30-Dec-2011 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Added struct mailbox.set_subscribed() virtual method. |
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. |
93ec4c886440b9a3008c780fd72ee8b9d4a3c21e |
|
12-Dec-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Removed HIGHESTMODSEQ handling from STATUS command.
We don't currently even attempt to handle remote modseqs, so HIGHESTMODSEQ
shouldn't be used either. |
14a717c9600c1e9e41ea2c4f7e52af613d874d7e |
|
08-Dec-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Crashfix on error conditions. |
11bbebd9f9a8043365e87a621a263749e93334bd |
|
24-Nov-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Pass ssl_crypto_device setting to lib-ssl-iostream. |
c5a7be1b6f1a957065951f24530741faa18c58a6 |
|
23-Nov-2011 |
Timo Sirainen <tss@iki.fi> |
Compile fixes. |
7cf1c7dd3dfd989cba1ed32a8e17c1b031c4629b |
|
04-Nov-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Don't use separate indexes/ directory anymore. Fixes/cleanups to make it possible. |
35779754964119c94b919b75bbf1ccc1c02aad52 |
|
17-Oct-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Added imapc_ssl_verify setting. |
f87844c400cf9741abad57d9815121d0738a738f |
|
09-Oct-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Support retrying some IMAP commands if we get disconnected. |
b2048c45f6c6ace7d90a2c05f0f3fc6e03e30f38 |
|
09-Oct-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Mailbox reopening fix. |
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 |
fb37a9b7bb71807a394e3ecdb74511f32a79c39b |
|
07-Oct-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Changed mailbox opening API to be more extensible. |
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. |
206ed2f6fa3a6fb291498627b2da626581c07a18 |
|
02-Oct-2011 |
Timo Sirainen <tss@iki.fi> |
lib-storage: mailbox_get_metadata() no longer always opens mailbox. |
cdf00df4dc5d0ae5acfdf200d2e846dbb92fda7e |
|
01-Oct-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Changed imapc_client_mailbox_cmd() parameter order to be same as in _cmdf(). |
97ff916ad7977bb8147750b8cf40d0d25d0730f6 |
|
01-Oct-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Make sure mail cache is freed when mailbox is closed. |
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. |
0998339f5a8424ce0b9f108006fa6bbc74be70df |
|
21-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Added imapc_rawlog_dir setting. |
feccf3f8679807f25d105521d5f6ddce6df7cdce |
|
20-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
Increased initial memory pool sizes. |
1228c0604b8e21e170bba3e2060331599a378110 |
|
12-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Fixed mailbox_exists() to actually work.
This fixes problems with subscribing to mailboxes. |
2dc23f3416724163cc5d7162c577a8ed9f985fed |
|
11-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Fixes to handling non-empty imapc namespace prefix. |
e925d6db5ff447811ca9c5825581a6d8d3218958 |
|
09-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: More fixes to listing mailbox names. |
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. |
bf6d72f9304187cd52205be4628865ff56e2bf57 |
|
08-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: If NOOP fails with disconnection, set "internal error" to storage. |
b720f55c568cce0a1c8c2be74e588b66bb467e82 |
|
07-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Connect to server immediately at startup and lookup hierarchy separator.
If connecting to server fails, this makes it fail earlier. Also we don't
have to worry about what to do later if hierarchy separator lookup fails. |
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. |
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. |
a2d397c3a8024156eb3b4b53c37d07d60588f1e4 |
|
04-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Added assert. |
6021cfec086e455d5bf5db35522953e13a97bb61 |
|
04-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Fixed IDLE handling. |
0d5b4840dbb0abe79e1bddc77608c89fd0419e53 |
|
04-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Use EXAMINE command when possible. |
b59960aed0923004f21f2a00bc1c945084d2f851 |
|
23-May-2011 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Export a list of permanent flags via mailbox_status().
Removed mailbox_allow_new_keywords(), since it's now included in the status
structure. ACL plugin may limit what flags are permanent according to ACLs. |
0102d0a013e82fc352779f60e3d7bb49dee44bf0 |
|
04-Apr-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Make sure we wait for SELECT/APPEND/COPY commands to finish. |
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. |
1460ef7a18c53216ddb4a94bb62fba96076aae8e |
|
24-Mar-2011 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Moved index_mailbox_context.save_*() methods to mailbox_vfuncs. |
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. |
97dc3902e9bcf2e17b9c249999bffba908231b62 |
|
19-Feb-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Added more debugging output with mail_debug=yes |
847112173a65f36251cf39a7fd7d86eba6739953 |
|
17-Feb-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: When local IDLE is started, force remote server to first check changes with NOOP.
This is makes clicking Thunderbird's "get mail" button to check for new
mails with servers that don't notify about them immediately after they
arrive. |
8c98b8adba0e70743d5d8c35ae922038881b1f47 |
|
02-Feb-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Support IDLE even if remote IMAP server doesn't support it. |
c458d2e8b99ec4ce939a58f5b4add83783bc14cc |
|
01-Feb-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Default imapc_user to %u. |
dfaefeabae939803ceb8c503101e86b5496541d1 |
|
01-Feb-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Don't force a root directory to exist. |
c5d6b453eccc0962eae967abc10e028a740e1256 |
|
01-Feb-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Moved settings from plugin {} section to proper imapc_* settings. |
5235a79ca4ea7a9bc7e64bd17ed1617357a25034 |
|
31-Jan-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Fixed sending STATUS command. |
bfc7fcde95de729c7e5f18cca7566a3cf754c0ce |
|
31-Jan-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Added initial support for SSL. |
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. |
719bda7961b0ceced935b56a4f4494f2f6191b15 |
|
23-Jan-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Implemented more methods. |
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. |
90de49eb151c2be7655ce6aef5aa3b58295d5c84 |
|
20-Jan-2011 |
Timo Sirainen <tss@iki.fi> |
imapc: Added support for LIST/LSUB. |
c0a87e5f3316a57e6f915882fa1951d0fbb74a61 |
|
20-Jan-2011 |
Timo Sirainen <tss@iki.fi> |
lib-storage: mailbox_alloc() now takes a virtual mailbox name and other related API changes.
All storage_name <-> vname conversions now go through the same two
mailbox_list methods. This has many benefits, such as:
* listescape plugin is now much simpler and bugfree
* allows changing lib-storage API to use UTF-8 mailbox names in future
* allows creation of "mailbox aliases" plugin |
306cfd77100131c08b243de10f6d40500f4c27c6 |
|
20-Jan-2011 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Replaced mailbox_list_get_name_status() with mailbox_exists(). |
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. |