On Mon, 22 Nov 2004 17:42:30 -0800, Richard E Miles <r.godzilla@xxxxxxxxxxx> wrote: > Today while trying to get mails from my mail server I keep getting socket errors. > This causes fetchmail to refetch mail from the server over and over again with > the same mails. This typically is because of an old version of fetchmail that is crashing while reading a malformed email message. try upgrading to a newer version, as well as... > This is despite my adding expunge 10 to my .fetchmailrc file. try 1. that way if you do hit a 'bad message' and can't expunge it, you won't be repeating work you've already done. as per the man page http://www.catb.org/~esr/fetchmail/fetchmail-man.html : -e <count> | --expunge <count> (keyword: expunge) Arrange for deletions to be made final after a given number of messages. Under POP2 or POP3, fetchmail cannot make deletions final without sending QUIT and ending the session -- with this option on, fetchmail will break a long mail retrieval session into multiple subsessions, sending QUIT after each sub-session. This is a good defense against line drops on POP3 servers that do not do the equivalent of a QUIT on hangup. Under IMAP, fetchmail normally issues an EXPUNGE command after each deletion in order to force the deletion to be done immediately. This is safest when your connection to the server is flaky and expensive, as it avoids resending duplicate mail after a line hit. However, on large mailboxes the overhead of re-indexing after every message can slam the server pretty hard, so if your connection is reliable it is good to do expunges less frequently. Also note that some servers enforce a delay of a few seconds after each quit, so fetchmail may not be able to get back in immediately after an expunge -- you may see "lock busy" errors if this happens. If you specify this option to an integer N, it tells fetchmail to only issue expunges on every Nth delete. An argument of zero suppresses expunges entirely (so no expunges at all will be done until the end of run). This option does not work with ETRN or ODMR. - Kevin