fetchmail-friends
[Top] [All Lists]

Re: [fetchmail] Downloading Large -- Removing Small

2002-08-03 20:47:21
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.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:       http://www.iso-top.biz     |    Jabber: 
askwar(_at_)a-message(_dot_)de
   iso-top.biz - Die günstige Art an Linux Distributionen zu kommen
                       Uptime: 1 day 6 hours 31 minutes

<Prev in Thread] Current Thread [Next in Thread>