[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: auto delete email in mailbox



On 29-Mar-2004/10:01 -0500, Chris Purcell <redhat cjp us> wrote:
>> We are using the stock Sendmail and all mail is stored in the
>> /var/spool/mail directory under individual mailboxes as the name of the
>> login on the server.  Basically we made no change to it from the
>> original  installation of RHEL AS.
>
>Sendmail uses the mbox format, where each email in a users mailbox is
>stored in a single text file.  This makes it more difficult to implement
>what you want to do.  If you switched to Postfix and Maildir-style
>mailboxes, you could easily write a Perl or bash script that would execute
>daily via cron to do what you want.  If you want to make the switch, I'll
>see if I can write it....

If he switches to maildir format, he can use the tmpwatch utility that
ships with RH. No need to reinvent the wheel.

  tmpwatch --force --mtime age_in_number_of_hours dir

Tony
-- 
Anthony E. Greene <mailto:Anthony%20E %20Greene%20%3Cagreene pobox com%3E>
OpenPGP Key: 0x6C94239D/7B3D BD7D 7D91 1B44 BA26 C484 A42A 60DD 6C94 239D
AOL/Yahoo Messenger: TonyG05 HomePage: <http://www.pobox.com/~agreene/>
Linux. The choice of a GNU generation <http://www.linux.org/>




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]