I need a Perl-script for unattended processing of incoming email message. The script will grab/get incoming email message from the request and then process the incoming-message header. The script will reply to the message if and only if incoming-message contains matched strings in the subject line. The string may be a regular expression, properly quoted and escaped.
In other words, when someone sends an email to firstname.lastname@example.org on my website, the script (located in cgi-bin) grabs the incoming email message. The task of the script will be to process the incoming-message header. If subject line contains the words "ultimate brochure" (case insensitive), the script replies to the incoming message with a default-message.
It will be highly appreciated if somebody can provide me with a script that can accomplish the task postulated above. Many thanks in advance. hans.adamsson(at)wippies.fi