Bounced mail is generated by remote systems our automated ticketing system (RT by Best Practical) tried to send mail to. Typically, the bounces are due to a userid not existing on the remote system. We want to capture these bounces when possible in the ticket.
I need a small perl/python/ruby script that will receive bounced mail (either as a filter in /etc/aliases or via procmail or by fetching the bounced mail from a system mail spool), searches for a particular substring in the body of that mail, and when it finds it, forwards that mail to RT with a suitably modified subject line. Bounced mail that does not contain the substring should not be forwarded, but should be archived in system standard incoming mail mailbox format. The script should log its actions (both forwarding and non-forwarding) via syslog. I anticipate the script will be running on the mail server that is receiving the bounces
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done including unit and functional tests.
2) Documentation (in FreeBSD man(1) format) describing program assumptions, invocation, options, environment variables, exit codes and error messages, and any known issues.
2) Deliverables must be in ready-to-run condition and be self-contained (the script can make use of external packages as long as those packages are available as Open Source on CPAN or similar)
3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).
Developer's choice of one of
1) Perl 5.8.8
2) Python 2.4.3
3) Ruby 1.8.4