I wrote a program to fetch email from a IMAP account, look to see if I sent
it, if yes execute any commands in the email and email the results back to
via a SMTP server.

1) This being my first perl program I'd like to know if I'm using the proper
perl idioms and language features. Is there anything I could do to improve
my code?
2) Secondly since this program executes commands from a potentially insecure
source I'd like to know if you find any security issues with my code. I used
Mail::IMAPClient::get_header($_,"From") to verify that I'm sending myself
commands-- is this safe?
3) I'd like to make Term::ANSIColor optional - how could I do that?

code with highlighting here:
http://code.google.com/p/commandcontrol/source/browse/get-imap.pl
raw file here: http://commandcontrol.googlecode.com/hg/get-imap.pl

Reply via email to