|
Home > Archive > Unix Shell > January 2006 > Deleting Specific mail's according to a criteria
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Deleting Specific mail's according to a criteria
|
|
|
| Hello ,
I have a question . I have a mail server with postfix and wuimap
..becose my /var/spool/mail is getting bigger and bigger i am trying to
find a solution to free up some space.There are about 2000 files on
spool .Many of them contains only mails sent to allusers but those
users does not see their mail and the spool file never moves to their
home and stay there and just increasing . I want a solution .I thought
a shell script that deletes every mail in every file that is from
allusers@blabla.com ,which this is me and is safe to delete .Another
script was to delete every attachment on all mailboxes that sent by
someone .for example if u send to everyone a file called
public_announcement.pdf ,after a period of time i wan't to delete the
mail that contain this . I find it hard to write a script that delete
all attachments matching a criteria . Is there any automation about
that ? Something to propose ? Buying a larger disk is kind difficult
know 
Thanks
| |
| Ed Morton 2006-01-04, 8:49 pm |
| w00t wrote:
> Hello ,
>
> I have a question . I have a mail server with postfix and wuimap
> .becose my /var/spool/mail is getting bigger and bigger i am trying to
> find a solution to free up some space.There are about 2000 files on
> spool .Many of them contains only mails sent to allusers but those
> users does not see their mail and the spool file never moves to their
> home and stay there and just increasing . I want a solution .I thought
> a shell script that deletes every mail in every file that is from
> allusers@blabla.com ,which this is me and is safe to delete .Another
> script was to delete every attachment on all mailboxes that sent by
> someone .for example if u send to everyone a file called
> public_announcement.pdf ,after a period of time i wan't to delete the
> mail that contain this . I find it hard to write a script that delete
> all attachments matching a criteria . Is there any automation about
> that ? Something to propose ? Buying a larger disk is kind difficult
> know 
>
> Thanks
>
Take a look at procmail: http://www.procmail.org/
Ed.
|
|
|
|
|