Re: Sieve \\Seen flag actions not replicated

From: John Capo (no email)
Date: Tue Jan 02 2007 - 19:19:16 EST

  • Next message: Simon Matter: "Re: Problem starting cyrus imap in FC6 Was:[Re: Newbie needs help]"

    Quoting Ken Murchison ():
    > John Capo wrote:
    > >Tiring of running fixup scripts to keep seen state consistent, I
    > >decided to find the problem. In imap/lmtpd.c:
    > >
    > > sync_log_append(mailboxname);
    > >+
    > >+ if (nflags && user && !strncmp("user.", mailboxname, 5) &&
    > >!strncmp(mailboxname + 5, user, strlen(user)))
    > >+ sync_log_seen(user, mailboxname);
    > > }
    > >
    > >The strncmps insure that the seen state is updated only for the
    > >user that owns the mailbox. Are they neeed?
    >
    > No, since you can set \Seen on shared mailboxes. I haven't tested it,
    > but I think this does the right thing. Please let me know.

    This patch works just fine. Tested with combinations of system
    flags and user flags.

    >
    > --- lmtpd.c.~1.145.~ 2006-12-19 14:33:09.000000000 -0500
    > +++ lmtpd.c 2007-01-02 12:39:59.000000000 -0500
    > @@ -514,6 +514,16 @@
    > syslog(LOG_INFO, "Delivered: %s to mailbox: %s", id,
    > mailboxname);
    >
    > sync_log_append(mailboxname);
    > +
    > + if (user) {
    > + /* check if the \Seen flag has been set on this message */
    > + while (nflags) {
    > + if (!strcmp(flag[--nflags], "\\seen")) {
    > + sync_log_seen(user, mailboxname);
    > + break;
    > + }
    > + }
    > + }
    > }
    > }
    >
    >
    >
    > --
    > Kenneth Murchison
    > Systems Programmer
    > Project Cyrus Developer/Maintainer
    > Carnegie Mellon University


  • Next message: Simon Matter: "Re: Problem starting cyrus imap in FC6 Was:[Re: Newbie needs help]"





    Hosted Email Solutions

    Invaluement Anti-Spam DNSBLs



    Powered By FreeBSD   Powered By FreeBSD