Mercurial > dovecot > original-hg > dovecot-1.2
annotate src/lib-storage/index/maildir/maildir-mail.c @ 4421:f1888ce91702 HEAD
If requested mail isn't found from uidlist, mark the mail as expunged.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 18 Jun 2006 01:44:57 +0300 |
parents | 61cc7e40bec6 |
children | 14b10f7ea70e |
rev | line source |
---|---|
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
1 /* Copyright (C) 2003 Timo Sirainen */ |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
2 |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
3 #include "lib.h" |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
4 #include "istream.h" |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
5 #include "index-mail.h" |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
6 #include "maildir-storage.h" |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
7 #include "maildir-uidlist.h" |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
8 |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
9 #include <fcntl.h> |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
10 #include <unistd.h> |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
11 #include <sys/stat.h> |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
12 |
3279
b698ae839a18
Moved mbox/maildir-specific variables from struct index_mailbox to
Timo Sirainen <tss@iki.fi>
parents:
3248
diff
changeset
|
13 static int |
b698ae839a18
Moved mbox/maildir-specific variables from struct index_mailbox to
Timo Sirainen <tss@iki.fi>
parents:
3248
diff
changeset
|
14 do_open(struct maildir_mailbox *mbox, const char *path, void *context) |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
15 { |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
16 int *fd = context; |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
17 |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
18 *fd = open(path, O_RDONLY); |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
19 if (*fd != -1) |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
20 return 1; |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
21 if (errno == ENOENT) |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
22 return 0; |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
23 |
3280
2c72492dfd91
Created mbox_storage and maildir_storage.
Timo Sirainen <tss@iki.fi>
parents:
3279
diff
changeset
|
24 mail_storage_set_critical(STORAGE(mbox->storage), |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
25 "open(%s) failed: %m", path); |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
26 return -1; |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
27 } |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
28 |
3279
b698ae839a18
Moved mbox/maildir-specific variables from struct index_mailbox to
Timo Sirainen <tss@iki.fi>
parents:
3248
diff
changeset
|
29 static int |
b698ae839a18
Moved mbox/maildir-specific variables from struct index_mailbox to
Timo Sirainen <tss@iki.fi>
parents:
3248
diff
changeset
|
30 do_stat(struct maildir_mailbox *mbox, const char *path, void *context) |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
31 { |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
32 struct stat *st = context; |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
33 |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
34 if (stat(path, st) == 0) |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
35 return 1; |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
36 if (errno == ENOENT) |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
37 return 0; |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
38 |
3280
2c72492dfd91
Created mbox_storage and maildir_storage.
Timo Sirainen <tss@iki.fi>
parents:
3279
diff
changeset
|
39 mail_storage_set_critical(STORAGE(mbox->storage), |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
40 "stat(%s) failed: %m", path); |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
41 return -1; |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
42 } |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
43 |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
44 static struct istream * |
4094
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
45 maildir_open_mail(struct maildir_mailbox *mbox, struct mail *mail, |
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
46 bool *deleted_r) |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
47 { |
4094
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
48 const char *path; |
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
49 int fd = -1; |
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
50 |
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
51 *deleted_r = FALSE; |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
52 |
4094
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
53 if (mail->uid != 0) { |
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
54 if (maildir_file_do(mbox, mail->uid, do_open, &fd) < 0) |
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
55 return NULL; |
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
56 } else { |
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
57 path = maildir_save_file_get_path(mail->transaction, mail->seq); |
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
58 if (do_open(mbox, path, &fd) <= 0) |
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
59 return NULL; |
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
60 } |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
61 |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
62 if (fd == -1) { |
4094
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
63 *deleted_r = TRUE; |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
64 return NULL; |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
65 } |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
66 |
3279
b698ae839a18
Moved mbox/maildir-specific variables from struct index_mailbox to
Timo Sirainen <tss@iki.fi>
parents:
3248
diff
changeset
|
67 if (mbox->ibox.mail_read_mmaped) { |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
68 return i_stream_create_mmap(fd, default_pool, |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
69 MAIL_MMAP_BLOCK_SIZE, 0, 0, TRUE); |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
70 } else { |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
71 return i_stream_create_file(fd, default_pool, |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
72 MAIL_READ_BLOCK_SIZE, TRUE); |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
73 } |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
74 } |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
75 |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
76 static time_t maildir_mail_get_received_date(struct mail *_mail) |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
77 { |
3279
b698ae839a18
Moved mbox/maildir-specific variables from struct index_mailbox to
Timo Sirainen <tss@iki.fi>
parents:
3248
diff
changeset
|
78 struct index_mail *mail = (struct index_mail *)_mail; |
b698ae839a18
Moved mbox/maildir-specific variables from struct index_mailbox to
Timo Sirainen <tss@iki.fi>
parents:
3248
diff
changeset
|
79 struct maildir_mailbox *mbox = (struct maildir_mailbox *)mail->ibox; |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
80 struct index_mail_data *data = &mail->data; |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
81 struct stat st; |
4094
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
82 const char *path; |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
83 int fd; |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
84 |
1978
6303ef092c5b
mbox code compiles again, but syncing is only partially implemented so
Timo Sirainen <tss@iki.fi>
parents:
1947
diff
changeset
|
85 (void)index_mail_get_received_date(_mail); |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
86 if (data->received_date != (time_t)-1) |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
87 return data->received_date; |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
88 |
3458
0c264f105899
Try to be a bit smarter about when to parse header/body.
Timo Sirainen <tss@iki.fi>
parents:
3418
diff
changeset
|
89 if (data->access_part != 0 && data->stream == NULL) { |
2298
5beb0c20b6e8
Cache file fixes, API changes, etc. It's still in somewhat ugly state, but
Timo Sirainen <tss@iki.fi>
parents:
2061
diff
changeset
|
90 /* we're going to open the mail anyway */ |
3209
923ff19873d4
Major mail-storage API changes. It's now a bit cleaner and much more plugin
Timo Sirainen <tss@iki.fi>
parents:
3207
diff
changeset
|
91 (void)mail_get_stream(_mail, NULL, NULL); |
2298
5beb0c20b6e8
Cache file fixes, API changes, etc. It's still in somewhat ugly state, but
Timo Sirainen <tss@iki.fi>
parents:
2061
diff
changeset
|
92 } |
5beb0c20b6e8
Cache file fixes, API changes, etc. It's still in somewhat ugly state, but
Timo Sirainen <tss@iki.fi>
parents:
2061
diff
changeset
|
93 |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
94 if (data->stream != NULL) { |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
95 fd = i_stream_get_fd(data->stream); |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
96 i_assert(fd != -1); |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
97 |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
98 if (fstat(fd, &st) < 0) { |
3280
2c72492dfd91
Created mbox_storage and maildir_storage.
Timo Sirainen <tss@iki.fi>
parents:
3279
diff
changeset
|
99 mail_storage_set_critical(STORAGE(mbox->storage), |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
100 "fstat(maildir) failed: %m"); |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
101 return (time_t)-1; |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
102 } |
4094
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
103 } else if (_mail->uid != 0) { |
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
104 if (maildir_file_do(mbox, _mail->uid, do_stat, &st) <= 0) |
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
105 return (time_t)-1; |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
106 } else { |
4094
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
107 path = maildir_save_file_get_path(_mail->transaction, |
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
108 _mail->seq); |
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
109 if (do_stat(mbox, path, &st) <= 0) |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
110 return (time_t)-1; |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
111 } |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
112 |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
113 data->received_date = st.st_mtime; |
3909
411f20e72a8f
Added mail_cache_min_mail_count setting.
Timo Sirainen <tss@iki.fi>
parents:
3863
diff
changeset
|
114 index_mail_cache_add(mail, MAIL_CACHE_RECEIVED_DATE, |
411f20e72a8f
Added mail_cache_min_mail_count setting.
Timo Sirainen <tss@iki.fi>
parents:
3863
diff
changeset
|
115 &data->received_date, sizeof(data->received_date)); |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
116 return data->received_date; |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
117 } |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
118 |
2504
98f6057f27a1
Added mail.get_physical_size().
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
119 static uoff_t maildir_mail_get_virtual_size(struct mail *_mail) |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
120 { |
2504
98f6057f27a1
Added mail.get_physical_size().
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
121 struct index_mail *mail = (struct index_mail *)_mail; |
3279
b698ae839a18
Moved mbox/maildir-specific variables from struct index_mailbox to
Timo Sirainen <tss@iki.fi>
parents:
3248
diff
changeset
|
122 struct maildir_mailbox *mbox = (struct maildir_mailbox *)mail->ibox; |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
123 struct index_mail_data *data = &mail->data; |
4351
61cc7e40bec6
Add ",S=size" to maildir filenames when quota plugin is loaded with
Timo Sirainen <tss@iki.fi>
parents:
4274
diff
changeset
|
124 const char *fname; |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
125 uoff_t virtual_size; |
1947 | 126 enum maildir_uidlist_rec_flag flags; |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
127 |
2504
98f6057f27a1
Added mail.get_physical_size().
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
128 if (data->virtual_size != (uoff_t)-1) |
98f6057f27a1
Added mail.get_physical_size().
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
129 return data->virtual_size; |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
130 |
2504
98f6057f27a1
Added mail.get_physical_size().
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
131 if ((mail->wanted_fields & MAIL_FETCH_VIRTUAL_SIZE) == 0) { |
98f6057f27a1
Added mail.get_physical_size().
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
132 data->virtual_size = index_mail_get_cached_virtual_size(mail); |
98f6057f27a1
Added mail.get_physical_size().
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
133 if (data->virtual_size != (uoff_t)-1) |
98f6057f27a1
Added mail.get_physical_size().
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
134 return data->virtual_size; |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
135 } |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
136 |
4094
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
137 if (_mail->uid != 0) { |
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
138 fname = maildir_uidlist_lookup(mbox->uidlist, _mail->uid, |
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
139 &flags); |
4421
f1888ce91702
If requested mail isn't found from uidlist, mark the mail as expunged.
Timo Sirainen <tss@iki.fi>
parents:
4351
diff
changeset
|
140 if (fname == NULL) { |
f1888ce91702
If requested mail isn't found from uidlist, mark the mail as expunged.
Timo Sirainen <tss@iki.fi>
parents:
4351
diff
changeset
|
141 _mail->expunged = TRUE; |
4094
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
142 return (uoff_t)-1; |
4421
f1888ce91702
If requested mail isn't found from uidlist, mark the mail as expunged.
Timo Sirainen <tss@iki.fi>
parents:
4351
diff
changeset
|
143 } |
4094
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
144 } else { |
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
145 fname = maildir_save_file_get_path(_mail->transaction, |
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
146 _mail->seq); |
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
147 } |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
148 |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
149 /* size can be included in filename */ |
4351
61cc7e40bec6
Add ",S=size" to maildir filenames when quota plugin is loaded with
Timo Sirainen <tss@iki.fi>
parents:
4274
diff
changeset
|
150 if (maildir_filename_get_size(fname, MAILDIR_EXTRA_VIRTUAL_SIZE, |
61cc7e40bec6
Add ",S=size" to maildir filenames when quota plugin is loaded with
Timo Sirainen <tss@iki.fi>
parents:
4274
diff
changeset
|
151 &virtual_size)) { |
61cc7e40bec6
Add ",S=size" to maildir filenames when quota plugin is loaded with
Timo Sirainen <tss@iki.fi>
parents:
4274
diff
changeset
|
152 index_mail_cache_add(mail, MAIL_CACHE_VIRTUAL_FULL_SIZE, |
61cc7e40bec6
Add ",S=size" to maildir filenames when quota plugin is loaded with
Timo Sirainen <tss@iki.fi>
parents:
4274
diff
changeset
|
153 &virtual_size, sizeof(virtual_size)); |
61cc7e40bec6
Add ",S=size" to maildir filenames when quota plugin is loaded with
Timo Sirainen <tss@iki.fi>
parents:
4274
diff
changeset
|
154 return virtual_size; |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
155 } |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
156 |
2504
98f6057f27a1
Added mail.get_physical_size().
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
157 return index_mail_get_virtual_size(_mail); |
98f6057f27a1
Added mail.get_physical_size().
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
158 } |
98f6057f27a1
Added mail.get_physical_size().
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
159 |
2996
9219e788d774
Added %f pop3_uidl_format for maildir. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2504
diff
changeset
|
160 static const char * |
9219e788d774
Added %f pop3_uidl_format for maildir. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2504
diff
changeset
|
161 maildir_mail_get_special(struct mail *_mail, enum mail_fetch_field field) |
9219e788d774
Added %f pop3_uidl_format for maildir. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2504
diff
changeset
|
162 { |
9219e788d774
Added %f pop3_uidl_format for maildir. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2504
diff
changeset
|
163 struct index_mail *mail = (struct index_mail *)_mail; |
3279
b698ae839a18
Moved mbox/maildir-specific variables from struct index_mailbox to
Timo Sirainen <tss@iki.fi>
parents:
3248
diff
changeset
|
164 struct maildir_mailbox *mbox = (struct maildir_mailbox *)mail->ibox; |
2996
9219e788d774
Added %f pop3_uidl_format for maildir. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2504
diff
changeset
|
165 enum maildir_uidlist_rec_flag flags; |
9219e788d774
Added %f pop3_uidl_format for maildir. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2504
diff
changeset
|
166 const char *fname, *end; |
9219e788d774
Added %f pop3_uidl_format for maildir. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2504
diff
changeset
|
167 |
9219e788d774
Added %f pop3_uidl_format for maildir. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2504
diff
changeset
|
168 if (field == MAIL_FETCH_UIDL_FILE_NAME) { |
4094
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
169 if (_mail->uid != 0) { |
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
170 fname = maildir_uidlist_lookup(mbox->uidlist, |
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
171 _mail->uid, &flags); |
4421
f1888ce91702
If requested mail isn't found from uidlist, mark the mail as expunged.
Timo Sirainen <tss@iki.fi>
parents:
4351
diff
changeset
|
172 if (fname == NULL) { |
f1888ce91702
If requested mail isn't found from uidlist, mark the mail as expunged.
Timo Sirainen <tss@iki.fi>
parents:
4351
diff
changeset
|
173 _mail->expunged = TRUE; |
f1888ce91702
If requested mail isn't found from uidlist, mark the mail as expunged.
Timo Sirainen <tss@iki.fi>
parents:
4351
diff
changeset
|
174 return NULL; |
f1888ce91702
If requested mail isn't found from uidlist, mark the mail as expunged.
Timo Sirainen <tss@iki.fi>
parents:
4351
diff
changeset
|
175 } |
4094
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
176 } else { |
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
177 fname = maildir_save_file_get_path(_mail->transaction, |
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
178 _mail->seq); |
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
179 } |
3417
b0bdf32564b7
Replaced ':' and ',' character usages with #defines, so they can be changed
Timo Sirainen <tss@iki.fi>
parents:
3280
diff
changeset
|
180 end = strchr(fname, MAILDIR_INFO_SEP); |
2996
9219e788d774
Added %f pop3_uidl_format for maildir. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2504
diff
changeset
|
181 return end == NULL ? fname : t_strdup_until(fname, end); |
9219e788d774
Added %f pop3_uidl_format for maildir. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2504
diff
changeset
|
182 } |
9219e788d774
Added %f pop3_uidl_format for maildir. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2504
diff
changeset
|
183 |
9219e788d774
Added %f pop3_uidl_format for maildir. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2504
diff
changeset
|
184 return index_mail_get_special(_mail, field); |
9219e788d774
Added %f pop3_uidl_format for maildir. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2504
diff
changeset
|
185 } |
9219e788d774
Added %f pop3_uidl_format for maildir. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2504
diff
changeset
|
186 |
2504
98f6057f27a1
Added mail.get_physical_size().
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
187 static uoff_t maildir_mail_get_physical_size(struct mail *_mail) |
98f6057f27a1
Added mail.get_physical_size().
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
188 { |
98f6057f27a1
Added mail.get_physical_size().
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
189 struct index_mail *mail = (struct index_mail *)_mail; |
3279
b698ae839a18
Moved mbox/maildir-specific variables from struct index_mailbox to
Timo Sirainen <tss@iki.fi>
parents:
3248
diff
changeset
|
190 struct maildir_mailbox *mbox = (struct maildir_mailbox *)mail->ibox; |
2504
98f6057f27a1
Added mail.get_physical_size().
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
191 struct index_mail_data *data = &mail->data; |
98f6057f27a1
Added mail.get_physical_size().
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
192 struct stat st; |
4351
61cc7e40bec6
Add ",S=size" to maildir filenames when quota plugin is loaded with
Timo Sirainen <tss@iki.fi>
parents:
4274
diff
changeset
|
193 const char *fname; |
2504
98f6057f27a1
Added mail.get_physical_size().
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
194 uoff_t size; |
98f6057f27a1
Added mail.get_physical_size().
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
195 enum maildir_uidlist_rec_flag flags; |
98f6057f27a1
Added mail.get_physical_size().
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
196 |
98f6057f27a1
Added mail.get_physical_size().
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
197 size = index_mail_get_physical_size(_mail); |
98f6057f27a1
Added mail.get_physical_size().
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
198 if (size != (uoff_t)-1) |
98f6057f27a1
Added mail.get_physical_size().
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
199 return size; |
98f6057f27a1
Added mail.get_physical_size().
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
200 |
4094
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
201 if (_mail->uid != 0) { |
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
202 fname = maildir_uidlist_lookup(mbox->uidlist, _mail->uid, |
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
203 &flags); |
4421
f1888ce91702
If requested mail isn't found from uidlist, mark the mail as expunged.
Timo Sirainen <tss@iki.fi>
parents:
4351
diff
changeset
|
204 if (fname == NULL) { |
f1888ce91702
If requested mail isn't found from uidlist, mark the mail as expunged.
Timo Sirainen <tss@iki.fi>
parents:
4351
diff
changeset
|
205 _mail->expunged = TRUE; |
4094
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
206 return (uoff_t)-1; |
4421
f1888ce91702
If requested mail isn't found from uidlist, mark the mail as expunged.
Timo Sirainen <tss@iki.fi>
parents:
4351
diff
changeset
|
207 } |
4094
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
208 } else { |
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
209 fname = maildir_save_file_get_path(_mail->transaction, |
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
210 _mail->seq); |
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
211 } |
2504
98f6057f27a1
Added mail.get_physical_size().
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
212 |
98f6057f27a1
Added mail.get_physical_size().
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
213 /* size can be included in filename */ |
4351
61cc7e40bec6
Add ",S=size" to maildir filenames when quota plugin is loaded with
Timo Sirainen <tss@iki.fi>
parents:
4274
diff
changeset
|
214 if (!maildir_filename_get_size(fname, MAILDIR_EXTRA_FILE_SIZE, &size)) { |
4094
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
215 if (_mail->uid != 0) { |
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
216 if (maildir_file_do(mbox, _mail->uid, |
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
217 do_stat, &st) <= 0) |
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
218 return (uoff_t)-1; |
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
219 } else { |
4351
61cc7e40bec6
Add ",S=size" to maildir filenames when quota plugin is loaded with
Timo Sirainen <tss@iki.fi>
parents:
4274
diff
changeset
|
220 /* saved mail which hasn't been committed yet */ |
4094
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
221 if (do_stat(mbox, fname, &st) <= 0) |
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
222 return (uoff_t)-1; |
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
223 } |
2504
98f6057f27a1
Added mail.get_physical_size().
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
224 size = st.st_size; |
98f6057f27a1
Added mail.get_physical_size().
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
225 } |
98f6057f27a1
Added mail.get_physical_size().
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
226 |
3909
411f20e72a8f
Added mail_cache_min_mail_count setting.
Timo Sirainen <tss@iki.fi>
parents:
3863
diff
changeset
|
227 index_mail_cache_add(mail, MAIL_CACHE_PHYSICAL_FULL_SIZE, |
411f20e72a8f
Added mail_cache_min_mail_count setting.
Timo Sirainen <tss@iki.fi>
parents:
3863
diff
changeset
|
228 &size, sizeof(size)); |
2504
98f6057f27a1
Added mail.get_physical_size().
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
229 data->physical_size = size; |
98f6057f27a1
Added mail.get_physical_size().
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
230 return size; |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
231 } |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
232 |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
233 static struct istream *maildir_mail_get_stream(struct mail *_mail, |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
234 struct message_size *hdr_size, |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
235 struct message_size *body_size) |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
236 { |
3279
b698ae839a18
Moved mbox/maildir-specific variables from struct index_mailbox to
Timo Sirainen <tss@iki.fi>
parents:
3248
diff
changeset
|
237 struct index_mail *mail = (struct index_mail *)_mail; |
b698ae839a18
Moved mbox/maildir-specific variables from struct index_mailbox to
Timo Sirainen <tss@iki.fi>
parents:
3248
diff
changeset
|
238 struct maildir_mailbox *mbox = (struct maildir_mailbox *)mail->ibox; |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
239 struct index_mail_data *data = &mail->data; |
3863
55df57c028d4
Added "bool" type and changed all ints that were used as booleans to bool.
Timo Sirainen <tss@iki.fi>
parents:
3458
diff
changeset
|
240 bool deleted; |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
241 |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
242 if (data->stream == NULL) { |
4094
03e14e3a4610
Support accessing saved mails that haven't been committed yet (fixes quota for maildir).
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4088
diff
changeset
|
243 data->stream = maildir_open_mail(mbox, _mail, &deleted); |
2298
5beb0c20b6e8
Cache file fixes, API changes, etc. It's still in somewhat ugly state, but
Timo Sirainen <tss@iki.fi>
parents:
2061
diff
changeset
|
244 if (data->stream == NULL) { |
3067
4c92f9eae613
mail->expunged field wasn't actually set. Now it's always set if
Timo Sirainen <tss@iki.fi>
parents:
3016
diff
changeset
|
245 _mail->expunged = deleted; |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
246 return NULL; |
2298
5beb0c20b6e8
Cache file fixes, API changes, etc. It's still in somewhat ugly state, but
Timo Sirainen <tss@iki.fi>
parents:
2061
diff
changeset
|
247 } |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
248 } |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
249 |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
250 return index_mail_init_stream(mail, hdr_size, body_size); |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
251 } |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
252 |
3209
923ff19873d4
Major mail-storage API changes. It's now a bit cleaner and much more plugin
Timo Sirainen <tss@iki.fi>
parents:
3207
diff
changeset
|
253 struct mail_vfuncs maildir_mail_vfuncs = { |
923ff19873d4
Major mail-storage API changes. It's now a bit cleaner and much more plugin
Timo Sirainen <tss@iki.fi>
parents:
3207
diff
changeset
|
254 index_mail_free, |
923ff19873d4
Major mail-storage API changes. It's now a bit cleaner and much more plugin
Timo Sirainen <tss@iki.fi>
parents:
3207
diff
changeset
|
255 index_mail_set_seq, |
4274
bd519db7f6e5
Added mail_set_uid() to select a mail by UID.
Timo Sirainen <timo.sirainen@movial.fi>
parents:
4094
diff
changeset
|
256 index_mail_set_uid, |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
257 |
2317
0cf316c77b1b
Recent flags should be fully working now with maildir.
Timo Sirainen <tss@iki.fi>
parents:
2298
diff
changeset
|
258 index_mail_get_flags, |
3016
61c8d205d887
Initial support for keywords. Syncing to mbox/maildir doesn't work yet.
Timo Sirainen <tss@iki.fi>
parents:
2996
diff
changeset
|
259 index_mail_get_keywords, |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
260 index_mail_get_parts, |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
261 maildir_mail_get_received_date, |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
262 index_mail_get_date, |
2504
98f6057f27a1
Added mail.get_physical_size().
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
263 maildir_mail_get_virtual_size, |
98f6057f27a1
Added mail.get_physical_size().
Timo Sirainen <tss@iki.fi>
parents:
2317
diff
changeset
|
264 maildir_mail_get_physical_size, |
3248
ff47e78ad717
Renamed mail_get_header() to mail_get_first_header() and mail_gets_headers()
Timo Sirainen <tss@iki.fi>
parents:
3209
diff
changeset
|
265 index_mail_get_first_header, |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
266 index_mail_get_headers, |
3248
ff47e78ad717
Renamed mail_get_header() to mail_get_first_header() and mail_gets_headers()
Timo Sirainen <tss@iki.fi>
parents:
3209
diff
changeset
|
267 index_mail_get_header_stream, |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
268 maildir_mail_get_stream, |
2996
9219e788d774
Added %f pop3_uidl_format for maildir. Patch by Andrey Panin.
Timo Sirainen <tss@iki.fi>
parents:
2504
diff
changeset
|
269 maildir_mail_get_special, |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
270 index_mail_update_flags, |
3016
61c8d205d887
Initial support for keywords. Syncing to mbox/maildir doesn't work yet.
Timo Sirainen <tss@iki.fi>
parents:
2996
diff
changeset
|
271 index_mail_update_keywords, |
1915
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
272 index_mail_expunge |
79790750c349
importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
273 }; |