Tuesday, December 20, 2011

checking and reading mails with exim4

Using exim4


Become root first...
#checking unsent mail
mailq
You'll get something like this:
 8m  1.7K 1RcxQS-00010Y-7S <> *** frozen ***
          root@localhost

 3m  1.7K 1RcxVI-00011M-UE <> *** frozen ***
          root@localhost

The 3rd field, is the message ID.
Read mails
#read a mail with by an ID
exim -Mvb 1RcxLc-0000zi-E2
#               

And you'll get the message's body... Delete mails from queue
#delete mail by message ID
exim -Mrm 1RcxLc-0000zi-E2
#               

Sociable