From owner-freebsd-isp@FreeBSD.ORG Fri Dec 19 11:00:57 2003 Return-Path: Delivered-To: freebsd-isp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 074A816A4CE for ; Fri, 19 Dec 2003 11:00:57 -0800 (PST) Received: from mail.mi.celestial.com (dagney.celestial.com [192.136.111.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id BA8E843D54 for ; Fri, 19 Dec 2003 11:00:55 -0800 (PST) (envelope-from bill@celestial.com) Received: by mail.mi.celestial.com (Postfix, from userid 203) id 1C5A011E8AA; Fri, 19 Dec 2003 11:00:55 -0800 (PST) Date: Fri, 19 Dec 2003 11:00:55 -0800 From: Bill Campbell To: freebsd-isp@freebsd.org Message-ID: <20031219190055.GD85955@alexis.mi.celestial.com> Mail-Followup-To: freebsd-isp@freebsd.org, Odhiambo Washington References: <20031219165302.GA51410@ns2.wananchi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031219165302.GA51410@ns2.wananchi.com> User-Agent: Mutt/1.4.1i Subject: Re: Managing Maildirs X-BeenThere: freebsd-isp@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: freebsd@celestial.com List-Id: Internet Services Providers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Dec 2003 19:00:57 -0000 On Fri, Dec 19, 2003, Odhiambo Washington wrote: >Hiya all, > >Okay. I have users who are not "very familiar with these thing, you >know" as they always tell me ;) >Noone cleans their Trash folder when they access their mail via the imap >server. I would like to do it for them, but I am not sure I get it >right. I have read the man page of find, but just to be sure, can I do > >1. find /home/*/Maildir/.Trash/ -type f | xargs rm ?? >2. find /var/spool/virtual/*/*/Maildir/.Trash/ -type f -exec rm {} \; > >The * in (1) is like /home/wash/Maildir/.Trash/ and the * in (2) >is like /var/spool/virtual/domain.tld/user1/Maildir/ > >How are others dealing with this situation? Any good tools? Number one above will do the trick and is far more efficient than using the ``find ...-exec'', although you might want to modify it to only nuke mail over a certain age. To nuke all trash over 30 days old: find /home/*/Maildir/.Trash -type f -mtime +30 | xargs rm Bill -- INTERNET: bill@Celestial.COM Bill Campbell; Celestial Software LLC UUCP: camco!bill PO Box 820; 6641 E. Mercer Way FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 URL: http://www.celestial.com/ Breathe fire, slay dragons, and take chances. Failure is temporary, regret is eternal.