615b4468c088b674aad109c9420d7d5c14eebf43 |
|
19-Jan-2018 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
pop3-migration-plugin: Fix context requirements
Fixes Panic: Module context pop3_migration_storage_module missing
Broken by a8703ce24540b7efaa51a8c7d3c72e72727f9789 |
a8703ce24540b7efaa51a8c7d3c72e72727f9789 |
|
18-Jan-2018 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
pop3-migration: Contexts are now required or checked
Satisfies static analyzers |
bcb4e51a409d94ae670de96afb8483a4f7855294 |
|
01-Jan-2018 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2018. |
c147bff818798a979d93537f72f5c1f68f5d5ba8 |
|
24-Nov-2017 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
global: Use t_buffer_create
sed -i -e 's/buffer_create_dynamic(pool_datastack_create(), */t_buffer_create(/g' |
0dab9cb35a976c49b28a11e28d5570f5191f1a7a |
|
22-Sep-2017 |
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi> |
lib-storage: Add reason to mailbox_transaction_begin()
Remove mailbox_transaction_set_reason(). |
87490012895b4f371635ded00add04c9107dcfef |
|
18-Sep-2017 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
lib-storage: convert index to use container_of |
cefa6f3df2f30d84f8279109e9152cada9f67e16 |
|
05-Sep-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
pop3-migration: Strip away invalid header lines.
If there's no ":" in the header, remove it. Fixes matching mails with
Zimbra. |
3bfdab4b3bea87b5c89f31502ef59380afc9e079 |
|
05-Sep-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
pop3-migration: Fail if all IMAP mails were matched by size, but POP3 had extra mails
This makes the handling same as what happens when the same situation happens
and the last mails were matched by headers. That's an error, unless
pop3_migration_ignore_*_uidls=yes. |
65e19f9777ebcc705d8adc33a84735c31baee66a |
|
05-Sep-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
pop3-migration: Add pop3_migration_ignore_extra_uidls=yes setting |
a1d3ff734507eae5b46c0e75e7975344fe060771 |
|
25-Aug-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
pop3-migration: Try to assign UIDLs based on dovecot.index.cache
Add the UIDLs to (imapc) mailbox cache after they've been assigned.
Try to read them from the cache on the next sync to avoid reading
mails' headers.
This can be disabled with pop3_migration_skip_uidl_cache=yes, just in case
there's some kind of a problem with it. |
bc3661d7103bdcb4633f24ae4fd9f5d053fc0646 |
|
25-Aug-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
pop3-migration: Delete unnecessary POP3 order checking code
Nothing is actually using the result. |
29fc8f1dc678f9698363181ea599e6db105ea50f |
|
28-Jun-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
pop3-migration: Drop lines with only spaces or tabs from comparison
Zimbra drops out those lines from IMAP BODY[HEADER] replies. |
e17e53f2a05478b3306d382b87d92c32334cbcf5 |
|
23-Jun-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
pop3-migration: Replace trailing whitespace removal with new header hashing version
This is now done by message_header_hash(), which makes it work correctly
also for dsync+imapc.
Reverts 0cf3b30b86e6c39f43b8e13a718cd078187ca86d, except for the unit tests. |
0cf3b30b86e6c39f43b8e13a718cd078187ca86d |
|
12-Jun-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
pop3-migration: Strip trailing spaces from headers when calculating hash
Fixes matching mails with Zimbra. |
61cf001f1944d92eb25f113ba4c08985d6e30d53 |
|
03-Apr-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: Add mailbox_set_reason() calls
Added to the most important places. |
bf7dc750b95039981c0e9d728f313d50cf38a156 |
|
23-Mar-2017 |
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi> |
global: Log internal storage error on failure |
4d690a42c4dd10d6508e499c5bab58c45a49d1f3 |
|
20-Feb-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage, pop3-migration: Reset lookup_abort before continuing to search
This doesn't really fix anything right now, but it'll allow adding the
asserts in the following commit. |
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 |
b75eba4f65c7630d3691f07d22ff4bdfcac5054d |
|
22-Sep-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-mail: message_header_hash_more() now allows input in any slices.
There wasn't necessarily any guarantees that the input would be sliced in
such a way that the repeating '?' would be dropped the same way every time. |
a415de5243c4a22df91496274762ca6637e9a104 |
|
22-Sep-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
pop3-migration: "first POP3 msg" warning didn't actually show the first one.
It was showing the first index in an array, which had nothing to do with
being the first POP3 message number. |
6d2e2c79173f8af12b17c89ac5ec07b8be23971d |
|
15-Sep-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
pop3-migration: Fixed crash when not specifying pop3_migration_mailbox setting. |
061046c9aa2eec5c6c2f148ec95a4e51db3d8fd2 |
|
14-Sep-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
pop3-migration: Avoid unnecessarily using stream's hdr_size.
Shouldn't change any behavior, except reduce CPU usage a little bit. |
2bc67190c90d08703ceb421fc8dcf16780020886 |
|
12-Sep-2016 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
pop3-migration-plugin: Add to index after successful retry
Also change return value to indicate that the hash
has been assigned to header. |
02b78558dc03daa2e7da2010b63f247b49936a38 |
|
03-Aug-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
Use mail_get_*stream_because() wherever possible. |
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] |
9625595c47c665f5aee57ebfcb1fcbe9ad1bf3a0 |
|
31-May-2016 |
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi> |
[LEN] to [static LEN] on some function parameters
Also add STATIC_ARRAY macro to hide it in c++ compilation. |
44ef49403ac7bddac84a1e322d170ed53cd37c95 |
|
16-May-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-mail: Fixed istream-header-filter callback's matched with eoh
Reversed the matched-parameter handling for hdr->eoh, so it's consistent
with non-eoh headers. |
3858a7a5da361c35f1e6e50c8e3214dc0cf379d6 |
|
16-May-2016 |
Phil Carmody <phil@dovecot.fi> |
lib: istream - migrate to i_stream_read_more()
Scripted to find all the low-hanging-fruit (single line calls), but hand-checked:
git grep i_stream_read_data.*,\ 0\) | sed s/:.*// | \
xargs sed -i -e 's/i_stream_read_data(\(.*\), \(.*\), \(.*\), 0)/i_stream_read_more(\1, \2, \3)/'
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
71748cca1bacd74451fd228db5536828bdfeb190 |
|
03-May-2016 |
Baofeng Wang <baofeng.wang@dovecot.fi> |
global: Use mail_user_plugin_getenv_bool() wherever possible
New API is used to check boolean setting OR exsitence of an env variable. |
a58963a8bdac0438a31abc03711e8870b4dfa4f4 |
|
01-Feb-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
pop3-migration: Ignore mails returned as expunged by pop3c.
Whether the -ERR actually meant they were expunged or not is another
issue, but the answer to that belongs to pop3c code. MAIL_ERROR_EXPUNGED
in any case can be safely handled this way here. |
06fda713b84e857dbc3e80f401a54085c9b0ed16 |
|
01-Feb-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
pop3-migration: Use message_header_hash_more() instead of duplicating the code |
d430698b6d9d47ff9136ee137cc58a1c657baedd |
|
28-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
pop3-migration: Fix to 5407a86 - don't sync POP3 UIDLs when we don't need to |
5407a86a03963261bf5ba8793b8c97879ad2e224 |
|
27-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
pop3-migration: Perform UIDL syncing a bit earlier to work around Yahoo IMAP bug. |
cfb351c1d28fab5a461f6506471c6b6eb26c0bda |
|
26-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
pop3-migration: If reading message header for hashing fails, fail immediately.
This avoids flooding the log with a ton of errors in case the POP3
connection dies. |
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. |
ee33544fcf7711e933749db618e4ce2ff122ac14 |
|
26-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
pop3-migration: Don't change TAB to '?' when calculating header hash. |
414d4ee117b45834e6e02f32cda9c9472dd89e1d |
|
26-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
pop3-migration: Don't even try to match message sizes with pop3_migration_skip_size_check=yes
This skipped the header check for mailboxes that had only a single mail. |
9abc6ac61e70b809f7e1c352c7a3ad1081994d2e |
|
26-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
pop3-migration: Cached header hashes weren't actually being used for imapc.
We'll need to do the search twice: Once to find out the actual cached header
hashes and then second time do a search for the message headers excluding the
emails whose hashes we already know. This allows prefetching to work for imapc
without prefetching all the emails as it was doing. |
57e1fdc2f8f2bf1c6fcd9523f93459404c2359c8 |
|
25-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
pop3-migration: Add calculated header hashes to local cache.
This allows faster resuming on failures if local pop3c indexes are used. |
30f6ac0eaf2be81072ee078ba5b232c368b89ff1 |
|
24-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
pop3-migration: Fix to 2f19f8 - Don't convert LF also to '?' in header hashes. |
5fa253bd316540ec280ca76b39d62a9e32da228b |
|
24-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
pop3-migration: Filter out headers with invalid names. |
2f19f8ff906a0017b906763e0f7675d49ab0e58f |
|
24-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
pop3-migration: Convert all non-ASCII in headers to '?' |
e9d659ad49a3cf2190606a62289c86347608bffa |
|
24-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
pop3-migration: If we matched all the IMAP (but not all POP3) messages, log about it. |
c39c3d8089fbdd8eb34646c25167aa4551064cf4 |
|
24-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
pop3-migration: Ignore X-Yahoo-Newman-Property: header
This exists only for Yahoo IMAP mails, but not for Yahoo POP3 mails. |
12e32734b3fe762c647c1ae5552185517a988cf8 |
|
24-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
pop3-migration: When logging the first missing POP3 mail, it logged a wrong mail |
af99ca825f4b7674ec6dd0269bbca665775205aa |
|
24-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
pop3-migration: When failing because some messages couldn't be matched, show the first message's number and UIDL
This was already being done for the warning message when
pop3_migration_ignore_missing_uidls was set, but not for the error message
when it wasn't set. |
b215322367dbd94df3e2e4bb643b53460e6adc51 |
|
24-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
pop3-migration: Added pop3_migration_skip_size_check setting
If we know that we're not going to be able to match any messages by sizes,
we might as well not ask for the messages' sizes. This is useful at least
with Yahoo. |
35ef661bd85c64834e3e34eeeb3c393b81108760 |
|
24-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
pop3-migration: Ignore Return-Path: header when matching UIDLs by header hashes
This fixes matching between Yahoo IMAP and Yahoo POP3 |
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/' |
b3070aca2aa0dbdcc7f30e6e2bb1f0455127a343 |
|
16-Jul-2015 |
Timo Sirainen <tss@iki.fi> |
pop3-migration: Fetch physical sizes instead of virtual sizes so pop3c uses LIST
4bebfbb32410 caused the fetching to break entirely. |
7e8bfb5b0af9606f131fc440e61f3752da335ac9 |
|
16-Jul-2015 |
Timo Sirainen <tss@iki.fi> |
pop3-migration: Use LIST instead of RETRs to get the messages' sizes. |
e18e90938ffd9e31c796c405404be0b7dcd5c807 |
|
16-Jul-2015 |
Timo Sirainen <tss@iki.fi> |
pop3-migration: Truncate header if there's line containing only CR(s).
This fixes matching IMAP <-> POP3 messages when the servers behave
differently. |
7faf475a2faea9ac291898a6593870b01fbc30d4 |
|
14-Jul-2015 |
Timo Sirainen <tss@iki.fi> |
pop3-migration: Show the first message's number and UIDL which wasn't found from IMAP. |
ba57ea2c696f9e9aae909f073069848876a641f4 |
|
09-May-2015 |
Timo Sirainen <tss@iki.fi> |
pop3-migration: Added more debug and error logging. |
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> |
a8c5a86d183db25a57bf193c06b41e092ec2e151 |
|
04-Feb-2014 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2014. |
2200adee458ca662d32b5ec0e01d8c5cba0cc0a8 |
|
03-Feb-2014 |
Timo Sirainen <tss@iki.fi> |
pop3-migration: If UIDLs can't be set, fail unless pop3_migration_ignore_missing_uidls=yes. |
8c3872c26b18421d62c52cbfe0b81b1d79239f89 |
|
03-Feb-2014 |
Timo Sirainen <tss@iki.fi> |
pop3-migration: Convert NULs to 0x80 chars in header when hashing.
This should help at least with Dovecot and I think also with UW-IMAP/POP3. |
31fd39a3a3d544b1a8afb9aef07f180d0d40fda2 |
|
03-Feb-2014 |
Timo Sirainen <tss@iki.fi> |
pop3-migration: Work around IMAP/POP3 server bugs which truncate the header too early. |
1c3dc4c08ced3948f52c3c6c171ed77310b2cbfd |
|
12-Jun-2013 |
Timo Sirainen <tss@iki.fi> |
pop3-migration: struct mailbox must be freed before mail_storage is destroyed.
Fixes a memory leak where the user wasn't destroyed at all because the
mailbox still caused the user to be referenced. |
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. |
9b706b345064ce8e8a657f54633f009a101298ea |
|
29-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
If prefix="" namespace isn't defined, autocreate it as an unusable namespace.
This avoids having to handle mail_namespace_find() errors all over the
place. Instead now the mailbox accesses will simply fail. |
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. |
bd63b5b860658b01b1f46f26d406e1e4a9dc019a |
|
11-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
Plugin ABI version checking improvements.
Previously the plugin version was checked against the version string
returned by the currently running Dovecot master process, not necessarily
the same as the binary. Also version_ignore=yes setting skipped the version
check entirely.
Now there's a new DOVECOT_ABI_VERSION macro that can (at least in theory) be
updated only when the ABI actually changes. The version is in format
"2.2.ABIv1(2.2.15)", where the (2.2.15) would be the actual Dovecot version
number that gets ignored when comparing the strings.
Also now the plugin version is compared to the actually running binary's
ABI, not the master's version, and it can't be ignored with a setting. |
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. |
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] |
0e7d5ff38f28d8c85e197a031bbb66b322ff89e6 |
|
03-Aug-2012 |
Timo Sirainen <tss@iki.fi> |
pop3-migration: Avoid disconnection from POP3 server due to idling. |
049da065aa64c1a5ed46eed6cde7382b011612a9 |
|
04-Apr-2012 |
Timo Sirainen <tss@iki.fi> |
pop3-migration: Error message improvement. |
c8c4bbf6b1415e9d0845bc8f1cd6d19b76ab0392 |
|
30-Mar-2012 |
Timo Sirainen <tss@iki.fi> |
pop3-replication: Don't request virtual size from IMAP mailbox, we don't need it. |
b10c3f9ed997748fdbb03b9daadc8c31eed02120 |
|
30-Mar-2012 |
Timo Sirainen <tss@iki.fi> |
pop3-migration: Migrate also POP3 ordering. |
c8593b070319d0ff83f8d6c4b5ed5abf2d578a06 |
|
30-Mar-2012 |
Timo Sirainen <tss@iki.fi> |
Added pop3-migration plugin for getting POP3 UIDLs from POP3 server.
The idea is to use this with dsync to migrate mails via imapc, but for
getting POP3 UIDLs via pop3c. |