b62495f818944c701e22b7a9a31d81d0c2f4543d |
|
02-Jan-2018 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
dsync: Set brain->failed to TRUE when UIDVALIDITY changes
This happens if UIDVALIDITY changes during stateful sync.
Fixes Panic: doveadm: file dsync-brain-mailbox.c: line 377 (dsync_brain_sync_mailbox_deinit): assertion failed: (brain->failed) |
bcb4e51a409d94ae670de96afb8483a4f7855294 |
|
01-Jan-2018 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2018. |
c864fdd520b0c3f10a4b9bc5373368f4ae8faaff |
|
28-Dec-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
dsync: Add per-mailbox sync lock that is always used.
Both importing and exporting gets the lock before they even sync the
mailbox. The lock is kept until the import/export finishes. This guarantees
that no matter how dsync is run, two dsyncs can't be working on the same
mailbox at the same time.
This lock is in addition to the optional per-user lock enabled by the -l
parameter. If the -l parameter is used, the same lock timeout is used for
the per-mailbox lock. Otherwise 30s timeout is used.
This should help to avoid email duplication when replication is enabled for
public namespaces, and maybe in some other rare situations as well. |
67bbcd664bebce9a507a49c67273be4814d07c97 |
|
12-Oct-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Add mail_index_cache_optimization_settings |
47a5a7e8296f3b8f2fac9a0659d4de3f2723ba4a |
|
06-Oct-2017 |
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi> |
global: Use PRI* macros and %zu instead of casting |
69a71891361b2b27ff68ed84b29278486628464a |
|
27-Sep-2017 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
dsync: Add hashed_headers setting
This makes it possible to configure them |
328ac493fb40b35a6e1d618bd87ffa0e02f4764f |
|
26-Sep-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
dsync: Improve reason when logging "modseq .. no longer in transaction log"
Show the current highest, as well as the last common UID and the current
next UID. These can help to try to figure out problems. |
280bc7d8b07490dfa5cf0fc20aee8e9e2d15aa99 |
|
04-Sep-2017 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
dsync: Ignore missing remote mailbox when doing unidirectional sync
If there are some folders on remote system that
are being ignored by remote brain, do not error out. |
f3c24c2c92802cb773315eba1132254932d8709b |
|
23-Jun-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
dsync: Use header hashing version 3 |
a76faea3eb26c4cd67886fbe02c604f74d54be8c |
|
17-May-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
dsync: Try to commit transactions every dsync_commit_msgs_interval messages
This was first attempted to be implemented by
ec0cc8fa647794e44a1afaa448f495a713048dc4, but it was later partially
reverted by 5973d496b16721af6d2c1fa90b016aacddf13554. This current
commit should fix its problems. |
bf7dc750b95039981c0e9d728f313d50cf38a156 |
|
23-Mar-2017 |
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi> |
global: Log internal storage error on failure |
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 |
4f7951e71128c120d8a502d6406cc603fcc8eb0b |
|
01-Dec-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
dsync: When logging "Mailbox changed caused a desync", log also the reason.
The reason is usually somewhere in the debug logs, but it's difficult to
find from there. |
f43ce62fa945f597e8a48e09c53d46dcc95445d4 |
|
28-Oct-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
dsync: Fix potential assert on mailbox deinit.
Should have happened only in somewhat rare error conditions that require
resyncing.
Fixes:
Panic: file dsync-brain-mailbox.c: line 358 (dsync_brain_sync_mailbox_deinit): assertion failed: (brain->failed || brain->sync_type == DSYNC_BRAIN_SYNC_TYPE_CHANGED) |
ee8294dbc7bb549557f6ba1264d66b55fbef69b6 |
|
10-Oct-2016 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
doveadm-sync: Add end-date support |
ae949831f1f668b5501b4b125e7f7b1767fb109b |
|
11-Aug-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
doveadm sync/backup: Added -S <max size> parameter to skip too large mails. |
afd6d387ea65843b59fb6051fb567719d2a5279c |
|
08-Aug-2016 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
dsync: Add support for features
Add empty_header_workaround as first feature |
e229fe84553486b4ab37584f2a896a33384d0d70 |
|
29-Jun-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
dsync: When full resync is wanted in a stateful sync, output empty state.
This continues 3d49dc64d, which didn't actually work because
brain->require_full_resync was either cleared earlier or it was never
even set in this brain. |
805d7834412465268486c50711962407ad13fbf6 |
|
25-Apr-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
dsync: If state is invalid, exit with code 2 instead of tempfail.
We'll have dsync_mailbox_import_*() just return success to everything until
_deinit() is called. The _deinit() will return a failure and set "resync
needed"-flag, which caller will know how to handle. |
03af8e5325a7b4fec36414ac35949457bc426c0b |
|
12-Apr-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
dsync: Don't export header hashes if remote mailbox is empty.
This avoids doing a lot of work of reading through all mails' headers and
hashing them, when the hashes aren't actually going to be used for anything. |
45af47783693b3ba2768c5ad34eeff68132382d0 |
|
26-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
dsync: When comparing headers' hashes to match messages, try to normalize the input.
This is especially useful because some IMAP servers return different data
depending on whether we're fetching only specific header fields, all headers
or entire body. For now we're assuming that any non-ASCII is going to be
replaced with '?', which helps at least with Zimbra and Yahoo. The header
hashing algorithm is now versionable, so it can be modified more easily in
future.
This change should make imapc_features=zimbra-workarounds setting obsolete. |
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/' |
14b1d2a2634e75b988078baee1e8ad678de28a04 |
|
20-Oct-2015 |
Timo Sirainen <tss@iki.fi> |
dsync: Added DSYNC_BRAIN_FLAG_NO_NOTIFY to enable MAILBOX_TRANSACTION_FLAG_NO_NOTIFY
It's arguable that this should be enabled by default, but people might like
to keep mail_log notifications for dsync. |
ce0e25f26d6e67480ee39b5ca0ad634fa60c4605 |
|
18-Mar-2015 |
Timo Sirainen <tss@iki.fi> |
dsync: Use storage's mail_error to choose the doveadm exit code.
Instead of always assuming that all errors are EX_TEMPFAIL. |
24bd831901b8fd59718e353b36eaef6a950f09a2 |
|
13-Mar-2015 |
Timo Sirainen <tss@iki.fi> |
dsync: Added an extra "finish" state to allow slave-dsync to report error to master-dsync.
I'm not sure if that's actually necessary, but just trying to follow the
different possibilities on how dsync run can finish made me unsure about it.
This should make it at least clear that if a slave-dsync has a failure flag
set at deinit master-dsync will know about it before it returns success. |
de3175adb4094086dc8ba13132a39567f9c42e54 |
|
03-Mar-2015 |
Timo Sirainen <tss@iki.fi> |
doveadm backup -R: Open the mailbox as readonly, so with imapc EXAMINE is used. |
2e652d2651b2800f99a17dcb3014a009fe4660d3 |
|
20-Jan-2015 |
Timo Sirainen <tss@iki.fi> |
dsync: Added -F parameter to sync only mails with[out] specific flag. |
70df8f39fb3db7c49b18c855178f8172176a037a |
|
20-Jan-2015 |
Timo Sirainen <tss@iki.fi> |
dsync: If same GUID already exists in storage, try to copy it instead of recreating the mail.
This way most mailbox backends can reduce disk space by only doing a
reference count update.
This feature isn't enabled by default. A virtual "All Mails" mailbox needs
to be configured using the virtual plugin. Then you need to give this
mailbox as -a parameter, e.g.:
doveadm sync -a "Virtual/All Mails" ...
Currently this is implemented by reading through all the GUIDs in the
virtual mailbox. This of course isn't very efficient for things like
incremental replication. An upcoming conversation plugin will keep track of
all the mails' GUIDs, so in future replication should be able to have this
functionality efficiently as well. |
3561c7bb472a78af74d755219cc0fc71c85ff5c2 |
|
19-Jan-2015 |
Timo Sirainen <tss@iki.fi> |
dsync: Added -t <timestamp> parameter to save only mails newer than <timestamp>
If one side has old mails that don't exist on the other side, they are
ignored (not synced and not deleted). |
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> |
d519a0449d0e536a32db93305516fdbd7db6773d |
|
29-Sep-2014 |
Timo Sirainen <tss@iki.fi> |
dsync: Added DSYNC_BRAIN_FLAG_NO_MAIL_PREFETCH to avoid opening mails unnecessarily. |
33bd898e7756b289e65f43133312d9637afc1371 |
|
25-Sep-2014 |
Timo Sirainen <tss@iki.fi> |
Avoid logging warnings about increasing memory pool/data stack with DEBUG on.
These could have a minor effect on memory usage, but shouldn't be much. |
70058d29cf8c77501741ddbc39178cfc87ca459e |
|
12-May-2014 |
Timo Sirainen <tss@iki.fi> |
dsync: If incremental sync fails because of desync, log the reason why |
9f240e2ce97176146b63506a8ee04034f712cf45 |
|
11-May-2014 |
Timo Sirainen <tss@iki.fi> |
dsync: mailbox_metadata.cache_fields must be copied to permanent memory.
Any other call to mailbox_get_metadata() would have cleared the memory. |
464e82904c6670bd6c96b8793ceb294d776d6f44 |
|
02-May-2014 |
Timo Sirainen <tss@iki.fi> |
dsync: If we notice that incremental sync won't work, don't continue doing it. |
40440c0fee87be994ba7eb60fc3512a9355708aa |
|
28-Apr-2014 |
Timo Sirainen <tss@iki.fi> |
dsync: If incremental dsync finds that its state is stale, retry (later) with full sync.
This works only when the master itself notices such changes locally. Remote
changes aren't noticed, because the master doesn't send the state to remote
dsync and the master is also the one that decides which mailboxes are
synced. The fix to this probably means sending the state string to remote
dsync and have it check if the state is still valid (= protocol change). |
7d315281ae13a66e13da2b1ad006bdb883018278 |
|
28-Apr-2014 |
Timo Sirainen <tss@iki.fi> |
dsync: Include messages_count in the mailbox states.
This allows detecting that stateful dsync can't be done when message count
is suddenly wrong. |
e475db821baf0c4680dec4441d033697ecebfe06 |
|
25-Apr-2014 |
Timo Sirainen <tss@iki.fi> |
dsync: Added more debug output |
d487aa885845c33fb358d5b3b514eece6791db0e |
|
25-Mar-2014 |
Timo Sirainen <tss@iki.fi> |
dsync: Support multiple -n parameters. |
a8c5a86d183db25a57bf193c06b41e092ec2e151 |
|
04-Feb-2014 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2014. |
cce2c665bb24537bb691f6cad6a36f8080e4a552 |
|
20-Nov-2013 |
Timo Sirainen <tss@iki.fi> |
dsync: have_only_guid128 was never actually being set. |
d1e843e77f4760e303c53d9fce10123fc8d230a1 |
|
17-Nov-2013 |
Timo Sirainen <tss@iki.fi> |
dsync: Support syncing storages with 128bit GUIDs <-> string GUIDs. |
16cd2c1b487b1fb63f3081761e0d1110d61137a9 |
|
21-Sep-2013 |
Timo Sirainen <tss@iki.fi> |
doveadm sync: When -1 parameter is used, ignore missing mailboxes in source.
Previously the syncs finished with "Mailbox changes caused a desync." and
exit code 2. This was especially common when the destination server had
new autocreated mailboxes and user logged in after the first dsync. |
311cbd9b1c81df050f5019600a2a809bc620be00 |
|
21-Sep-2013 |
Timo Sirainen <tss@iki.fi> |
dsync: Added more consistency when debug logging about changes during sync. |
ec047a9c54a02338e85fb1767120b0923f6d4148 |
|
17-Sep-2013 |
Timo Sirainen <tss@iki.fi> |
dsync: Improved debug/error logging for changes during sync. |
36723cf206a7b64b9d972ab0719bbfaacc9316fa |
|
26-Jun-2013 |
Timo Sirainen <tss@iki.fi> |
dsync: Added -1 parameter to do a "one way sync" without reverting changes.
This can be useful during migration when you don't want to delete any mails,
but you also don't want to send changes to the old server either. |
3c73d884362b72c86753939551c94f8baa5702f8 |
|
24-Jun-2013 |
Timo Sirainen <tss@iki.fi> |
dsync: Don't try to find mailboxes from unwanted namespaces. |
a0ebe2a2271759599686f3480aee6a6fe445d16e |
|
13-Jun-2013 |
Timo Sirainen <tss@iki.fi> |
dsync: Don't try to access mailboxes with no_mail_sync flag enabled. |
237a6211c7fc4d6dbb58dd0467da6dba1b8f21f6 |
|
13-Jun-2013 |
Timo Sirainen <tss@iki.fi> |
Memory leak fixes. |
14f6fe5d6c4834f273ca573c23c0659a93123363 |
|
20-May-2013 |
Timo Sirainen <tss@iki.fi> |
dsync: Don't try to sync with GUIDs if we can't set them on the needed side.
With two-way syncing both sides need to have writable GUIDs. With one-way
syncing only the writing side needs to have writable GUIDs. |
b8e6e314eb2f9f1fc8ce2999034321bfeb7a2269 |
|
07-Apr-2013 |
Timo Sirainen <tss@iki.fi> |
dsync: Fixed talking to earlier dsync without mailbox attribute support.
Most importantly it can now be used as an example how to add more features
to dsync. |
f48fdb57185ca68e8c079e174f3e04da36646880 |
|
21-Mar-2013 |
Timo Sirainen <tss@iki.fi> |
dsync: -m '' parameter now syncs mailbox list, but no actual mails. |
55d33f807765482eb47374aaaced1fe714e0b256 |
|
14-Mar-2013 |
Timo Sirainen <tss@iki.fi> |
dsync: Added support for syncing mailbox attributes. |
9ed42a54bed303c68106e59b2072e98930048177 |
|
19-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
dsync: Improved debug output. |
d9b9687bf8cae9cfb070b1b7aadefa683220269f |
|
16-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
dsync: Various importer fixes. Handle unexpectedly wrong mailbox state better. |
975a784c2e02ecdcb56efb7a1db5e4769c7756d8 |
|
11-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
dsync: Fixes for syncing without GUIDs. |
979d89c147520f2934c14c31aeb9310fd2d62a46 |
|
10-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
dsync: Automatically figure out which mailboxes can sync with message GUIDs. |
887a9fbbb2ca6afd53365ba2ccae0ef8728d6948 |
|
10-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
dsync: Renamed "guid_requests" to "mail_requests"
The mails aren't necessarily requested by their GUID. |
c267b524417ac7472ac58675e61ff4370484cb1a |
|
10-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
dsync: Removed unused DSYNC_MAILBOX_IMPORT_FLAG_MAILS_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. |
63f01d5e4c9efe985fad63d5851dd1c5c153affa |
|
21-Jan-2013 |
Timo Sirainen <tss@iki.fi> |
dsync: Error handling crashfix |
307ec6c2c319e3335ddb1a7aca2d2884fe17fae0 |
|
09-Jan-2013 |
Timo Sirainen <tss@iki.fi> |
dsync: Don't wrongly log errors about missing message bodies.
Also added some debug logging related to it. |
6abf66a3731d52889517bd644595c540e3a9b3ec |
|
04-Jan-2013 |
Timo Sirainen <tss@iki.fi> |
dsync: Use private modseqs to support syncing private flags in shared mailboxes. |
c7be65f5adbc2990fbe6eeffb6df5054a8a49d9d |
|
15-Dec-2012 |
Timo Sirainen <tss@iki.fi> |
dsync: Don't start reading a mailbox until we know we actually need to sync it. |
e0c10ab25f82f3b5b099de5d84ece39efd18bc6a |
|
14-Dec-2012 |
Timo Sirainen <tss@iki.fi> |
dsync: Error handling fix when mailbox is unexpectedly lost. |
efeb13303798b47d2c4295468d233c1bcfd79c94 |
|
24-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
doveadm backup: Revert all local changes. |
c307328f59c963eba21091ecd36c9435d42b47d8 |
|
20-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
doveadm sync/backup: Added -s <state> parameter to do a fast stateful sync.
Initially use an empty string for the input state. The output state is
written to stdout. |
e83126866761632b437e532dfdc30be01d14039d |
|
21-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
doveadm: "backup" command is working again. |
a85473f7c11c8734bdee9c2cbe4b767f144a18aa |
|
07-Sep-2012 |
Timo Sirainen <tss@iki.fi> |
dsync: Renamed "slave" to "ibc" (= inter-brain communicator) |
678d0463849ba777106eb7875f27db07a5d8e3df |
|
19-Aug-2012 |
Timo Sirainen <tss@iki.fi> |
Hash table API is now (mostly) type safe. |
fbd671a3f51a5f92535923fcaf05fed1e5712ae4 |
|
13-Aug-2012 |
Timo Sirainen <tss@iki.fi> |
Compiler warning fixes |
b66d803de86bfb411165b3465b0d9ef64ecfe2a1 |
|
25-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
Avoid using (void)s by adding ATTR_NOWARN_UNUSED_RESULT attributes and other ways. |
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. |
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. |
7bd5b1c64cc987715bdaf8cc4907c3c37d5d7b29 |
|
22-May-2012 |
Timo Sirainen <tss@iki.fi> |
Initial version of dsync rewrite.
* doveadm backup not implemented at all yet
* syncing mailbox renames is somewhat broken (at least renaming \noselect
mailboxes)
* saving/restoring "state" is implemented by dsync brain, but not by
doveadm. this should be easy to do, just need to figure out how the
replication code wants it. |