You are not logged in.
Pages: 1
Hi,
how can i purge mail from a specified folder via cron (which is the command, i know how to cronning the event ) ?
Thanks
Offline
I don't know, 'rm $PATH/*' ?
I use IMAP and I have a single user system, so I don't know much about how mail works.
Offline
Is this a Maildir folder?
Offline
it's a mail folder but i don't want to delete ALL messages, i want only to delete the messages marked as deletables...
Offline
it's a mail folder but i don't want to delete ALL messages, i want only to delete the messages marked as deletables...
Define EXACTLY what you mean by "marked as deletables"?
Are you using an MUA like mutt/pine to "mark" them? Please explain.
Offline
yeah i'm using mutt.
For "marked as deletables" i mean the action of the hotkey 'd' in mutt.
And for purge i mean the action that mutt does when i close it
Thanks
Offline
deleting in mutt would mv the message to your defined trash folder, usually ~/Mail/Trash. deleting from your trash folder within mutt would delete them forever, and is identical to rm ~/Mail/Trash/{new,cur,tmp}/* from CLI. so if that's what you mean, that's how to cron it. but it all depends on how your Maildir is set up and what hotkey you've defined... explore your Maildir, see where the messages go then put the rm command in cron. right?
Last edited by brisbin33 (2009-03-11 15:45:14)
//github/
Offline
Offline
As brisbin33 stated, deleting it in mutt should delete the email file on your filesystem. When you first hit 'd' Mutt marks it as deleted with a capital D in the index view. To delete them while in mutt, hit the '$' key to sync up the mailbox, and all the msgs marked with a 'D' will go away - no need to cron or rm anything.
Offline
I exlpain the situation:
I've got a IMAP server on my pc and i'm using mutt, thunderbird, squirrelmail and my nokia 6600 as clients.
I haven't a flat on my nokia6600, so when i download the email i would use less data as possible. So it's useless that my cellphone downloads mails flagged as deletable.
This is why I would like to do a little script that delete fisically the emails every minutes.
Offline
this sounds like a config option on your IMAP server. you could cron an rm command on your Maildir's trash folder, or you could set it up so when you delete a message it's not retained in a trash folder at all. either way, it's not really a client side activity in my opinion.
i think we're getting wrapped around the axle here on "flagged as deletable". b/c in mutt you can "flag a message for deletion" in which case only when you sync your mailbox (press $, change folder, or exit) is that message a) moved to your defined trash folder in your clients configuration or b) deleted entirely. it sounds like you want it gone forever no matter what, so just don't use a trash folder on your IMAP server and *actually* delete the messages when you delete the messages. does that make sense?
//github/
Offline
yes, i've undestood. I've already solve the problem autopurging the inbox when i close thunderbird (mutt already does this).
Thanks
Offline
Pages: 1