From: Manfred W. <we...@ic...> - 2005-03-06 15:15:40
|
Matthias Andree wrote: > Of course it's not, we'll be erasing everything. > > Right code is (watch where the & is!) > > if (ctl->newsaved) > { > /* old state of mailbox may now be irrelevant */ > struct idlist *temp = ctl->oldsaved; > if (outlevel >= O_DEBUG) > report(stdout, GT_("swapping UID lists\n")); > ctl->oldsaved = ctl->newsaved; > ctl->newsaved = (struct idlist *) NULL; > free_str_list(&temp); > } > > Committed as SVN revision 4021. OK, this is now definitely the correct version. Sorry for the small bug in my first version, and thanks for committing the two fixes to svn. I think this should solve my problems. You might have a look at the attached patch. It removes the (completely unnecessary) recursion in free_str_list. So it reduces stack usage and avoids possible problems with very long lists. Furthermore I slightly changed the interface and replaced the pointer to a pointer to the first list element by just a pointer to the first list element. I think, this is cleaner; the only difference is that it is now in some cases necessary to set the pointer to NULL afterwards, but this is already done at many locations anyway. > Perhaps keeping all spam mail on the server isn't the best idea then? But since I fetch the mails from two PCs (at home and at work), I have to leave them on the server. Maybe I should delete mails from the server more frequently. But I have to do this manually, because fetchmail does not support to keep the mails only for X days or to keep only the latest X mails (the later would be very easy to implement, but according to the fetchmail FAQ it will not be implemented due to political reasons). And an automatic cron job is no alternative, because, in this case I cannot be sure, that fetchmail got all the mails before the cron job deletes them. The deletion should be done _after_ fetchmail delivered the mails locally, ideally within the same pop3 session. Manfred Weihs |