fetchmail-friends
[Top] [All Lists]

[fetchmail] Re: Downloading Large -- Removing Small

2002-08-04 10:51:34
Alexander Skwar stated the following:

So sprach SoloCDM am 2002-08-02 um 11:37:25 -0600 :

With fetchmail 5.9.0 downloading from a POP3 mail server, how can I
download 250 messages from a mail server while every 50 messages,
once downloaded, are removed from the mail server in the same
process?

A good start would be to read the man page ;) This would lead you to:

       -e <count>, --expunge <count> (keyword: expunge) Arrange for
       deletions to be made final after a given number of mes­ sages.
       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.

Is the following legitimate?

fetchmail -a -b 250 -B 250 -e 50

If not, please explain to me the difference between batchlimit and
fetchlimit.

So far, the above syntax is working.

-- 
Note: When you reply to this message, please include the mailing
      list and/or newsgroup address and my email address in To:

*********************************************************************
Signed,
SoloCDM