[tpop3d-discuss]MailDir & status/info tag woes (latest cvs, solaris 9 sparc)

Chris Lightfoot chris at ex-parrot.com
Wed, 31 Mar 2004 23:42:43 +0100


On Wed, Mar 31, 2004 at 05:29:47PM -0500, POP3 daemon mailinglists wrote:
> 
> On Wed, 31 Mar 2004, Chris Lightfoot wrote:
> 
> > For the moment, this patch will solve both problems:
> >
> > diff -u -r1.24 maildir.c
> > --- maildir.c   3 Feb 2004 19:52:03 -0000       1.24
> > +++ maildir.c   31 Mar 2004 22:10:44 -0000
> > @@ -396,15 +396,6 @@
> >              if (unlink(m->filename) == -1)
> >                  log_print(LOG_ERR, "maildir_apply_changes: unlink(%s): %m", m->filename);
> >                  /* Warn but proceed anyway. */
> > -        } else {
> > -            /* Mark message read. */
> > -            if (strncmp(m->filename, "new/", 4) == 0) {
> > -                char *cur;
> > -                cur = xmalloc(strlen(m->filename) + 5);
> > -                sprintf(cur, "cur/%s:2,S", m->filename + 4); /* Set seen flag */
> > -                rename(m->filename, cur);    /* doesn't matter if it can't */
> > -                xfree(cur);
> > -            }
> >          }
> >      }
> >
> >
> > I'll make this more configurable in the next version.
> 
> Hello Chris,
> 
> This seems to solve the problems but introduce another. Now, any message
> that is retrieved is left in new/, never moved to cur/. Happens with and
> without the presence of an empty info tag. Is another check in order?

-- the patch above changes the logic to remove any marking
of messages as read. Having messages be moved only if they
are retrieved is slightly more troublesome and will need a
more extensive patch.

> Thanks for the swift response,
> 
>     -J

-- 
Always remember that you are unique, just like everybody else.