Hello,
this is similar to Bug 3695 (
https://bugzilla.cyrusimap.org/show_bug.cgi?id=3695 ).
I use "lmtp_fuzzy_mailbox_match: 1".
Delivery (to a plus or simple address) is proceeded first by
imap/lmtpd.c:deliver_local() and then by deliver_mailbox(). I found
out, that when I use an address without plus, the 7th parameter passed
to deliver_mailbox is "username" (owner of the mailbox), and
mydata->authuser (which was NULL in my tests) otherwise.
This leads later to a call of imap/append.c:append_setseen(). If
username was passed as 7th argument to deliver_mailbox (no
plus-address), as->internalseen is true in that function and the message
is marked as \\Seen. Otherwise internalseen is false and the message
does not appear as \\Seen. I have no investigated what as->seen_seq
does or is supposed to do.
This patch fixes the problem on my system (addr+Sent is resolved during
fuzzy-matching), but I don't know if it causes any side effects.
diff --git a/imap/lmtpd.c b/imap/lmtpd.c
index f70f587..5bba193 100644
--- a/imap/lmtpd.c
+++ b/imap/lmtpd.c
@@ -724,7 +724,7 @@ int deliver_local(deliver_data_t *mydata, char
**flag, int n
/* try delivery to a fuzzy matched mailbox */
ret2 = deliver_mailbox(md->f, mydata->content, mydata->stage,
md->size, flag, nflags,
- mydata->authuser, mydata->authstate,
md->id,
+ (char*) username, mydata->authstate,
md->id,
username, mydata->notifyheader,
namebuf, md->date, quotaoverride, 0);
}
Comments?
Greetings
Dilian
On 24.06.2013 16:20, Karl Pielorz wrote:
Hi,
We're running Cyrus IMAP 2.4.17. We've got sieve rules used for accounts
- and some users use 'plussed' addresses.
For example, I've setup a Sieve rule that matches on a subject of 'Test':
"
require ["fileinto"];
require ["imapflags"];
if header :contains ["Subject"] ["Test"] {
addflag "\\Seen";
}
"
This works fine e.g. if we email 'u...@example.com' - with a subject of
'Test' it'll appear in their inbox as 'Seen' mail (i.e. already read).
However, if we do a direct delivery to a subfolder e.g. email
'user+s...@example.com' - the mail appears in that folder, but appears
as 'Unseen'.
Weirdly, if we change it to do:
addflag "\\Seen"
addflag "\\Flagged"
And send an email to the plussed address, it arrives - is Flagged, but
has not had the 'Seen' flag added to it? (i.e. it arrives as Flagged,
Unseen).
Does anyone know why this is? - Or how we can fix it?
'anyone' has p rights to the destination folder (and during testing we
gave 'anyone' all rights to the destination) with the same effect.
Thanks,
-Karl