Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Removing Old E-mail from /var/mail

Status
Not open for further replies.

dmaranan

Programmer
Aug 14, 2001
46
US
Does anyone know of a way to remove dated e-mail from /var/mail? For example, let's say I want to remove any e-mail older than two months, but keep any newer e-mail. How would I do this?
 
Good question!
I sometimes use:
# mailx
? delete [msglist]

where msglist can be:
. name of a user (ex. delete user1)
. msg number1[-number2] (ex. delete 12, or delete 12-15)
. /string (in subject) = (ex. delete /blabla)
. :type (d(eleted), n(ew), o(ld), r(ead), u(nread)) = (ex. delete :eek:)

1) Check before with
? header [msglist]
2) notice msg number range(s) that you want to delete
3) use delete <number-range>
Regards,
Jacques
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top