read mail from shell

note:

read 1st mail, just type: echo “type 1” | mail -f /var/mail/someuser

read 1st 5 mails, just type: echo “type 1-5” | mail -f /var/mail/someuser

delete all mail, just type: echo “d *” | mail -f /var/mail/someuser

Leave a Reply

Your email address will not be published. Required fields are marked *