I am trying to write a basic script to do mail management for an account I have on a Solaris system. I want for the mail to delete the last 50 mails I received. This will delete 1000-950 as I get a large number of e-mails daily and my maximum e-mails are 1000. I'm not sure how to pass off a command to have it delete the mail.
Here's what I tried with no real results:
mail
set mdjc = 0
while [ $mdjc -lt 50 ]
do
echo d $mdjc
mdjc = $mdjc + 1
done
Does anyone have any insight into this or even a different method to manage a users inbox using a script?
Here's what I tried with no real results:
set mdjc = 0
while [ $mdjc -lt 50 ]
do
echo d $mdjc
mdjc = $mdjc + 1
done
Does anyone have any insight into this or even a different method to manage a users inbox using a script?