Re: OT: Removal of old 14+ mail from mbox-based mail spool (not maildir)
From: Matt Juszczak (matt_at_atopia.net)
Date: 08/17/05
- Previous message: Gary W. Swearingen: "Re: cache-only named won't resolve "localhost""
- In reply to: Kevin Kinsey: "Re: OT: Removal of old 14+ mail from mbox-based mail spool (not maildir)"
- Next in thread: Giorgos Keramidas: "Re: OT: Removal of old 14+ mail from mbox-based mail spool (not maildir)"
- Reply: Giorgos Keramidas: "Re: OT: Removal of old 14+ mail from mbox-based mail spool (not maildir)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 17 Aug 2005 11:58:43 -0400 To: Kevin Kinsey <kdk@daleco.biz>
| Also, a script in sh(1), or do you have some other
> language available? I have a short PHP script
> that does something similar and could be modded,
> perhaps.
>
> OTOH, somebody around here could probably
> give you a one-liner with sh, sed, grep, awk, date,
> test, etc., but I was at the hospital last night until
> 2 a.m. and don't think I can pull it off ATM....
>
> Kevin Kinsey
>
I want to clean out an IMAP "folder" (actually file $HOME/mail/Spam).
We have about 10,000 users and our users don't check their spam
quarantine often, so our policy is to remove messages after 14 days.
I know how to:
1) recursively pull each Spam folder in existance (for x in `ls
/home/*/mail/Spam`; do ....; done)
2) Use grep and awk to pull each message and its relative data (grep the
date, parse it)
What I'm not sure of is how to remove a message from the spool itself.
Should I just use grep and/or sed to "pull until new From header", then
remove those lines from the spool manually?
This would be easier if I could use IMAP, because then I could use the
built-in PHP functions for imap to check dates and remove messages.
Problem is, we don't know the user's passwords (they are hashed).
Any other ideas? Thanks!
-Matt
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
- Previous message: Gary W. Swearingen: "Re: cache-only named won't resolve "localhost""
- In reply to: Kevin Kinsey: "Re: OT: Removal of old 14+ mail from mbox-based mail spool (not maildir)"
- Next in thread: Giorgos Keramidas: "Re: OT: Removal of old 14+ mail from mbox-based mail spool (not maildir)"
- Reply: Giorgos Keramidas: "Re: OT: Removal of old 14+ mail from mbox-based mail spool (not maildir)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|