[imp] Re: [dev] Delete & Purge
Ahmed
ashihab@alcahest.com
Thu, 27 Jun 2002 15:19:09 +0100
This message is in MIME format.
---------------------- multipart/mixed attachment
Personally, I use the trash folder to delete messages that I want to be
around for the next month or so whereas I use the IMAP delete and purge for
messages which will only clutter up my quota.
For the ex-MSOutlook of my users I noticed they don't use this facility but
prefer the deleting to trash and when their quota runs out they empty the
trash.
Enabling both delete methods was relatively simple to do by adding an extra
option in imp/config/pref.php and modifying a couple of JS files. I'm
certainly in favour of making this a standard option.
my 2c's worth.
PS: attached are the patches
including a patch to enable drafts to be selectively saved as
seen or unseen
prefs.php.patch : imp/config
compose.php.patch: imp/
navbar.inc.patch : imp/template/mailbox
actions.inc.patch: imp/template/mailbox
Ahmed...
Quoting Federico Giannici <giannici@neomedia.it>:
> > > So I propose to always add the command "Delete & Purge" next to the
> > > "Delete" command in the Mailbox and Message pages.
> > >
> > > Than we could add a new Preferences option, something as "Simplify
> > > deletion of messages" or "Immediately Purge deleted messages", or
> > > something else...
> >
> > I really don't see a need for this. If you want to accomplish
> something
> > like this, enable the option for moving messages to trash when
> > deleting. If you enable that, the hide and purge deleted commands
> won't
> > be shown anymore (and there's a new button called empty trash at the
> > menu). At the maintenance options you can define how often the trash
> > folder will be emptied and/or how old messages are removed.
>
> I already thought at that solution, but discarded it for the following
> reasons:
>
> 1) It still requires two actions to really delete the messages ("Delete"
> and then "Empty Trashcan").
>
> 2) It consumes more resorces: CPU, time and (depending on server
> implementation) disk space.
>
> 3) I think that in some IMAP servers that use Filesystem Quotas, there
> could be situations where it is impossible to copy a message into
> another folder because for a moment two copies of the message should be
> on disk, and they don't fit in the quota. In this situations, some
> messages couldn't be deleted!
>
> 4) It can even increase users problems: novice users could think that
> having deleted a message they have freed the disk space, while it is
> still occupated (in another folder).
>
---------------------- multipart/mixed attachment
KioqIHByZWZzLnBocC5kaXN0CVR1ZSBKdW4gMjUgMDg6MTY6NDcgMjAwMg0KLS0tIHByZWZzLnBo
cAlUaHUgSnVu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0KKyAgICAgJ3NoYXJlZCcgPT4gZmFsc2UsDQorICAgICAndHlwZScgPT4gJ2NoZWNrYm94
JywNCisgICAgICdkZXNjJyA9PiBfKCJBbGxvdyBtYXJraW5nIG1lc3NhZ2VzIGFzIGRlbGV0ZWQi
KQ0KKyApOw0KKyANCisgLy8gc2F2ZSBkcmFmdHMgYXMgc2VlbiBvciB1bnNlZW4NCisgJF9wcmVm
c1snc2Vlbl9kcmFmdHMnXSA9IGFycmF5KA0KKyAgICAgJ3ZhbHVlJyA9PiAwLA0KKyAgICAgJ2xv
Y2tlZCcgPT4gZmFsc2UsDQorICAgICAnc2hhcmVkJyA9PiBmYWxzZSwNCisgICAgICd0eXBlJyA9
PiAnY2hlY2tib3gnLA0KKyAgICAgJ2Rlc2MnID0+IF8oIlNhdmUgRHJhZnRzIGFzIHNlZW4uIikN
CisgKTsNCisgLy8NCisgDQo=
---------------------- multipart/mixed attachment
KioqIGNvbXBvc2UucGhwLm5ldwlUaHUgSnVuIDI3IDA3OjQ2OjA3IDIwMDINCi0tLSBjb21wb3Nl
LnBocAlUaHUgSnVuIDI3IDE1OjA2OjU4IDIwMDINCioqKioqKioqKioqKioqKg0KKioqIDEwMjYs
MTAzNiAqKioqDQogICAgICAgICAgJGJvZHkgPSBwcmVnX3JlcGxhY2UoInwoW15ccl0pXG58Iiwg
IlxcMVxyXG4iLCAkYm9keSk7DQogICAgICAgICAgJGJvZHkgPSBzdHJfcmVwbGFjZSgiXG5cbiIs
ICJcblxyXG4iLCAkYm9keSk7DQogIA0KISAgICAgICAgIGlmICgkcHJlZnMtPmdldFZhbHVlKCdz
ZWVuX2RyYWZ0cycpKSB7DQohICAgICAgICAgICAgICAgICAgJGFwcGVuZF9mbGFncyA9ICdcXERy
YWZ0IFxcU2Vlbic7DQohICAgICAgICAgIH0gZWxzZSB7DQohICAgICAgICAgICAgICAgICAgJGFw
cGVuZF9mbGFncyA9ICdcXERyYWZ0JzsNCiEgICAgICAgICAgfQ0KICAgICAgICA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