From: Michael 'h. K. <mai...@zz...> - 2004-06-10 10:56:53
|
> > > Yet another attempt on fix. Once again after such a long break in > > > digging mailsync I'm totally lost in all the mailbox open operations, > > > but this is what I had to do without using if(ismh) to get mh sync > > > properly. basically, mailbox_open makes mh mailboxes forget about > > > messages flagged for removal. > > > > Strange, this should be fixed in the c-client code. I don't think it will be fixed, though... > > > So, I had to expunge mail before going any > > > further and not open it if it's already open. I have no clue if it will > > > break anything or not... > > > > I spend quite some time pondering this and going through all the > > mail_open's. And I think it will not break anything... I've committed a > > slightly modified version - thanks *a lot*!!! > > OK, no, actually it can't work. The problem is seen below: > > Synchronizing stores "local-inbox" <-> "remote-inbox"... > Authorizing against {[192.168.1.2]/imap} > > *** INBOX *** > > deleted > Mon Jun 7 Some One RE : Re: [Afbackup-devel] Re: > deleted > Sun Jun 6 Some Other mailsync; ssh vs rsh > deleted > Sat Jun 5 A Person > deleted > Mon Jun 7 Another P Vorstudie > Expunged 4 mails in store eis-inbox > Authorizing against {[192.168.1.2]/imap} > Error: Bad msgno 67 in mail_elt, nmsgs = 64 > A fatal error occured - terminating > Aborted > > What we did here is expunge messages and then try to copy other messages > back and forth. The problem is, that the numbering has changed because of > expunging some emails inbetween. Yes.. We've had this problem before... > I'll have to reverse your patch. It seems that c-client needs to be fixed > (see osdep/mh.c -> mh_check for reference) in order to not loose > information on what messages have been deleted when reopening a > connection. > > Talking of which and for reference - how do messages scheduled for removal > look like in mh? Are they moved somewhere? Or is their filename changed? > Or is a flag set within the message? I'm afraid c-client only keeps this information in memory. When one expunges message it simply unlinks files. MH itself renames files prepending them with ',' instead of unlinking. Is there any way to avoid reopening mailbox? Of course one can also reread msgids after expunging, but it's a waste of time and bandwidth in case of non-nmh mailbox... Love, H |