How to dump emails to files?
Hello! I'm trying to come up with a script to extract data from emails. I have many servers in different cities emailing stats to a server at home office. Now I need a script to sort each mail by cities and dump data to separate files. My initial approach is to run a script to process /var/mail/mystat. "mystat" being the unique account setup just for this purpose. Using bunch of shell commands in a script, I am trying to generate separate files. What I am wondering is...Is there a more elegant way to do this? Or is this the pretty much the only approach one can take? Thanks for yoru time!