Re: delete mbox mail from command line
Juha Siltala wrote: Tom Furie wrote: Bob Proulx wrote: You can look at just read messages leaving unread messages untouched by finding only in the new directory. find ~/Mail/Maildir/new -type f -mtime +7 -print Don't you mean the cur directory? Ah, yes, the cur directory. You are correct. My bad. Note that you're using mbox probably, so that won't work. That is why I suggested that if one were using maildir format then the above would be possible. Bob pgpLZlNubAru1.pgp Description: PGP signature
Re: delete mbox mail from command line
Mark Gillingham wrote: I appreciate the example of using find with time parameters. It's true that my current setup is not Maildir. The documentation is not complete for barrendero, I have not tried barrendero and know nothing more about it then what I read from the documentation. but after attempting to use the stable version, I think it requires Maildir too. Please tell me that I'm wrong. I have no idea. Can I set Postfix to use Maildir for local mail and also transport external mail properly--I have a transport map that works, but I'm not expert at setting it. Yes postfix can do that. But the best thing is to use procmail for that purpose. Then you can use procmail for many additional things. Postfix delivers to the local mail deliver agent (procmail) which puts it into whatever folder type you like. mkdir -p ~/Mail/Maildir/{cur,new,tmp} Then put this in ~/.procmailrc file: MAILDIR=$HOME/Mail :0 $MAILDIR/Maildir/ Then put this in ~/.forward file: |IFS=' ';exec /usr/bin/procmail || exit 75 #yourloginnamehere All mail will be delivered to procmail will be filed into the maildir. You can use mutt or other mailers to read from there. That last depends upon what you have set for your postfix mailbox_command command. Many people set it to procmail which turns off the forward file capability but turns on sending to procmail without it. postconf mailbox_command In your ~/.muttrc file: set spoolfile=~/Mail/Maildir Bob pgp06VsAf9SAs.pgp Description: PGP signature
Re: delete mbox mail from command line
Mark Gillingham wrote: In Mutt, I just learned;), that one might delete messages more than 1 week old like this: D ~ 1w followed by q (quit) and y (yes, I want to purge the messages). How might I do this from the command line in Mutt or another application? I don't know how to do that from mutt and the command line. Although I would be surprised if there was not a way. If you use maildir style mailboxes then each message is saved in its own file. That means you can use normal commands to manipulate those files. Given a maildir format mailbox in ~/Mail/Maildir the following commands work on them. This looks at files older than 7 days of modification time ago. find ~/Mail/Maildir -type f -mtime +7 -print0 | xargs -r0 ls -ld Then to delete them the following. WARNING: This deletes files! Remove the echo to activate but only after you are sure. find ~/Mail/Maildir -type f -mtime +7 -print0 | xargs -r0 echo rm -f You can look at just read messages leaving unread messages untouched by finding only in the new directory. find ~/Mail/Maildir/new -type f -mtime +7 -print Bob pgpeg5Y4TFTkx.pgp Description: PGP signature
Re: delete mbox mail from command line
On Sat, Jul 03, 2004 at 06:42:31AM -0600, Bob Proulx wrote: You can look at just read messages leaving unread messages untouched by finding only in the new directory. find ~/Mail/Maildir/new -type f -mtime +7 -print Don't you mean the cur directory? Cheers, Tom -- They ought to make butt-flavored cat food. --Gallagher -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: delete mbox mail from command line
On 2004-07-03, Tom Furie [EMAIL PROTECTED] wrote: On Sat, Jul 03, 2004 at 06:42:31AM -0600, Bob Proulx wrote: You can look at just read messages leaving unread messages untouched by finding only in the new directory. find ~/Mail/Maildir/new -type f -mtime +7 -print Don't you mean the cur directory? Note that you're using mbox probably, so that won't work. -- Juha Siltala http://www.edu.helsinki.fi/activity/people/jsiltala/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
delete mbox mail from command line
A kind list member pointed out that I had previously begun this thread in another thread. I know that I should not have done that. Please excuse me. Following is my original message and a follow-up. Mark Gillingham wrote: In Mutt, I just learned;), that one might delete messages more than 1 week old like this: D ~ 1w followed by q (quit) and y (yes, I want to purge the messages). How might I do this from the command line in Mutt or another application? Mark Another quesiton. Would Barrendero help? Judging from the package description, Barrendero would let me delete older messages while keeping fresh ones to feed to sa-learn. The description follows: Package: barrendero (1.0-1.2) delete messages on the spool dir depending on their age Barrendero is intended to limit the disk space wasted in the spool directory. It deletes mail messages depending on their age, and has the ability to send warnings and reports to the users, to make full and partial backups, and to have different allowed ages on a per-user basis. Warning and report messages are customizable and can be translated easily in order to make this package useful in any environment. This way of handling mail has an advantage over the traditional 'quota' system: quotas make the end user lose new mail, whereas barrendero deletes old mail, so that new mail is always available. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]