[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-mailutils] attribute_set_seen() in mailbox.c:mailbox_flush, why?
From: |
Andy |
Subject: |
[bug-mailutils] attribute_set_seen() in mailbox.c:mailbox_flush, why? |
Date: |
Tue, 28 Dec 2004 09:52:47 +0800 |
Hi All,
I want to copy (only new) messages from a source mailbox to a destination
mailbox, adding a unique ID in the
header whilst copying, eg. copying only new email from a POP (or IMAP) server
to a local mailbox.
I was making the mistake of flushing the mailbox (If I did not use flush, the
new header field was
not written to disk), but all messages are set to "seen" in flush(). Is this
right?
After reading this email:
http://lists.gnu.org/archive/html/bug-mailutils/2003-06/msg00025.html
(this is no good if mailbox_flush(mbox, 1); sets the status back to
'seen", no?)
I now use mailbox_expunge() or mailbox_save_attributes(), and not
flush().
Is the attached code the right way for doing what i want, as described
above?
Also, can anyone say why the "seen" attribute is set in the mailbox flush
function?
mailutils-0.6/mailbox/mailbox.c:mailbox_flush()
attribute_set_seen (attr); (line 218)
thanxs for any help, i attach the code, below is the output.
Andy
$ f=tmp/mbox; >$f; ./mbtest pop://username:address@hidden $f;
grep -e "^From " -e Status -e XXX $f
1, 1
1 uild is [a363d598644ac93c784619c010b1efa5] src status is [(NO STATUS)]
dst status is [(NO STATUS)]
2, 2
2 uild is [1b6f2d336af77b35d22f593e3ff085a3] src status is [(NO STATUS)]
dst status is [(NO STATUS)]
3, 3
3 uild is [b8af9be1a0d798c1dd4e3a0dc9c30aa6] src status is [(NO STATUS)]
dst status is [(NO STATUS)]
>From xxxxxxxxxxxxx Mon Dec 27 19:21:10 2004
X-XXX: Testing
>From yyyyyyyyyyyyy Mon Dec 27 19:21:11 2004
X-XXX: Testing
>From address@hidden Mon Dec 27 19:21:13 2004
X-XXX: Testing
Status: R
mbtest.c
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug-mailutils] attribute_set_seen() in mailbox.c:mailbox_flush, why?,
Andy <=