From: Per Jessen [mailto:per@computer.org]
I'm trying to find some kind of a simple utility/script that will allow me to list the messages in an arbitrary POP3 mailbox to STDOUT.
Anyone have thoughts on the easiest way to do this?
I wonder if perhaps fetchmail would let you do something like that?
That was my first thought, but there isn't anything in the man page that would suggest that it'll work... Although, I guess I could run it with something like `--mda "grep Subject:"` in the command line...that might work. Basically, I'm trying to figure out a way to do a mail loop-test. I'm hoping to end up with a script that'll send mail to a specified address, sleep for a specified amount of time (10 seconds?), and then check for it in the recipient mailbox...if I can just put a unique token into the subject line and then do a grep -c to check for its presence, that'll do the trick, I think...(then I can drop it into Nagios as a plugin, and so on...) Hrm...I'll keep playing with the fetchmail idea...that's interesting...