fetchmail-friends
[Top] [All Lists]

[fetchmail] Re: "Limit" doesn't cooperates with "flush"

2003-10-11 04:26:12
Quoting from Eric S. Raymond's mail on Fri, Oct 10, 2003 at 04:50:34AM -0400:
There are a few reasons why 'flush' should not be used to delete
oversized messages.

- 'limit' is a resource limit control option, 'flush' is not. Using
  the two in combination is neither safe nor intuitive. 'flush' is
  specifically for deleting old seen mails. Overloading it is
  dangerous.

I agree with this argument, and have accepted the patch.

??? Which patch have you accepted? Benjamin Drieu's patch is in fact
in disagreement with my argument!

I suggest that a resource control option like 'limitflush <number>' be
added. If acceptable, I could make a patch for this.

I am very resistant to adding new options at this point.  I would
prefer to remove the size limit option entirely and ship a separate
mini-client for deleting oversized messages.

I am not sure if this mini-client is a workable idea. Is it going to
support ssl? Is it going to support all auth methods? If it is a
simple client which is going to work in insecure mode, support plain
password auth only, use the minimal POP3/IMAP commands to do its work,
there could be serious security issues. What if the wrong sizes are
reported in a man-in-the-middle attack?

Attached is a patch which adds the 'limitflush' option. It is to be
added after the patch for 'fastuidl'.

Eric, please consider it as I believe that there are too many people
using the unsafe 'flush' and 'limit' options to delete oversized
mails.

The options will now be used as:

# download and delete mails above 10 kb,
# download but do not delete mails below 10 kb
keep limitflush 10000

# delete but do not download mails above 10 kb,
# download and delete mails below 10 kb
no keep limit 10000 limitflush 10000

# delete but do not download mails above 20 kb,
# do not download or delete mails between 10 and 20 kb,
# download and delete mails below 10 kb
no keep limit 10000 limitflush 20000

-- 
Sunil Shetye.

Attachment: fetchmail-6.2.4-limitflush.patch
Description: Text document