From: Matthias A. <mat...@gm...> - 2006-03-14 01:12:20
|
Brendan Lynch <bre...@ai...> writes: > That seem to be intentional first-pass behaviour (i.e. not really the general > Idle polling case). Look at these lines from imap_getrange(): > > 732 * We should have an expunge here to > 733 * a) avoid fetching deleted mails during 'fetchall' > 734 * b) getting a wrong count of mails during 'no fetchall' > 735 */ > 736 if (!check_only && !ctl->keep && count > 0) > 737 { > 738 ok = internal_expunge(sock); > 739 if (ok) > > This generates the EXPUNGE you see. However this only happens for the first > message, since this is the "else" case of the if statement: > > 672 if (pass > 1) > 673 { > 674 /* deleted mails have already been expunged by > 675 * end_mailbox_poll(). > > and will only be taken before the first message has been seen. After the first > message has been seen no EXPUNGE is sent (and the comment suggests why the > code does not do an EXPUNGE in this case). Well, yes, but I think it's pointless to run EXPUNGE in this particular context. We might only expunge the deletions of another process, and that's probably not what fetchmail should be doing. I'll probably merge Sunil's patch tomorrow. -- Matthias Andree |