Funny, when I saw the title I was thinking of the web browser, lol.
This seems like a good task for the email server to do.
In my case I use the Apache James email server, I write mailets to automate similar types of tasks, filter spam, etc...
However, if you are using a remote mailserver that you can't mod settings or run software on, you might want to take a look at mutt.
Mutt is available for every linux distro, and you can use it in your shell scripts. So, in your case, use mutt to get the mail, grep to check for existence of fields, sed/awk/perl to create your new mail from the original, and of course, and sendmail to send it.
Toward the bottom of this page there are some links to various scripts using it
http://www.mutt.org/links.html
THis will return lots of info as well
http://www.google.com/search?q=mutt+shell+script
Last edited by willcode4beer : 04-11-2007 at 09:22 AM.
Reason: info
|