I need delete old mailbox

HI guys,

I used my server linux how server to send and receive mails, but my mailbox now are so big and I need delete old mails, I found a program in the web called "expired_mail", but i found some problem with this porgram because delete some files mailbox "big problem"

Somebody know another form to delete ald mail from my mailbox?

Help...please...My disk space is to small.

Bests Regard

>"$MAIL"

You'll loose all your mail ...

No my friend, we have meny mailbox and we have user with the mail so big, for that I need delete old mails from all mailbox.

hi there! you could use find command to find those old mails then remove them..

HI there, can you help me with the command, We used a program called expire_mail, I found this program in the web, but is not very good because the output file is with ^M @ and other simbols and We need used differents command to delete this simbols, for that I need look another form to delete this. This is the line I used:

expire_mail -v -z -a 45 /var/spool/mail/* |egrep expired |sed 's/Msg #//g'| sed 's/newer//g'| \
  sed 's/[0-9]:// g'|sed -e 's/^[ \t]*//' | sed 's/^M//g' |awk '{print $1,$5,$6,$7}'

-v to seed detail information
-z to not delete the mailbos file
-a the days to delete

echo 'd*' | mail -N 

Note: All mails will be removed.