ceb8c97c6c9fe0ee7eb544645c6bdb74dfcb519d |
|
31-Jan-2018 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
global: start relying on mailbox_header_lookup_unref(NULL) being a no-op
Cleanup performed with the following semantic patch:
@@
expression E;
@@
- if (E != NULL) {
- mailbox_header_lookup_unref(&E);
- }
+ mailbox_header_lookup_unref(&E); |
677b75f90d81eafe742896d6570a2f63ce501d05 |
|
19-Jan-2018 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
global: don't cast NULL to void *
NULL is guaranteed to be a void * thanks to
dd6043c05e32a8e8db1233ed711a2c74d1477a89. |
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. |
5b0b45ba0b6250d5feb17d6cfccf61eb89f26178 |
|
23-Oct-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Fix assert-crash when searching header and MIMEPART
For now this is just a bit kludgy workaround. The proper fix requires
larger changes, which aren't worth the effort right now.
For example:
doveadm fetch -u testuser uid MAILBOX inbox FROM foo MIMEPART FILENAME CONTAINS bar BODY baz
Crashes with:
Panic: file index-mail-headers.c: line 294 (index_mail_parse_header): assertion failed: (part != NULL) |
87490012895b4f371635ded00add04c9107dcfef |
|
18-Sep-2017 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
lib-storage: convert index to use container_of |
2b1933b133f3e3571b32fa56fb823b4a6f9aab57 |
|
25-Jul-2017 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
lib-storage: index: Made MIME FILENAME search criterion match case-insensitively. |
483e8d4974b5f0751866d9dbfc0e1e78f8a40664 |
|
26-Apr-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Fix searching when search query has invalid keywords.
For example "SEARCH KEYWORD ]" was returning all mails instead of nothing. |
f86436b30198ab9a1c9d86d02252ac269940711e |
|
21-Feb-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Fix mail.access_type for search prefetches |
bc315b1595bd49edf0e8acf46828999fe1153f92 |
|
20-Feb-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Add asserts to make sure lookup_abort is being used correctly. |
74bc7e646663255703e10e0c0b7242ad7ad52f94 |
|
20-Feb-2017 |
Stephan Bosch <stephan@dovecot.fi> |
Partially implemented IMAP SEARCH=X-MIMEPART capability.
This capability is currently Dovecot-specific. |
a0cd302bcb827678f9c9c2ca1d0a3f0d3c0b3563 |
|
19-Feb-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Add explicit MAIL_ERROR_LOOKUP_ABORT error
The MAIL_ERROR_NOTPOSSIBLE was a bit too generic to assume to mean the same
thing. It doesn't look like there are any external plugins that break
because of this change. |
dfaf420c473c810fee33f515d08b888826dd57bd |
|
19-Feb-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Add mail.access_type |
0796f4c0eebbc9a0eaf441c53053e3023543418e |
|
19-Feb-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Fix error handling when searching mails
Only expunge errors and failures caused by lookup_abort should be ignored.
The rest of the mail errors mean that the search result might not be
correct. We'll still run the search as fully as possible, but we just
return an error at the end. |
7f93dd01f630d40ff81de471a437968f3dcfea87 |
|
19-Feb-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Search optimization - avoid parsing message_parts unnecessarily
If they're not already cached, the mail is parsed twice: once to get the
message_parts and again to perform the actual search. The searching can
however do the message_parts parsing internally as well. |
6cf18519f0804755385871d84384834465b2d68e |
|
19-Feb-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Fix error handling when sorting mails.
All errors were treated the same as if message had been expunged. This
caused potentially wrong results to be sent to the client without any
indication that they're wrong. |
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 |
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)" |
6264b51bcce8ae98efdcda3e55a765d7a13d15ed |
|
03-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Renamed MAIL_SEARCH_ARG_FLAG_USE_TZ to _FLAG_UTC_TIMES |
0303b693b8b3fc35b9daa1ce9cb92d94d1b95205 |
|
03-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Reverse MAIL_SEARCH_ARG_FLAG_USE_TZ handling again.
It wasn't really wrong, it was just confusing. And doveadm's tz-handling
was wrong.
Reverses 059e4ac419224598349704b74cb9f6b49278df46 |
059e4ac419224598349704b74cb9f6b49278df46 |
|
01-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Reverse MAIL_SEARCH_ARG_FLAG_USE_TZ handling.
It was being used the wrong way. SEARCH SENTON/BEFORE/AFTER should have
checked the times within the mail's timezone, not UTC. |
436adac819e7cbeef04af08dcc6a4f3ecd4a1d9e |
|
13-Aug-2016 |
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi> |
lib-storage: remove mailbox-recent-flags.h from index-storage.h |
02b78558dc03daa2e7da2010b63f247b49936a38 |
|
03-Aug-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
Use mail_get_*stream_because() wherever possible. |
f0339f522dc9c8e2e8a29ef9a3f937c431c6bd1b |
|
06-Jun-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: Use only explicit int -> bool conversions
These were checked with a patched clang. |
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] |
92c610a38f40d98b437d0db7676b6ebcd662a77f |
|
26-Apr-2016 |
Baofeng Wang <baofeng.wang@dovecot.fi> |
lib-storage: fixup the broken search result with \seen or \delete
remove side effects of match_always flag during search. |
489301ee88b2174e3171875e979e667de2c4a174 |
|
28-Feb-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: When cached mime.parts is detected to be inconsistent, log it as hex-encoded. |
7cef8159e93997ae75f94cfe1a3ab974b85d5737 |
|
28-Feb-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-mail: message_search_msg() passes through message_parser_deinit_from_parts()'s error string |
8b5b1f6cb19253dfd7821fcef8e9b7e95e6caf3a |
|
28-Feb-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
Use mail_set_cache_corrupted_reason() wherever possible. |
7fbc81a103d10f180d079cf4c14c353cb28a2e77 |
|
16-Feb-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-storage: Avoid duplicate work when a search query has multiple header/body keys. |
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/' |
814bf67459ad405a157af0b8940602024d7fadfe |
|
23-Sep-2015 |
Teemu Huovila <teemu.huovila@dovecot.fi> |
Remove now-unnecessary direct stdlib.h #includes. |
817d027593510c3ba70ad542ce0011f5f6916d1e |
|
18-Aug-2015 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Moved most of the \Recent flag handling code to mailbox-recent-flags.c
There are also some API changes, because functions were renamed and the
recent_* fields were moved to struct mailbox. I'm not aware of any plugins
using these though, except for index_mailbox_set_recent_seq() which for now
is kept as a backwards compatibility macro.
No changes were made to the actual code logic. |
8d5eb4f8089c319d555edaa42d1c09da951f66ff |
|
18-May-2015 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Cleanup - separate search arg values that are set by mail_search_init() |
ce763c83d556eea9b74fc63e5d41f3b71a7e72de |
|
14-Jan-2015 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Added "oldestonly" search arg to stop searching after the first non-match.
This parameter works only for doveadm search queries. It's not fully exact
currently, because if mailbox.search_next_update_seq() skips over
non-matching messages we don't stop if the next message matches. So this
parameter is mainly useful for optimization of commands like:
doveadm expunge -u user@domain mailbox inbox savedsince 30d oldestonly
Where the timestamps should be ascending all the time anyway and there's no
point in continuing to search for more mails after the first timestamp is
too high. |
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> |
823af4a2cc4e2ce90d12f9ec362160546aa4c4b8 |
|
05-Dec-2014 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Mail prefetching was still not working right.
I wonder if it ever actually worked (except for SEARCH TEXT). |
96a410ecef6d2e08c8bce325eec084ce1edce100 |
|
25-Nov-2014 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Don't fetch wanted_fields for messages that don't match the search query.
For example "doveadm fetch text subject foo" was opening all the mails, even
though only a few matched the subject (that was hopefully already in cache
file).
The behavior still isn't perfect though. The wanted_fields should probably
be split into search_wanted_fields and fetch_wanted_fields, but the current
behavior is likely good enough for now. |
b5351cfc57c3698a3b9e8ff252ecb34a462e818c |
|
24-Oct-2014 |
Timo Sirainen <tss@iki.fi> |
Use i_stream_get_error() wherever possible instead of %m |
bacd4f6e62996e95d7aafd94716025b22a39d470 |
|
14-Oct-2014 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Added X-REAL-UID search parameter. |
fbf0acc4c9b8113598dcf1c5e5e32b270332c14a |
|
16-Sep-2014 |
Timo Sirainen <tss@iki.fi> |
lib-storage: SEARCH_MAILBOX* value is now also compared to to the (virtual) mailbox name.
This fixes for example "doveadm fetch uid mailbox virtual/all" |
541b251a99a55cb0fa2eaf02645a7c39ad997092 |
|
15-Apr-2014 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Replaced mail_get_real_mail() with mail_get_backend_mail() that can fail.
For now the mail_get_real_mail() can still be used for backwards
compatibility. |
a8c5a86d183db25a57bf193c06b41e092ec2e151 |
|
04-Feb-2014 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2014. |
e1cf5b2efd5b1f171fa5613fc7decc785b08989f |
|
10-Oct-2013 |
Timo Sirainen <tss@iki.fi> |
lib-storage: If search finds a match to a cached header, don't open the body stream. |
3f41cfaa698846e782ba086ca61a8395d89ca551 |
|
10-Oct-2013 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Header+body searches might not have searched the body in some cases.
Only the header was requested for the search stream, which with imapc and
pop3c could have caused the body not to be in the stream, although it
usually was because of the "fetch body" hint. |
79c8622544b937ff24d47b34921e038ed1ba4fdf |
|
22-May-2013 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Optimize SEARCH_MODSEQ query if it's higher than HIGHESTMODSEQ. |
4a254eb892bbd8004179decee1fec13e264f5348 |
|
20-Apr-2013 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Avoid wasting data stack during searches. |
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). |
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. |
50de46721446795c42943c572625f2f1a9abfe01 |
|
29-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Check and log stream errors when parsing/searching messages. |
f0cd1d0022590d0a0d84f57e362774c2e96e2ea8 |
|
16-Sep-2012 |
Timo Sirainen <tss@iki.fi> |
Fixed compiling with OSes where NULL isn't defined as void pointer (e.g. Solaris). |
5f44975ec6c5755dd74bcd4c47a123a7242ecab3 |
|
15-Sep-2012 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Moved index_mail.data_pool to mail_private.data_pool |
d9076f5939edf5d20a261494b1a861dcbb0d32e2 |
|
15-Sep-2012 |
Timo Sirainen <tss@iki.fi> |
Replaced "decomposed titlecase" conversions with more generic normalizer function.
Plugins can now change mail_user.default_normalizer. Specific searches can
also use different normalizers by changing mail_search_context.normalizer. |
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. |
812f2e9d173d5067732e205925510accb2094a6e |
|
31-Jul-2012 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Fixes to handling private message flag indexes. |
c8750d1836c317670bf00b9c47eaa4df909c77c8 |
|
16-Jul-2012 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Search crashfix. |
e771c83f8d60bf057757a21943c746e1dd69b815 |
|
05-Jul-2012 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Minor code cleanup |
c185be222486cfb638c6827de42f2e1c1eccfe21 |
|
05-Jul-2012 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Fixed searching message flags on mailboxes without private index. |
3bd3e8e748379cbbf690c6ee9dfbce5e17464e44 |
|
02-Jul-2012 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Fixed searching message flags with private flags index. |
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. |
86bde2c1838d1ce967fa2b394bb952004a4adcb7 |
|
24-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
seq_range_array_add() API changed. Added other functions to provide the less common use cases. |
a10ed8c47534b4c6b6bf2711ccfe577e720a47b4 |
|
23-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
Marked functions parameters that are allowed to be NULL. Some APIs were also changed.
The non-obvious APIs where NULL parameter was changed to "" are
master_service_init() and auth_master_user_list_init().
These checks can currently be enabled only on a patched clang:
http://llvm.org/bugs/show_bug.cgi?id=6786 |
214cb5b22a5c31d058d8b85956da83a62b862149 |
|
10-Mar-2012 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Update search's cost more widely and less often. |
c9d4d1207781035127e6d5a0450b080827088319 |
|
05-Mar-2012 |
Timo Sirainen <tss@iki.fi> |
lib-storage: When searching with a sort program, don't prefetch any mails.
The prefetching probably ends up being pointless. |
5f5870385cff47efd2f58e7892f251cf13761528 |
|
12-Feb-2012 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2012. |
6a1ecaf2ffe6142f0c583c07314b1bdb97a3cdbb |
|
10-Jan-2012 |
Timo Sirainen <tss@iki.fi> |
Don't assert-crash on mail search if decomposed titlecase of search key is empty. |
bac5a7e1cfdd7f5e565c757ef1480e651e78d8fc |
|
09-Dec-2011 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Fixed search when mail prefetching is enabled. |
6df0ab0c1ab91f06b6418cb30eff44405a1b8f02 |
|
04-Oct-2011 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Added mail_get_hdr_stream() and use it where possible.
This makes it clearer for backends when it needs a message body instead of
only message header. |
2d01cc1880cf2afd4fb1c8ad7fa6ce78e562e71e |
|
25-Aug-2011 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Moved all transaction stats_* to struct mailbox_transaction_stats. |
de62ce819d59a529530da4b57be1b8d6dad13d6b |
|
25-Aug-2011 |
Timo Sirainen <tss@iki.fi> |
Moved GUID code to liblib. Use guid_128_t type consistently everywhere. |
88f35177be51bd9ead84db0cdea7b06e0d0ac588 |
|
16-Aug-2011 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Fixed assert-crash caused by previous stats change. |
1eaaa2c9003cf3fbf672d597473e3f84e70d2ee6 |
|
16-Aug-2011 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Moved stats_* from mail to transaction.
With the API changes to search, having them in mail doesn't make sense
anymore, since mailbox_search_next() can return multiple different mails
with different stats. |
0bcc7b7b453dcf293a7ff863cc395ab06ff01928 |
|
28-Jul-2011 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Fixed crashing on "NOT <nonexistent sequence>" search. |
013a0e03309a4a77552f6e8dd46d06c3d3f60f53 |
|
02-Jul-2011 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Renamed mail_search_arg.not to match_not.
C++ compilers don't like the "not". |
991c17647fa7dbd38c6c3987a5be4ef080c6d948 |
|
27-Jun-2011 |
Timo Sirainen <tss@iki.fi> |
fts: Removed the separation of "substring" and "fast" fts backends and search keys.
No one wants to use two separate backends and it just makes the code more
difficult. |
cf1f6978a52e1b978e17f4d525f71ec0d580b23b |
|
04-Apr-2011 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Request sort program's all fields, not just the first one. |
045aa2f81225ceffbffe71a088dabb8881c65512 |
|
04-Apr-2011 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Removed struct mail_private.extra_* fields.
There isn't much point in keeping them separated. |
1af0a59380337d4d9adc634da47888c150869f65 |
|
04-Apr-2011 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Added mail prefetching support for searching. |
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. |
c3f7ca68fadb42e7b4f2df64dba0aea72f00f4dc |
|
31-Mar-2011 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Search code cleanup. |
d798962a54c5cda054d57a0cfc7e5f47dfa20f6e |
|
31-Mar-2011 |
Timo Sirainen <tss@iki.fi> |
Changed header/body searching to do search key charset translation earlier.
This cleans up and simplifies error handling. |
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 |
2e37d45867d081db150ab78dad303b9077aea24f |
|
04-Mar-2011 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2011. |
183bea41fa640dc8117f3eb45ff935cd81377a84 |
|
04-Mar-2011 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2011. |
e29f8a6a52ca72fc6010132fb86dd00e9d96432a |
|
31-Jan-2011 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Moved setting "wanted fields/headers" fields for sort program from imap-specific code.
Also separate between fields that are actually wanted to be fetched from the
fields that sorting wants to temporarily use. |
56b8bee5943ad628f292a307a68a8cff7e966132 |
|
30-Jan-2011 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Index search context is now more accessible by backends.
Moved struct index_search_context to index-search-private.h and added
recheck_index_args flag that backends can set. |
51327f2489a4e0e615eb9f7d921473cf8512bb79 |
|
01-Jan-2011 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Moved some items from mailbox_get_status() to a new mailbox_get_metadata().
The idea is now that all status items are tracked all the time after mailbox
is opened and they can always be looked up without failure. The metadata
items are looked up lazily and the lookups may fail at any time.
mailbox_get_status() can be used after mailbox_alloc() to indicate that the
mailbox doesn't necessarily have to be opened, just that the status fields
get returned.
If mailbox is already known to be open, mailbox_get_open_status() can be
used. It never fails. |
c4476f5036018eee92f27278619e1c65a7fd49c5 |
|
06-Oct-2010 |
Timo Sirainen <tss@iki.fi> |
search: If body search fails due to I/O error, keep the result as "unknown".
Found by Vadim Okun |
7fc0f80480063a9d4cb9e8c07b50db2a5627799e |
|
22-Jul-2010 |
Timo Sirainen <tss@iki.fi> |
Fixing my english: s/non-?existing/nonexistent/ |
114197657afc878db522a932aaae66ee426c84cf |
|
16-Jun-2010 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Fixed header searches to work correctly when there are multiple headers with same name.
--HG--
branch : HEAD |
61e27995aadbc2f97927d3635f98d1d4ac4751e0 |
|
13-May-2010 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Removed struct mail.get_index_mail(). get_real_mail() is basically the same.
--HG--
branch : HEAD |
d8256deeb5a94a6e27f4762bdb77ce284b7dc517 |
|
30-Apr-2010 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Fixes/optimizations to SEARCH_MAILBOX*.
--HG--
branch : HEAD |
85089540d28838579248ea6a62ef27007b2b4027 |
|
30-Apr-2010 |
Timo Sirainen <tss@iki.fi> |
lib-storage optimization: SEARCH_MAILBOX* should be checked before cache lookups.
--HG--
branch : HEAD |
00120655cf38b7981ea65abb73330e338bc78f5b |
|
30-Apr-2010 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Added support for searching with mailbox GUID.
--HG--
branch : HEAD |
59e50e3e6c514cd95c85bfa0a07b24e93de1bda6 |
|
28-Apr-2010 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Added MAILBOX_GLOB search arg. Query builders now use it instead of MAILBOX.
--HG--
branch : HEAD |
71acee685176766c9fb54937af18d3907dabec05 |
|
13-Apr-2010 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Added support for searching save date.
--HG--
branch : HEAD |
c0225f7f6b43d34dc58c17d3304f0fd60ab89894 |
|
27-Mar-2010 |
Timo Sirainen <tss@iki.fi> |
lib-storage: mail_get_parts() no longer returns const pointer.
The struct message_part contained context-pointer and other APIs were using
it, so the pointer really couldn't be const without casting it away
sometimes.
--HG--
branch : HEAD |
cd83124e5d070a016c590bb0b1096d7828c7b6ad |
|
19-Mar-2010 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Moved index transaction/view from index_transaction to mailbox_transaction.
--HG--
branch : HEAD |
d22301419109ed4a38351715e6760011421dadec |
|
07-Feb-2010 |
Timo Sirainen <tss@iki.fi> |
lib-storage: *_mailboxes don't descend from index_mailbox anymore, it's now a context.
--HG--
branch : HEAD |
ca98d6a1bbe73499da758a36bfab2963375c8d06 |
|
07-Feb-2010 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Moved struct mail_index_* from index_mailbox to mailbox.
We're relying more and more of all mailboxes being used via lib-index, and
this change makes accessing the indexes easier.
--HG--
branch : HEAD |
917f89621271e9e6ffa5cab0ec85374f3fe9dae4 |
|
06-Feb-2010 |
Timo Sirainen <tss@iki.fi> |
lib-storage: Use mailbox_status() to get number of messages in search code.
This doesn't really change anything, except makes it possible for plugins to
hide some messages.
--HG--
branch : HEAD |
e59faf65ce864fe95dc00f5d52b8323cdbd0608a |
|
25-Jan-2010 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2010.
--HG--
branch : HEAD |
f3bb2fbe87425dc89a839908985af496f7f65702 |
|
18-Nov-2009 |
Timo Sirainen <tss@iki.fi> |
mailbox_search_next*() API changed to return bool.
If search fails, it'll be noticed anyway by mailbox_search_deinit().
--HG--
branch : HEAD |
7ef3553585e556f35d5919589cfdc1de3329e4bb |
|
12-Aug-2009 |
Timo Sirainen <tss@iki.fi> |
Moved all struct timeval comparing/calculation code to lib/time-util.
--HG--
branch : HEAD |
88f56040cebb5d272b658b8e00f02434b9dca200 |
|
31-Jul-2009 |
Timo Sirainen <tss@iki.fi> |
index-storage: Code cleanups.
--HG--
branch : HEAD |
ee116df08d0fdab703483e18fe8076b2ef9fd9d7 |
|
05-Jun-2009 |
Timo Sirainen <tss@iki.fi> |
struct mail_storage.callbacks is no longer a pointer.
--HG--
branch : HEAD |
50c74b2d19d62e2a1e7e7c53fbacaa8fbc105fd1 |
|
17-May-2009 |
Timo Sirainen <tss@iki.fi> |
Search: Added an assert.
--HG--
branch : HEAD |
1eb17e61d3d38372674aa0c55caedb0185a985f5 |
|
29-Apr-2009 |
Timo Sirainen <tss@iki.fi> |
Split struct mail_private.stats_dentry_lookup_count to open/stat counts.
--HG--
branch : HEAD |
e97b87d40711a231da06bf6717a99e458be20516 |
|
29-Apr-2009 |
Timo Sirainen <tss@iki.fi> |
Use the new mail_private.stats_* fields to stop non-blocking searches after about 250 ms.
--HG--
branch : HEAD |
1e4abf9145c21700f77f933ae15cfbd78f077f26 |
|
28-Apr-2009 |
Timo Sirainen <tss@iki.fi> |
Search: Perform all lookups from cache before attempting any uncached lookups.
--HG--
branch : HEAD |
45312f52ff3a3d4c137447be4c7556500c2f8bf2 |
|
06-Jan-2009 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2009.
--HG--
branch : HEAD |
bc39123c4eec987b78c11db6416a4b50146139b5 |
|
12-Dec-2008 |
Timo Sirainen <tss@iki.fi> |
Sorting messages was completely broken.
--HG--
branch : HEAD |
5e615a0e4682b75cadb5bea4bff689f3fcf8e9fe |
|
30-Nov-2008 |
Timo Sirainen <tss@iki.fi> |
Increased search_nonblock() to go through 50 messages at a time.
--HG--
branch : HEAD |
d54ab8987e482a8df250615b44f41fa040c38741 |
|
30-Nov-2008 |
Timo Sirainen <tss@iki.fi> |
fts: Hide "Searching .." notify while indexing.
--HG--
branch : HEAD |
f4616f1875297fb2f583d913c0f01b075bdecd5b |
|
30-Nov-2008 |
Timo Sirainen <tss@iki.fi> |
Give more correct "* OK searched n%" notifications with fts and virtual mailboxes.
--HG--
branch : HEAD |
4b0e91d0e48374c7ad23d58ed07070858f6ac086 |
|
29-Nov-2008 |
Timo Sirainen <tss@iki.fi> |
Fixed searching in virtual mailboxes.
--HG--
branch : HEAD |
6bb1810a864093345ca636c8b6d0b094a17055d4 |
|
23-Nov-2008 |
Timo Sirainen <tss@iki.fi> |
Moved search update result checks to search_next_update_seq().
--HG--
branch : HEAD |
5cb6b8ee7ac4dec74fd93bf6a2caf397983f7407 |
|
23-Nov-2008 |
Timo Sirainen <tss@iki.fi> |
Fix to previous search_next_update_seq change.
--HG--
branch : HEAD |
bd1b2615928a1e8be190cb0405754f0aec8cac2f |
|
22-Nov-2008 |
Timo Sirainen <tss@iki.fi> |
mail_storage.search_next_update_seq returns now bool. It was never failing.
--HG--
branch : HEAD |
4321f6c969e7b8f6b243ff5bb6b8d297921676f6 |
|
15-Nov-2008 |
Timo Sirainen <tss@iki.fi> |
Implemented imap-response-codes draft.
--HG--
branch : HEAD |
a914bff43644dd9b3977244203839ca74161e40c |
|
01-Sep-2008 |
Timo Sirainen <tss@iki.fi> |
Rewrote thread indexing code. It's a lot simpler and takes less disk space.
We no longer try to keep a hash table and the entire thread tree stored on
disk. Instead we keep a simple Message-ID string (actually just "uid, ref#"
pointer) -> unique index number mapping on disk, read it to memory and use
it to build the thread tree. After the initial build the thread tree is
still updated incrementally.
--HG--
branch : HEAD |
b19a1420da0618a10edf67c2cfd13c8c8633057a |
|
07-Aug-2008 |
Timo Sirainen <tss@iki.fi> |
Added the concept of Global UIDs that are preserved across copies.
They can be fetched, searched and specified for the save API. dbox format
supports them correctly, but with maildir the base filename is used so
maildir_copy_preserve_filename=yes is required to preserve GUIDs when copying.
--HG--
branch : HEAD |
2d2bc263f88c4c7fa36c8304085f5b79ca22cd08 |
|
07-Aug-2008 |
Timo Sirainen <tss@iki.fi> |
INTHREAD search may have failed randomly.
--HG--
branch : HEAD |
f95b3d29bc56f139c18c880aa574a0ca72b0cffb |
|
19-Jul-2008 |
Timo Sirainen <tss@iki.fi> |
struct mailbox_header_lookup_ctx can now be referenced/unreferenced so it
can be shared among multiple struct mails.
--HG--
branch : HEAD |
06ff2a72c39cb34cc6425f17fc82c5e93fef2018 |
|
20-Jun-2008 |
Timo Sirainen <tss@iki.fi> |
FETCH X-MAILBOX and SEARCH X-MAILBOX can be used with virtual mailboxes to
find out the original mailbox. In non-virtual mailboxes they always just
use the current mailbox name.
--HG--
branch : HEAD |
a9aa2f70dd3f16ca139546a12f04089af937052c |
|
20-Jun-2008 |
Timo Sirainen <tss@iki.fi> |
Added non-optimized support for SEARCH INTHREAD.
--HG--
branch : HEAD |
908bffbaff7230e31a887aab75572cc2549cb6fe |
|
20-Jun-2008 |
Timo Sirainen <tss@iki.fi> |
Search code cleanups and minor optimizations.
--HG--
branch : HEAD |
4b2cb2b4d7e2291e73b00ad669df417d7fee4d8d |
|
12-Jun-2008 |
Timo Sirainen <tss@iki.fi> |
SEARCH: Fixed NOT <seqset> not matching anything.
--HG--
branch : HEAD |
fa2f897114ac23879fe36a6a9a449d3105f9b254 |
|
09-Jun-2008 |
Timo Sirainen <tss@iki.fi> |
Removed pool parameter from message_search_init().
--HG--
branch : HEAD |
28e3b41961f0e4004688d68002d005551fac3adf |
|
09-Jun-2008 |
Timo Sirainen <tss@iki.fi> |
Saved search results: Remember what messages' static checks never match, so
we don't waste time checking them over and over again.
--HG--
branch : HEAD |
3dd0679b6f24be0287cc42d7a60bbf59cdf8b637 |
|
05-Jun-2008 |
Timo Sirainen <tss@iki.fi> |
Implemented CONTEXT=SEARCH extension.
--HG--
branch : HEAD |
c4b376dd6e0c423006d7ac83a39253bcaf8e7c47 |
|
03-Jun-2008 |
Timo Sirainen <tss@iki.fi> |
Make mail_search_args an independent structure that can be used for multiple
separate searches.
--HG--
branch : HEAD |
6f4b6f437807c0b3d037dcb180f588ce911a6030 |
|
19-Mar-2008 |
Timo Sirainen <tss@iki.fi> |
Ignore \Recent flag in indexes when searching them (leftovers from v1.0).
--HG--
branch : HEAD |
ab62d8b34e731dc23d508e0468405a2a9dece8c7 |
|
16-Mar-2008 |
Timo Sirainen <tss@iki.fi> |
Implemented WITHIN extension.
--HG--
branch : HEAD |
c057806e95ed3e2f1d0d740e4b0d5765515bc0d7 |
|
15-Mar-2008 |
Timo Sirainen <tss@iki.fi> |
CONDSTORE fixes
--HG--
branch : HEAD |
0934e86643bd122e260e4742b73612d29c1e7487 |
|
14-Mar-2008 |
Timo Sirainen <tss@iki.fi> |
Moved IMAP messageset handling to lib-imap/ and searching to lib-storage/.
Rewrote messageset handling to use struct seq_range instead.
--HG--
branch : HEAD |
ff256261b828f9cfe218d52c109096efc688a07d |
|
14-Mar-2008 |
Timo Sirainen <tss@iki.fi> |
Added support for SEARCH_UIDSET.
--HG--
branch : HEAD |
ea4f28398a0e4fb46be074307d512925c1fe7fc1 |
|
14-Mar-2008 |
Timo Sirainen <tss@iki.fi> |
struct mail can't necessarily be casted to struct index_mail. Added a new
get_index_mail() method to return it.
--HG--
branch : HEAD |
01404d41657a104c5ea1c12bb87f9c321e9c1ac4 |
|
14-Mar-2008 |
Timo Sirainen <tss@iki.fi> |
struct mail can't necessarily be casted to struct index_mail. Added a new
get_index_mail() method to return it.
--HG--
branch : HEAD |
a2f250a332dfc1e6cd4ffd196c621eb9dbf7b8a1 |
|
15-Mar-2008 |
Timo Sirainen <tss@iki.fi> |
Initial CONDSTORE support.
--HG--
branch : HEAD |
1176124297af5c56e932c0863c6637ff21d8a0ef |
|
14-Mar-2008 |
Timo Sirainen <tss@iki.fi> |
Moved IMAP messageset handling to lib-imap/ and searching to lib-storage/.
Rewrote messageset handling to use struct seq_range instead.
--HG--
branch : HEAD |
c7a02d733209d79926bb9942a681b44889a88f24 |
|
14-Mar-2008 |
Timo Sirainen <tss@iki.fi> |
Added support for SEARCH_UIDSET.
--HG--
branch : HEAD |
8c224d290d5cc49a63ab93ae4dc9019ec6b6aec8 |
|
03-Mar-2008 |
Timo Sirainen <tss@iki.fi> |
SEARCH NOT SUBJECT didn't work correctly.
--HG--
branch : HEAD |
0b444c35535e864419527d1f06ac199a302d3dc5 |
|
03-Mar-2008 |
Timo Sirainen <tss@iki.fi> |
SEARCH NOT SUBJECT didn't work correctly.
--HG--
branch : HEAD |
1091d5be391af806f7cf553521f6778f830f9500 |
|
21-Feb-2008 |
Timo Sirainen <tss@iki.fi> |
SEARCH SUBJECT now changes LWSP to spaces to match ENVELOPE's subject field.
--HG--
branch : HEAD |
95f3ad1f505146ba2f4d2f4022244250a58b836f |
|
21-Feb-2008 |
Timo Sirainen <tss@iki.fi> |
SEARCH SUBJECT now changes LWSP to spaces to match ENVELOPE's subject field.
--HG--
branch : HEAD |
ba2313e83623b15cd5dbb29cd5114368012ac44c |
|
21-Feb-2008 |
Timo Sirainen <tss@iki.fi> |
Header searches shouldn't include the header name or ":" in matching.
--HG--
branch : HEAD |
381afaf56509f4ea57fff7852465c721075eab97 |
|
21-Feb-2008 |
Timo Sirainen <tss@iki.fi> |
Header searches shouldn't include the header name or ":" in matching.
--HG--
branch : HEAD |
a31761c7d9d57f84858911eb03ea07261e1d77a3 |
|
21-Feb-2008 |
Timo Sirainen <tss@iki.fi> |
More fixes to SEARCH BEFORE/ON/SINCE timezone handling.
--HG--
branch : HEAD |
ecf459a68bccc463b3b12fc7f86c2815c6529ae7 |
|
21-Feb-2008 |
Timo Sirainen <tss@iki.fi> |
More fixes to SEARCH BEFORE/ON/SINCE timezone handling.
--HG--
branch : HEAD |
f76c42786b2b9b7cba906c4e4c7d7b9a08597f86 |
|
20-Feb-2008 |
Timo Sirainen <tss@iki.fi> |
SEARCH BEFORE/ON/SINCE didn't handling timezones correctly.
--HG--
branch : HEAD |
4f9d85cd8bd85d07ba24c7872ec9cd204efd703d |
|
20-Feb-2008 |
Timo Sirainen <tss@iki.fi> |
SEARCH BEFORE/ON/SINCE didn't handling timezones correctly.
--HG--
branch : HEAD |
558d19d2111b67a236ee5e8f3eb22aba4a294032 |
|
14-Feb-2008 |
Timo Sirainen <tss@iki.fi> |
message_search_more*() now returns bool instead of int. They can't fail.
--HG--
branch : HEAD |
6fb2796ccd8a67b69c62376f0c8efcbec0b30d1e |
|
14-Feb-2008 |
Timo Sirainen <tss@iki.fi> |
message_search_more*() now returns bool instead of int. They can't fail.
--HG--
branch : HEAD |
838e367716bbd5e44b4a1691db9cbf72af53e9f0 |
|
14-Feb-2008 |
Timo Sirainen <tss@iki.fi> |
Added mail_set_cache_corrupted() to rebuild the cache file and force
recalculating the given field.
--HG--
branch : HEAD |
277506e6e05cdac79bacfb57e629e2fa0aa1ffdc |
|
14-Feb-2008 |
Timo Sirainen <tss@iki.fi> |
Added mail_set_cache_corrupted() to rebuild the cache file and force
recalculating the given field.
--HG--
branch : HEAD |
19e8adccba16ff419f5675b1575358c2956dce83 |
|
11-Feb-2008 |
Timo Sirainen <tss@iki.fi> |
Renamed T_FRAME_BEGIN/END to T_BEGIN/END. Removed T_FRAME() macro and
replaced them with T_BEGIN/END calls. T_FRAME() made it difficult to debug
code with gdb.
--HG--
branch : HEAD |
76b43e4417bab52e913da39b5f5bc2a130d3f149 |
|
01-Jan-2008 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2008.
--HG--
branch : HEAD |
29ec5172f01cee0529ffcd22fd1f1a1d4f13aa9f |
|
08-Dec-2007 |
Timo Sirainen <tss@iki.fi> |
Optimize searching flags and keywords.
--HG--
branch : HEAD |
28603e0134d653e76b7007f94336aeaef3b50b18 |
|
08-Dec-2007 |
Timo Sirainen <tss@iki.fi> |
SEARCH_KEYWORDS now uses struct mail_keywords instead of a string array.
--HG--
branch : HEAD |
41da195263f4c7f0eaf58f3ecee4d9ceb92ae8c1 |
|
08-Dec-2007 |
Timo Sirainen <tss@iki.fi> |
Replaced SEARCH_<flag> with a generic SEARCH_FLAGS. Use value.size for
SEARCH_LARGER and SEARCH_SMALLER and give an error if it's not a valid
number.
--HG--
branch : HEAD |
eddd9bf1a1369aea4a2715f6be1137da6d17d293 |
|
05-Dec-2007 |
Timo Sirainen <tss@iki.fi> |
Replaced t_push/t_pop calls with T_FRAME*() macros.
--HG--
branch : HEAD |
6f338d07c32978a8118bd7e30a07dff067d0f8ee |
|
02-Dec-2007 |
Timo Sirainen <tss@iki.fi> |
Simplify search arguments immediately when calling mailbox_search_init().
--HG--
branch : HEAD |
3da614c39dd29f536c485089e67839b4cf89fed3 |
|
03-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
Renamed mail_index_lookup_uid_range() to mail_index_lookup_seq_range(), made
it return a bool and added mail_index_lookup_seq(). Cleaned up the code to
use these functions.
--HG--
branch : HEAD |
6495f1493de8f01a798ce36cdc6b0f3da6e7bc88 |
|
20-Oct-2007 |
Timo Sirainen <tss@iki.fi> |
Header searches didn't decode MIME encoded words.
--HG--
branch : HEAD |
5f9724a3199a77391401e9aeddf20aea6e835e62 |
|
24-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
Don't crash with empty messagesets.
--HG--
branch : HEAD |
509fce1ef6d990bcbd5c22e7f80ce22cda40bac4 |
|
23-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
Small code optimization.
--HG--
branch : HEAD |
8240c1376d8539ca9e3f3f90bccc29e74bab2d57 |
|
23-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
Merge also unnecessary sub-ORs.
--HG--
branch : HEAD |
af3dcd493aa9187a4c613310761ab1c875f003bd |
|
23-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
Simplify search tree by canonicalizing message sets, converting NOT away
from NOT (list) and dropping extra sub lists. Fix also handling NOT
messagesets.
--HG--
branch : HEAD |
4843520b1b72bcd0016a6bfa34ef22977197a88e |
|
22-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
Searching NOT sequence set with multiple search ranges containing either
first or last sequence caused some messages to be skipped.
--HG--
branch : HEAD |
89a126810703c666309310d0f3189e9834d70b5b |
|
16-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
Replaced my Copyright notices. The year range always ends with 2007 now.
My name was replaced with "Dovecot authors". In many cases I didn't really
even own the copyright, so this is more correct.
--HG--
branch : HEAD |
648d24583c1574441c4fa0331a90bd4d6e7996c5 |
|
16-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
pool_unref() now takes ** pointer.
--HG--
branch : HEAD |
43d32cbe60fdaef2699d99f1ca259053e9350411 |
|
16-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
Renamed __attr_*__ to ATTR_*. Renamed __attrs_used__ to ATTRS_DEFINED.
--HG--
branch : HEAD |
83bb013a99f0936995f9c7a1077822662d8fefdb |
|
12-Aug-2007 |
Timo Sirainen <tss@iki.fi> |
mail_*() APIs changed to return int and return the actual data as pointer.
Changed some code to do error handling a bit better.
--HG--
branch : HEAD |
73b50eecfc31750a312e2f940023f522eb07178c |
|
12-Aug-2007 |
Timo Sirainen <tss@iki.fi> |
mail_index_lookup*() can't fail anymore. Changed several APIs not to return
failure anymore.
--HG--
branch : HEAD |
a6816f64a17982a1c23416d3dd168e82a5fafda6 |
|
12-Aug-2007 |
Timo Sirainen <tss@iki.fi> |
Don't store data->rec. It may not stay usable.
--HG--
branch : HEAD |
88187ee880b4829443e0d55ea7d145d9d5880217 |
|
12-Aug-2007 |
Timo Sirainen <tss@iki.fi> |
Removed explicit locking from views and maps. They were already locked all
the time when they were used. Because of this change several functions can
no longer fail, so they were changed to return void, and a lot of pointless
error handling was removed.
--HG--
branch : HEAD |
ff7056842f14fd3b30a2d327dfab165b9d15dd30 |
|
13-May-2007 |
Timo Sirainen <tss@iki.fi> |
Error handling rewrite.
--HG--
branch : HEAD |
6b4f3d33aa71e7ce118657647fb81b8680987870 |
|
13-May-2007 |
Timo Sirainen <tss@iki.fi> |
Don't try to handle 0 in messagesets by returning a nice error message.
They're already checked in the IMAP code.
--HG--
branch : HEAD |
9b7c27cd95df5ca3cd523381205efe24e88ee817 |
|
13-May-2007 |
Timo Sirainen <tss@iki.fi> |
Parse search dates already in IMAP code.
--HG--
branch : HEAD |
c2d7221f45f2dad0e622b3f364e322eed1f42ee3 |
|
04-Apr-2007 |
Timo Sirainen <tss@iki.fi> |
memory leak fixes
--HG--
branch : HEAD |
028737d2b3d0c359e3c0753da9a2541462402167 |
|
04-Apr-2007 |
Timo Sirainen <tss@iki.fi> |
Removed message body/header searchers. They're now combined into one
message-search.
--HG--
branch : HEAD |
043c8a96a035379bcba04f487d58457beefdfcaa |
|
03-Apr-2007 |
Timo Sirainen <tss@iki.fi> |
Header parser has now flags parameter to tell it how to handle linefeeds.
Changed message parser's boolean parameter to enum as well.
--HG--
branch : HEAD |
77af0bd168cf3e3ddc3ae68abc82bfad7e9b5ff4 |
|
04-Apr-2007 |
Timo Sirainen <tss@iki.fi> |
Don't feed index_mail_parser headers while searching message bodies, unless
we actually need something from there.
--HG--
branch : HEAD |
1de4b9f9c3cc8bcc4d09c132afb2a0ad54ce7901 |
|
03-Apr-2007 |
Timo Sirainen <tss@iki.fi> |
fix
--HG--
branch : HEAD |
3072baf2e7e9f8126084e57bb18525e557ce328c |
|
03-Apr-2007 |
Timo Sirainen <tss@iki.fi> |
Don't handle TEXT searches in header searches. It's done later anyway.
--HG--
branch : HEAD |
37efe20725f0a6d8d9f43964f3374dcde8d6566e |
|
03-Apr-2007 |
Timo Sirainen <tss@iki.fi> |
Search API cleanups
--HG--
branch : HEAD |
9254dcb76b2d6ac6741e6de287bb12995f6eb97b |
|
03-Apr-2007 |
Timo Sirainen <tss@iki.fi> |
Message body search API changed to init/search/deinit. Searching now builds
the init structure only once instead of for every message.
--HG--
branch : HEAD |
c5ab90cfad9cc3e33bcb1baeb30ffc82a7b7053a |
|
21-Dec-2006 |
Timo Sirainen <tss@iki.fi> |
Moved storage callbacks to struct mail_storage. If searching takes over 10
seconds, start giving estimates about when it's ready.
--HG--
branch : HEAD |
eb0ede66120bb63c0212bad69e67efca1eb47324 |
|
20-Dec-2006 |
Timo Sirainen <tss@iki.fi> |
Added support for X-BODY-FAST and X-TEXT-FAST SEARCH arguments. FTS plugin
now allows loading two backends: exact and fast. Fast backend (Lucene) can
be used to optimize only those searches, while exact backend (Squat) can be
used to optimize normal BODY and TEXT searches as well.
--HG--
branch : HEAD |
42507d758b053bb483de58fba55c73a9eb5d3fba |
|
20-Dec-2006 |
Timo Sirainen <tss@iki.fi> |
Dovecot is now able to execute multiple commands at the same time.
Practically this means commands: FETCH, LIST, SEARCH and syncing output for
all commands. For example it's possible that doing two FETCH commands at the
same time makes their output mixed together.
Non-blocking SEARCH is done by doing search for 20 mails at a time, and then
checking if another command is pending.
Also added X-CANCEL <tag> command to cancel running commands.
--HG--
branch : HEAD |
2cfe9983ce7a6280636ee12beccc2e865111967b |
|
15-Dec-2006 |
Timo Sirainen <tss@iki.fi> |
Replaced void *context from a lot of callbacks with the actual context
type. Also added/fixed some context type checks.
--HG--
branch : HEAD |
f40e6ef5190f68c2fd0e94c0b001bdf7d160236a |
|
08-Oct-2006 |
Timo Sirainen <tss@iki.fi> |
Added fill_missing parameter to message_address_parse() which specifies if
missing mailbox and domain should be returned as MISSING_MAILBOX and
MISSING_DOMAIN or just as empty strings.
--HG--
branch : HEAD |
e63bdfedcf61e1a9ee21990140cbd0d0638da7e1 |
|
17-Sep-2006 |
Timo Sirainen <tss@iki.fi> |
Moved some search parameters to public struct mail_search_context and added
module_contexts array.
--HG--
branch : HEAD |
973227df47ccafac07fda59f8abedd6e3deee3ff |
|
26-Jun-2006 |
Timo Sirainen <tss@iki.fi> |
Searching (storing, fetching) with sequence sets containing commas was
broken
--HG--
branch : HEAD |
a3705b9a74144fa7e6ab1a10c93cdd278191d708 |
|
24-Jun-2006 |
Timo Sirainen <tss@iki.fi> |
Don't crash when different search conditions reduce the search range so that
minimum sequence becomes larger than maximum..
--HG--
branch : HEAD |
b5b20656ae27248239368c8f525da23f7ff1e0c7 |
|
20-Jun-2006 |
Timo Sirainen <timo.sirainen@movial.fi> |
Don't crash if seqset restrictions caused no messages to be searched.
--HG--
branch : HEAD |
f885076be11415bee48a33534d555e0afc69228a |
|
20-Jun-2006 |
Timo Sirainen <timo.sirainen@movial.fi> |
NOT condition wasn't handled correctly in SEARCH.
--HG--
branch : HEAD |
a04cd96888653891272a512f7735121193af7b35 |
|
08-Jun-2006 |
Timo Sirainen <timo.sirainen@movial.fi> |
Changed mail-storage API to do the mail sorting internally. Optimized it
internally to keep a 32bit sort_id field in index for each used primary sort
condition. Practically this should mean less disk I/O, memory and CPU usage
when SORT command is used.
--HG--
branch : HEAD |
d96f86fb881c5b106649e8994ead1052acf24030 |
|
08-May-2006 |
Timo Sirainen <timo.sirainen@movial.fi> |
Rewrote the message bodystructure parser to allow parsing from non-blocking streams. Also did a couple of API changes and cleanups.
--HG--
branch : HEAD |
78497ce64996604a29b353dd465d14939fe26f87 |
|
23-Apr-2006 |
Timo Sirainen <timo.sirainen@movial.fi> |
Fix for last changes. We didn't handle properly non-sequential messageset ranges.
--HG--
branch : HEAD |
a3ee5ce6ecc8e228ee69300fdd562d7ac8be89a7 |
|
14-Apr-2006 |
Timo Sirainen <tss@iki.fi> |
Optimized searching a bit for cases where we can restrict search range by
simply looking at sequence sets. Also optimized some deleted/seen flag
searches where no results would be found. Added search_next_update_seq()
virtual method which allows plugins to restrict the search range (eg.
allowing indexed text search plugins).
--HG--
branch : HEAD |
19a1cfc537d979c532fac71264dba0b9dabc65d9 |
|
25-Feb-2006 |
Timo Sirainen <tss@iki.fi> |
Last memory leak fix actually started crashing.
--HG--
branch : HEAD |
9873ccef8e39b55637d80fd1a27619ea2c91cfd5 |
|
23-Feb-2006 |
Timo Sirainen <tss@iki.fi> |
Memory leak fixes
--HG--
branch : HEAD |
d5cebe7f98e63d4e2822863ef2faa4971e8b3a5d |
|
14-Jan-2006 |
Timo Sirainen <tss@iki.fi> |
deinit, unref, destroy, close, free, etc. functions now take a pointer to
their data pointer, and set it to NULL. This makes double-frees less likely
to cause security holes.
--HG--
branch : HEAD |
dcd50ecbfe796bd76f2d63483c534cc0e4e94164 |
|
14-Jan-2006 |
Timo Sirainen <tss@iki.fi> |
Compiler warning fixes and one real fix for int -> bool changes.
--HG--
branch : HEAD |
6ef7e31619edfaa17ed044b45861d106a86191ef |
|
13-Jan-2006 |
Timo Sirainen <tss@iki.fi> |
Added "bool" type and changed all ints that were used as booleans to bool.
--HG--
branch : HEAD |
0ac47e1f2dbe5afca4a1d5a00a320b680ee4a8ab |
|
31-Dec-2005 |
Timo Sirainen <tss@iki.fi> |
Allow message_body_search() to return "message_part is broken" error. If it
happens, clear cache and try again with parsed message_part.
--HG--
branch : HEAD |
90f162e35a6efe03bba0d5b757a2bdda2455bca0 |
|
03-Jul-2005 |
Timo Sirainen <tss@iki.fi> |
Moved sequence set range checks to imap-specific code, so that SEARCH can
accept sequence sets with sequence being larger than number of messages in
mailbox.
--HG--
branch : HEAD |
b6fe53951a3ea51f9aed6fea5a836aa4ba3a1288 |
|
23-Apr-2005 |
Timo Sirainen <tss@iki.fi> |
Don't call index_mail_parse_header() twice when searching headers. Caused
assert-crashes.
--HG--
branch : HEAD |
042e2b8447b34051f0380baafcf0073704430239 |
|
17-Apr-2005 |
Timo Sirainen <tss@iki.fi> |
Don't even try to allow searching zero number of headers.
--HG--
branch : HEAD |
87460b08cb97b31cde640d4975a6aa2c1d0e7226 |
|
29-Mar-2005 |
Timo Sirainen <tss@iki.fi> |
Renamed mail_get_header() to mail_get_first_header() and mail_gets_headers()
to mail_get_header_stream(). Added new mail_get_headers() which returns
NULL-terminated string list of all found headers.
--HG--
branch : HEAD |
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79 |
|
15-Mar-2005 |
Timo Sirainen <tss@iki.fi> |
Major mail-storage API changes. It's now a bit cleaner and much more plugin
friendly. Removed proxy_mailbox* stuff, they were difficult to use and
there's now much easier way to replace them.
--HG--
branch : HEAD |
a24665de9d5c773115a5918e60ed587aafe67d5c |
|
06-Jan-2005 |
Timo Sirainen <tss@iki.fi> |
Added rfc822 parser which will probably replace message_tokenizer at some
point. Rewrote address parsing with the new parser. This fixes various bugs
in it.
--HG--
branch : HEAD |
16c89b1260c9d07c01c83a9219424d3727069b2e |
|
26-Dec-2004 |
Timo Sirainen <tss@iki.fi> |
Initial support for keywords. Syncing to mbox/maildir doesn't work yet.
--HG--
branch : HEAD |
933779163eec3434a6551b78079e3b7b2966f926 |
|
25-Nov-2004 |
Timo Sirainen <tss@iki.fi> |
UID FETCH * gave error message with empty mailbox.
--HG--
branch : HEAD |
b20fb5b1df9d604a7541f5118fc5b4b466d211ef |
|
24-Nov-2004 |
Timo Sirainen <tss@iki.fi> |
Changed mail_index_get_header() to return the header as return value because
it can't fail anymore.
--HG--
branch : HEAD |
f0b82a73deb510718a0b032a71758467f750930e |
|
14-Nov-2004 |
Timo Sirainen <tss@iki.fi> |
We didn't give error if trying to search message by sequence in an empty
mailbox.
--HG--
branch : HEAD |
7416b94f38e82381abd9cee660efdcf3e7b773af |
|
20-Sep-2004 |
Timo Sirainen <tss@iki.fi> |
Memory leak fixes
--HG--
branch : HEAD |
d67fde1a8ebc1d85704c5986d8f93aae97eccef3 |
|
28-Aug-2004 |
Timo Sirainen <tss@iki.fi> |
Added mail.get_physical_size().
--HG--
branch : HEAD |
e015e2f7e7f48874495f9df8b0dd192b7ffcb5cc |
|
18-Jul-2004 |
Timo Sirainen <tss@iki.fi> |
Header caching redesigned. New design allows caching decisions per field, so
they can be divided to temporary/permanent. Cached headers are now always
returned in original order, old code didn't guarantee it. Some other caching
changes. (still missing code to store changes in caching decisions)
--HG--
branch : HEAD |
992a13add4eea0810e4db0f042a595dddf85536a |
|
08-Jul-2004 |
Timo Sirainen <tss@iki.fi> |
Cache file fixes, API changes, etc. It's still in somewhat ugly state, but
getting better..
--HG--
branch : HEAD |
24fc71a693331ffe77e2b6d81c70aca6fa055e47 |
|
22-Jun-2004 |
Timo Sirainen <tss@iki.fi> |
Added mail_index_transaction_get_updated_view() which can be used to access
uncommitted messages.
--HG--
branch : HEAD |
345212e8f61ebf14ff4f80df26df9e655eb5121e |
|
20-Jun-2004 |
Timo Sirainen <tss@iki.fi> |
mailbox_save() and mailbox_copy() functions can now return the saved mail so
it can be immediately queried. Implemented UIDPLUS extension using it.
Maildir implementation missing, so it crashes with it for now.. APPEND with
mbox now doesn't require resyncing the mailbox since it updates indexes
directly.
--HG--
branch : HEAD |
1c5a4bb5b4275a7864f1ee1d1c2daee5a27d1d35 |
|
23-May-2004 |
Timo Sirainen <tss@iki.fi> |
cleanup
--HG--
branch : HEAD |
62950eeff28f00989a17b20eeade3af7e200c6bc |
|
10-May-2004 |
Timo Sirainen <tss@iki.fi> |
don't crash when requesting messages from empty mailbox
--HG--
branch : HEAD |
d8b77aef97e89f1ccc5cbdaef77be9052279e35f |
|
02-May-2004 |
Timo Sirainen <tss@iki.fi> |
s/custom flags/keywords/
--HG--
branch : HEAD |
641f0c0900ee6e7cf9667f4b40ed95cec7d0cdca |
|
01-May-2004 |
Timo Sirainen <tss@iki.fi> |
Recent-flag should work now
--HG--
branch : HEAD |
31ddc75584c5cde53d2e78a737587f2e7fdcb0d2 |
|
28-Apr-2004 |
Timo Sirainen <tss@iki.fi> |
Forced locking to be right with mprotect()ing index file. Support for
disabling mmap for indexes, and disabling just mmap+write().
--HG--
branch : HEAD |
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834 |
|
27-Apr-2004 |
Timo Sirainen <tss@iki.fi> |
importing new index code. mbox still broken.
--HG--
branch : HEAD |
b1f57b7183fe44d7d7ba30b944d3de1f015b9253 |
|
26-Oct-2003 |
Timo Sirainen <tss@iki.fi> |
Removed fetch_init/fetch_next from mail-storage. search_* makes it
unnecessary
--HG--
branch : HEAD |
60fd9409f02a54597d178900f2f9971db5c87bca |
|
26-Oct-2003 |
Timo Sirainen <tss@iki.fi> |
Some optimizations to messageset handling in search.
--HG--
branch : HEAD |
cd466fe7b84b0223735a6469c7f7bc225f65996d |
|
21-Sep-2003 |
Timo Sirainen <tss@iki.fi> |
data_stack_pool split into two: unsafe_data_stack_pool which works like
before, and a new one which verifies that stack frame stays the same
whenever the pool is accessed.
--HG--
branch : HEAD |
644268f7848a7c4221146d0b11feb8ed5bbed233 |
|
08-Sep-2003 |
Timo Sirainen <tss@iki.fi> |
Stop parsing cached headers when we've got everything.
--HG--
branch : HEAD |
6789ed17e7ca4021713507baf0dcf6979bb42e0c |
|
06-Aug-2003 |
Timo Sirainen <tss@iki.fi> |
Index cache file rewrite. It's not finished yet and mbox support is
completely broken. But it's getting difficult to maintain outside cvs :)
--HG--
branch : HEAD |
6389aeec8c26b585e583c364b48ad12adf741898 |
|
23-Jul-2003 |
Timo Sirainen <tss@iki.fi> |
API change for updating message flags.
--HG--
branch : HEAD |
8282d9cd182f6d6ed4e015abe8fb3a1712ebc3b9 |
|
09-Jul-2003 |
Timo Sirainen <tss@iki.fi> |
Return BAD instead of NO errors with invalid message sets
--HG--
branch : HEAD |
8908db6fa213bccc03a78646d6a35bed095dcd6a |
|
09-Jul-2003 |
Timo Sirainen <tss@iki.fi> |
Still more timezone fixes
--HG--
branch : HEAD |
868772ffa3756090710d239f5a75cf20d3399760 |
|
15-Jun-2003 |
Timo Sirainen <tss@iki.fi> |
Only NOOP and CHECK will now always do a real mailbox sync. Other commands
will also do it but no often than once in 5 seconds. Also with maildir we
don't anymore try to sync it before running commands since syncing is now
done automatically whenever we try to access a file that doesn't exist.
--HG--
branch : HEAD |
4c75e1bcb6b704bd3b4631371152ea1e5bbf5267 |
|
14-Jun-2003 |
Timo Sirainen <tss@iki.fi> |
"SEARCH DELETED" didn't return anything if all messages were deleted.
--HG--
branch : HEAD |
f49992d32f7d43bad59aaacb4db5869927265d81 |
|
22-Apr-2003 |
Timo Sirainen <tss@iki.fi> |
More SEARCH OR fixes.
--HG--
branch : HEAD |
71f67d52101b34d0126a4f4484bae7202df77887 |
|
22-Apr-2003 |
Timo Sirainen <tss@iki.fi> |
SEARCH OR fixes.
--HG--
branch : HEAD |
210d1279c7aca21030c21a6b355142596f4ff803 |
|
09-Apr-2003 |
Timo Sirainen <tss@iki.fi> |
s/latest IMAP4rev1 draft/RFC-3501/
--HG--
branch : HEAD |
5bc4a5fd9a421f4c5763e03c0449479cedcf9f06 |
|
26-Mar-2003 |
Timo Sirainen <tss@iki.fi> |
Better handling for multiline headers. Before we skipped headers larger than
input buffer size (8k with read (default), 256k with mmap). The skipping was
also a bit buggy.
Now we parse the lines one at a time. There's also a way to read the header
fully into memory before parsing it, if really needed.
--HG--
branch : HEAD |
ee976c64c769d19ab7f75a49170c1d7b06d37aec |
|
01-Feb-2003 |
Timo Sirainen <tss@iki.fi> |
Fixes to SEARCH SENT*
--HG--
branch : HEAD |
980b2bcaed5e6badb500028c2edb64bc4a53b3c4 |
|
01-Feb-2003 |
Timo Sirainen <tss@iki.fi> |
Several search fixes, mostly related to matching multiple conditions.
--HG--
branch : HEAD |
ce92d390e524d95457a9e86079900d04987f28a3 |
|
31-Jan-2003 |
Timo Sirainen <tss@iki.fi> |
SEARCH NOT didn't work
--HG--
branch : HEAD |
5ce2084ada06ade9f44fc2914c34658e9a842dc1 |
|
20-Jan-2003 |
Timo Sirainen <tss@iki.fi> |
mail-storage.h interface changes, affects pretty much everything.
FETCH, SEARCH, SORT and THREAD handling were pretty much moved from
lib-storage/ to imap/ so adding non-index storages would be much easier now.
Also POP3 server can now be easily implemented with lib-storage.
Not too well tested, and at least one major problem: partial fetching is
_slow_.
--HG--
branch : HEAD |
d47f2533f6afc5d1c4c64b9421ab7ba94b089b51 |
|
13-Jan-2003 |
Timo Sirainen <tss@iki.fi> |
SEARCH didn't properly complain about invalid messagesets. high:low never
worked (it was recently changed for other commands). "*" in UID set didn't
actually match for last uid, but last sequence number..
--HG--
branch : HEAD |
15a3867ec7e47d153f0c960b9899f92cee2f17b7 |
|
11-Jan-2003 |
Timo Sirainen <tss@iki.fi> |
SORT and THREAD didn't work with sequence numbers at all. SEARCH was also a
bit broken with it if another session had deleted messages which we hadn't
yet told to client.
--HG--
branch : HEAD |
4447efc6c833763efbc509f8b4b52ee4a30f6280 |
|
11-Jan-2003 |
Timo Sirainen <tss@iki.fi> |
SORT optimization. It now uses memory to store one or two of the sort
criteria items. Should be "fast enough" now, sorting ~4000 messages doesn't
take hardly any time.
--HG--
branch : HEAD |
298c9067b2518a491ebab348d9735fea68102a45 |
|
10-Jan-2003 |
Timo Sirainen <tss@iki.fi> |
Even more rfc822 date timezone fixes
--HG--
branch : HEAD |
71e2757a38af3d18e5fd53a702bed85520520277 |
|
09-Jan-2003 |
Timo Sirainen <tss@iki.fi> |
Fixes, seems to work properly now. Much faster too.
--HG--
branch : HEAD |
fd4632d0060b2e9eef513b544ccff1e26d1fc222 |
|
08-Jan-2003 |
Timo Sirainen <tss@iki.fi> |
THREAD=REFERENCES implementation. Doesn't crash, but I'm not sure how
correct replies it produces :)
--HG--
branch : HEAD |
c0435c854a0e7246373b9752d163095cc4fbe985 |
|
05-Jan-2003 |
Timo Sirainen <tss@iki.fi> |
Naming style changes, finally got tired of most of the typedefs. Also the
previous enum -> macro change reverted so that we don't use the highest bit
anymore, that's incompatible with old indexes so they will be rebuilt.
--HG--
branch : HEAD |
a3ea111cfdbfd4f32baeb0bd7f1d72568c60a023 |
|
04-Jan-2003 |
Timo Sirainen <tss@iki.fi> |
Use unsigned char* when accessing non-NUL terminating strings. Compiler
warnings would then notify about accidentally passing them to functions which
require them NUL-terminated. Changed a few functions to use void* to avoid
unneeded casting.
--HG--
branch : HEAD |
4a6f9ed8e5412508dcba1eabb58a3680ad5e9b68 |
|
03-Jan-2003 |
Timo Sirainen <tss@iki.fi> |
Rewrote rfc822-tokenize.c to work one token at a time so it won't uselessly
take memory, maybe also a bit faster. This caused pretty large changes all
around.
Also moved all string (un)escaping code to lib/strescape.c.
--HG--
branch : HEAD |
162677af0091c924cb7266e23978e342982f7d05 |
|
01-Jan-2003 |
Timo Sirainen <tss@iki.fi> |
Storage can now specify if errors should be sent to user as BAD or NO.
Some changes to messageset parsing as specified by latest IMAP4rev1 draft.
Bad charset error is prefixed with [BADCHARSET]. Fixed a crash in SEARCH the
last commit in it caused.
--HG--
branch : HEAD |
68b14b2d9d4dfd197abefd3fdf0d9734522c1d29 |
|
02-Jan-2003 |
Timo Sirainen <tss@iki.fi> |
comment update
--HG--
branch : HEAD |
fa8845429ddd7e59e00dd22b723424666f8c6b0e |
|
02-Jan-2003 |
Timo Sirainen <tss@iki.fi> |
SEARCHing headers with "" value should always match if the header is found.
Changed imap_envelope_parse() so that it's possible to differentiate NIL
from "".
--HG--
branch : HEAD |
2b619d427addefb7d1660b23a528259d162a5f67 |
|
21-Dec-2002 |
Timo Sirainen <tss@iki.fi> |
We don't have separate read-write pools, so renamed pool_create(.., FALSE)
to pool_alloconly_create().
--HG--
branch : HEAD |
555ebb032f9b8f0cdb66f27ce7374734833e7cac |
|
19-Dec-2002 |
Timo Sirainen <tss@iki.fi> |
Buffer related cleanups. Use PATH_MAX instead of hardcoded 1024 for paths.
Added str_path() and str_ppath() functions. i_snprintf() now returns only -1
or 0 depending on if buffer got full. dec2str() returns the string allocated
from data stack. Instead of just casting to (long) or (int), we now use
dec2str() with printf-like functions. Added o_stream_send_str(). Added
strocpy() and replaced all strcpy()s and strncpy()s with it.
Pretty much untested, hope it doesn't break too badly :)
--HG--
branch : HEAD |
556726d8187cf3e98876acce36b44be4bb9ef962 |
|
17-Dec-2002 |
Timo Sirainen <tss@iki.fi> |
Full not-too-well-tested support for SORT extension. Required a few
library interface changes.
--HG--
branch : HEAD |
def516ea503a60f20d510c14d5070b7ff5bbddf4 |
|
08-Dec-2002 |
Timo Sirainen <tss@iki.fi> |
Added buffer API. Point is to hide all buffer writing behind this API which
verifies that nothing overflows. Much better than doing the same checks all
around the code, even if it is slightly slower.
Buffer reading is still mostly done directly, that isn't such a big security
risk and I can't think of a reasonable API for it anyway.
--HG--
branch : HEAD |
ecc81625167ed96c04c02aa190a1ea5baa65b474 |
|
06-Dec-2002 |
Timo Sirainen <tss@iki.fi> |
Renamed IBuffer and OBuffer to IStream and OStream which describes their
functionality better. I tried to keep the variable names and comments also
sensible.
--HG--
branch : HEAD |
55a7410569737197afb302b07b488973324b0cc5 |
|
04-Dec-2002 |
Timo Sirainen <tss@iki.fi> |
First implementation of SORT extension. String comparing still not up to
spec, so we don't advertise it in capability string yet. The code supports
getting the data partially pre-sorted to reduce memory usage and make it
faster. So, in future we could use this by creating sorted binary trees.
Also moved mail-storage-register.c into it's own .a lib to fix circular
dependencies.
--HG--
branch : HEAD |
e3f2585a945025c852f49a34b2f0288f4f2cfd15 |
|
30-Nov-2002 |
Timo Sirainen <tss@iki.fi> |
Body searching wasn't working with unknown charsets, and SEARCH BODY
searched also headers.
--HG--
branch : HEAD |
0757d92795a813ed77033526fc01e19dd3601219 |
|
30-Nov-2002 |
Timo Sirainen <tss@iki.fi> |
Non-envelope-cached header searching wasn't working. Also now search works
with messages having 8bit headers, assuming them being in same charset as
search key.
--HG--
branch : HEAD |
5acba90e31aed941953bef250ce81574dcbfed7a |
|
26-Nov-2002 |
Timo Sirainen <tss@iki.fi> |
Renamed largest_t to uintmax_t which already exists in C99.
--HG--
branch : HEAD |
c2bb1764c359ce85a7f7f789ead11dd613ff9769 |
|
25-Nov-2002 |
Timo Sirainen <tss@iki.fi> |
Locking changes triggered a bit larger cleanup :) If we have to wait for a
lock longer, the client is now notified about it every 30 seconds. Also if
mailbox opening fails because of lock timeout, we won't overwrite the index
anymore. Finally user gets a clear error message about lock timeout instead
of "internal error".
--HG--
branch : HEAD |
c7e60c7a4052db86fa90147a52d613d00f720c45 |
|
13-Nov-2002 |
Timo Sirainen <tss@iki.fi> |
SEARCH CHARSET now works properly with message bodies, and in general body
searching works more correctly by decoding base64/qp data. Non-text MIME
parts are currently not included in search, that could be made optional.
Also the body is parsed separately for each keyword, that could be
optimized.
Changed base64_decode() behaviour so that it can accept non-base64 data as
well, ie. line feeds etc.
--HG--
branch : HEAD |
98cf7ba2232059370bc54bb7cabf7715ef1c1407 |
|
02-Nov-2002 |
Timo Sirainen <tss@iki.fi> |
SEARCH TEXT now checks only field values (not names) from headers. RFC
doesn't really specify how this should be handled and I think it's better
this way. Also it's easier to handle correctly :)
--HG--
branch : HEAD |
d8e43743157d05e416eb5d3b45cddb3b3122dc07 |
|
03-Nov-2002 |
Timo Sirainen <tss@iki.fi> |
SEARCH CHARSET support. Currently we do it through iconv() and only ASCII
characters are compared case-insensitively.
--HG--
branch : HEAD |
85eee5da111b2d6260f446bce3fba529e4294c3c |
|
02-Nov-2002 |
Timo Sirainen <tss@iki.fi> |
Mostly mbox locking/syncing fixes. Still some problems though.
--HG--
branch : HEAD |
487b12c07321453abe4dde1b52a8499b3ca230d7 |
|
30-Oct-2002 |
Timo Sirainen <tss@iki.fi> |
don't unref() the ibuffer we got from imap cache.
--HG--
branch : HEAD |
bb30dbdec689323ec145242403a11d54f8ff90b9 |
|
28-Oct-2002 |
Timo Sirainen <tss@iki.fi> |
Added --enable-asserts (default) and fixed some warnings when building
without. Added i_unreached() to indicate supposedly unreachable code block
and changed a existing i_assert(0) calls to it. Removed return_if_fail() and
return_val_if_fail() macros, they're not useful.
--HG--
branch : HEAD |
afa9e078209389b28004a9b9ee98c4a4ac8c598d |
|
28-Oct-2002 |
Timo Sirainen <tss@iki.fi> |
keep i_buffer_seek() void and make it close the buffer if any errors happen.
next read will then notice the error. easier to handle it that way.
--HG--
branch : HEAD |
c04cafc1cdd093afcb32e313bcefbc9bb8972d9e |
|
27-Oct-2002 |
Timo Sirainen <tss@iki.fi> |
Moved several fields from .imap.index file to .imap.index.data file. Fixed
code so that most of the fields do not need to be set when building index,
allowing the index building to be fast (just readdir()s with maildir). This
still needs some configuration and ability to update the fields whenever it
can grab exclusive lock.
Also fixed SEARCH LARGER, SMALLER and KEYWORD.
--HG--
branch : HEAD |
c6768ddd3e599361ffc1ced39537be808edaf419 |
|
25-Oct-2002 |
Timo Sirainen <tss@iki.fi> |
More (char *) -> (const char *) fixes
--HG--
branch : HEAD |
810c9bb5f61307df1a79cd011ee29c0e58e0e262 |
|
20-Oct-2002 |
Timo Sirainen <tss@iki.fi> |
cache_fields_later() doesn't need MailIndexRecord parameter.
--HG--
branch : HEAD |
e1525829f427579a68152229ceb63e8bd461ce6a |
|
20-Oct-2002 |
Timo Sirainen <tss@iki.fi> |
Added cache_fields_later() to MailIndex interface. That can be used to
specify when some field is wanted to be cached, instead of doing it at every
lookup_field*() call.
--HG--
branch : HEAD |
0cc775b41a0dd59d5fb6a55a6fa27f0317b58eec |
|
20-Oct-2002 |
Timo Sirainen <tss@iki.fi> |
If maildir files are unexpectedly deleted, don't treat it as error, and
don't return partially fetched data. Instead try to handle it just as if
sync() had noticed it earlier.
--HG--
branch : HEAD |
1d0bb7bd8d4bcb68ace58e2a0f9c17744c3e56ac |
|
20-Oct-2002 |
Timo Sirainen <tss@iki.fi> |
Modify log now stores the changes in ranges, so store 1:100 doesn't
generate 100 entries but just one. For single message changes this takes 8
bytes unneededly though, that could be fixed but for extra complexity so
I don't think it's worth it.
Also a change in sync-interface, expunge event no longer gets UID. It's not
currently needed and I don't see any rfcs/drafts wanting it either. It's
removed mostly because the log ranges makes it impossible to get it.
--HG--
branch : HEAD |
10ffe25023df7de97803cd94cc3ad97ff1c986a7 |
|
19-Oct-2002 |
Timo Sirainen <tss@iki.fi> |
MailStorage interface change. We now let storage call several sync-functions
whenever it wants instead of forcing it through sync() function.
This now allows us to send client FLAGS and PERMANENTFLAGS messages whenever
new custom flags are added. Also EXPUNGE command now goes nicely through
expunge() function (which CLOSE used) instead of through flag in sync().
"Out of disk space" alert is also sent now whenever it happens, before it
was sent only when opening mailbox.
Message set parser now complains when referencing mail sequences outside the
possible range. Modify log before sent flags/expunges changes to client even
if it didn't know about those messages yet. Also some other smaller
cleanups.
Beginnings of fixing APPEND and COPY when trying to store mails into
selected mailbox. Before this didn't work too well or simply broke things.
Still broken, needs a bit more changes..
--HG--
branch : HEAD |
83f6a6ed104a0dc52e5e89d5de9783c1f761aa05 |
|
16-Oct-2002 |
Timo Sirainen <tss@iki.fi> |
SEARCH SEEN, UNSEEN, DELETED, UNDELETED, RECENT, UNRECENT optimizations.
We can limit the fetched messages by checking lowwater marks in header.
We can also immediately abort searching if header says there's no messages
with such flags.
--HG--
branch : HEAD |
7f95cc8a75c2e794a28b67d228f13611bba997a8 |
|
16-Oct-2002 |
Timo Sirainen <tss@iki.fi> |
SEARCH SMALLER/LARGER - we may be able to handle the request using only
physical sizes, avoids calculating the virtual size in those cases
--HG--
branch : HEAD |
b646fdb90f75ab80ea7feca42fa2e1f8e788b004 |
|
14-Oct-2002 |
Timo Sirainen <tss@iki.fi> |
Split IOBuffer into mmaped IBuffer, file IBuffer, memory data IBuffer and
file OBuffer.
--HG--
branch : HEAD |
458de2c8c9f10038de964d789012e80a970b9c5c |
|
12-Oct-2002 |
Timo Sirainen <tss@iki.fi> |
Dropped sent_time and alignment from MailIndexRecord. SEARCH can now use
cached ENVELOPE data to search FROM, TO, CC, BCC, SUBJECT, HEADER MESSAGE-ID
and HEADER IN-REPLY-TO. They're never cached anymore now. Also SEARCH SENT*
had to be changed to use ENVELOPE (or fallback to Date-header parsing)
because sent_time was removed.
--HG--
branch : HEAD |
1f4b9beda52e08d3db29746370af05bee17670c4 |
|
05-Oct-2002 |
Timo Sirainen <tss@iki.fi> |
message_parse_header() now calls the function with empty name/value at end
of headers. we use this feature with mbox to allow usage of Content-Length
header field.
--HG--
branch : HEAD |
41d1dec1f5b357a02a053ebb83fc34d623efab4a |
|
06-Oct-2002 |
Timo Sirainen <tss@iki.fi> |
Added io_buffer_set_start_offset() and io_buffer_ref() and replaced
io_buffer_destroy() with io_buffer_unref().
mbox file is now kept open all the time.
--HG--
branch : HEAD |
429c1e6a778d7e84d6d2d2b506709566903445c9 |
|
06-Oct-2002 |
Timo Sirainen <tss@iki.fi> |
Added autoclose_fd-flag for io_buffer_create_file() and
io_buffer_create_mmap().
--HG--
branch : HEAD |
d8bbb406a4a394b0109d4d5318cf0b02a57e7407 |
|
06-Oct-2002 |
Timo Sirainen <tss@iki.fi> |
First version of binary tree file, still some locking issues while opening
the file.
--HG--
branch : HEAD |
ceb33c7aad4bd20a7fd4a5927604b8c0c186666f |
|
05-Oct-2002 |
Timo Sirainen <tss@iki.fi> |
compiler warning fixes
--HG--
branch : HEAD |
ac50d909882a95e3012a186c577ddecb2d3f310f |
|
29-Sep-2002 |
Timo Sirainen <tss@iki.fi> |
Modify log fixes. STORE and SEARCH didn't handle properly message sequence
numbers when some in the middle were externally deleted.
--HG--
branch : HEAD |
88a9a2bf36bdd0b6c80af2fa6444e7720cbf3bd8 |
|
25-Sep-2002 |
Timo Sirainen <tss@iki.fi> |
Only first search condition was checked.
--HG--
branch : HEAD |
37d34c871f4be045e27bcb3b53d52eec10b6ccb1 |
|
23-Sep-2002 |
Timo Sirainen <tss@iki.fi> |
IOBuffer cleanup, hopefully fixes some mbox problems.
--HG--
branch : HEAD |
6141d8c6260c3dfaeb9dd4ed09197e4122fd017e |
|
15-Sep-2002 |
Timo Sirainen <tss@iki.fi> |
More cleanups. lib-storage should handle "out of disk space" conditions
properly.
--HG--
branch : HEAD |
02b32cf39a098edf60981fc228e4b034f11f3b90 |
|
14-Sep-2002 |
Timo Sirainen <tss@iki.fi> |
lots of cleanups. also index/datafile is now capable of staying in memory,
as long as it's noticed while opening the index.
--HG--
branch : HEAD |
15be6eb895f1e111844b3fae609c34f7b0704110 |
|
10-Sep-2002 |
Timo Sirainen <tss@iki.fi> |
SEARCH fixes
--HG--
branch : HEAD |
045440beba5cfcf4a2fc2079ae488ddf46bdd840 |
|
10-Sep-2002 |
Timo Sirainen <tss@iki.fi> |
crashfix for searching from message body
--HG--
branch : HEAD |
6697a923d6768bf8d71f87f80b90747cf6870753 |
|
08-Sep-2002 |
Timo Sirainen <tss@iki.fi> |
move size_t fixes
--HG--
branch : HEAD |
d2f5aacd3d549c3d39dae41b6522d585244b016d |
|
08-Sep-2002 |
Timo Sirainen <tss@iki.fi> |
size_t fixes for lib/. Changed OFF_T_FORMAT to PRIuOFF_T which is more
C99-like.
--HG--
branch : HEAD |
7f0113f4efa1e4e020d64f714d1d765963005fd5 |
|
06-Sep-2002 |
Timo Sirainen <tss@iki.fi> |
Bigger changes.. full_virtual_size was removed from index record and
MessagePart caching is now forced. Also added per-message flags, including
binary flags which can be used to check if CRs need to be inserted into
message data.
Added mbox-rewrite support which can be used to write out mbox file with
updated flags. This still has the problem of being able to read changed
custom flags, that'll require another bigger change.
There's also several other mostly mbox related fixes.
--HG--
branch : HEAD |
b0f4d39e96eeaa00cde7525a9a5991feefa17a3a |
|
02-Sep-2002 |
Timo Sirainen <tss@iki.fi> |
Whops, we were using RFC822 dates everywhere instead of IMAP dates.
--HG--
branch : HEAD |
1e6189f03793f03df23a1d70415fcd42ce8cc981 |
|
02-Sep-2002 |
Timo Sirainen <tss@iki.fi> |
specifying messageset/uidset in SEARCH broke it
--HG--
branch : HEAD |
46969243aa16f8f92334193df4958bed7918aa20 |
|
28-Aug-2002 |
Timo Sirainen <tss@iki.fi> |
wrong assert()s :)
--HG--
branch : HEAD |
9d0e848cc0dffa3c7f723cd739bf3d7077723ecc |
|
27-Aug-2002 |
Timo Sirainen <tss@iki.fi> |
Some cleanups, assertion fixes.
--HG--
branch : HEAD |
ec9d382ea6adbf2c8a0e5dd304acb629ebed3203 |
|
27-Aug-2002 |
Timo Sirainen <tss@iki.fi> |
Introduced uoff_t which is the unsigned-equilevant of off_t. This was needed
to be able to handle off_t overflows properly. Also changed a few unsigned
int fields into uoff_t so we should now support >2G mails if uoff_t is
64bit. Also fixed several potential integer overflows.
--HG--
branch : HEAD |
daed4cd64db0996b782a6d9143e2edbf176d17e0 |
|
27-Aug-2002 |
Timo Sirainen <tss@iki.fi> |
fixes for messageset handling
--HG--
branch : HEAD |
1215bc4d7e747846f282cf710e61f3768e69238d |
|
22-Aug-2002 |
Timo Sirainen <tss@iki.fi> |
s/user_data/context/ and some s/Data/Context/
--HG--
branch : HEAD |
e403d34ae6904cd8d9f72345a2f2dc017d3b46aa |
|
22-Aug-2002 |
Timo Sirainen <tss@iki.fi> |
Message data is parsed in blocks (no longer entirely mmap()ed). Several
IOBuffer changes. All mixed signed/unsigned comparisions were fixed so code
can now be compiled with gcc's -W flag. mbox support is broken currently,
and there's most likely several other problems too.
--HG--
branch : HEAD |
66251e6ab31e5cc153fe5cae608e416dacafe9cd |
|
08-Aug-2002 |
Timo Sirainen <tss@iki.fi> |
Initial revision
--HG--
branch : HEAD |