Quote:
Originally Posted by dWight
Hello
How do you delete mail in putty?
|
/var/spool/mail/root is the place from were you can remove the mails suppose if you want to remove mails of root go here
/var/spool/mail/root and delete the mails OR if you want to to remove the mails of a user then go
/var/spool/mail/username thats it and remove the mails.
If you want to remove the mails from the exim then follow the following commands
The out put of the above command will be with some message ID like:
The after that fire the below comand:
To remove all messages from the queue, enter:
Quote:
|
# exim -bp | awk '/^ *[0-9]+[mhd]/{print "exim -Mrm " $3}' | bash
|
How to delete frozen emails
Below mentioned is the commands for deleting frozen mails.
Quote:
|
exiqgrep -z -i | xargs exim -Mrm
|
Alternate command to delete frozen mails
Quote:
|
exim -bp | awk ‘$6 == “frozen” {print $3}’ | xargs exim -Mrm
|
To check number of frozen mails
Quote:
|
exim -bp | grep frozen | wc -l
|
All this command will delete the mails and is used from the shell (i.e using putty)
