I've never used it, but it looks like you can
pipe mail to a command using .forward files in postfix. So a very easily manageable solution might be like this:
/home/support/.forward:
-----------------------
|/home/support/myscript.pl
/home/support/myscript.pl:
--------------------------
#!/usr/bin/perl
while (<STDIN>) {
# parse email headers & body
}
# add appropriate entries to DB
# possibly send a reply giving the ticket number
I think the pipe-to features of postfix looks really promising. Of course, this is not much of a Perl solution, as I've given you a lot of blanks to fill in ;) .. I assume you have had experience with DBI in Perl. If not, there are a lot of good resources around, just search the monastery and you'll come up with a lot. Anyway, this feature of postfix seems like a good way to get the mail to the Perl. Now you just get the data from the Perl to the DB ;)
<tangent> Hey other monks.. A thought just occured to me.. would it be useful to have a mod_perl-ish set of hooks in postfix (or your favorite MTA), so that you can add PerlHandlers here and there for various things -- accepting email, filtering incoming and outgoing, accepting or rejecting relays... Maybe there is something already like this. Just a random thought. </tangent>
Good luck, it sounds like a fun project
blokhead