Well, thanks for all the help. i decided not to take the easy way out (qmail), but to go with the more standard and powerful Sendmail.
Since you guys helped me out, if you're interested, here's how i'm using sendmail to accept and process emails from different domains with a single perl script, and minimal entries in the config files:
I've gotten it all to work. For each new sub/domain i add, i just append it to the /etc/sendmail.cw file. Then i append:
@mydomain.com email-script-user
to /etc/mail/virtusertable
to route every email address from mydomain.com to the email alias 'email-script-user'.
the alias 'email-script-user' routes all emails to a perl script on my server, which decides what to do with the email. The problem was that by looking at the headers of the email sent to my script through STDIN, i couldn't tell who the email was from. Like, if it was someone in the CC or BCC, i wouldn't know. Sendmail doesnt post ENV vars like qmail does (wish it did)...so, i went into /etc/sendmail.cf, and added my own header,
HX-Intended-Recipient: $u
this gives me a header in all received (and consequently) sent email like this:
X-Intended-Recipient: <user@emailaddress.com>
this user might not even be in the headers, as s/he might be a BCC recipient. The X- is kinda required, because other programs will ignore it if they dont know what it is. So, now that i have that special header, all's good, my perl script can handle it all very easily.
And, i'm sure qmail has a good queue manager too, but, if i have to edit the perl script, i just put up a dummy script in it's place that has this:
exit(75);
which is the system message : 'temporary failure', which tells sendmail to put the email in the queue, and try for local delivery later.
So, i ended up reading a good chunk of the O'Reilly book, and learned a whole lot. Now that i know more, I'd have to recommend Sendmail, if the time to learn it was there...it seems to be pretty powerful.
but, took me 3 days to do something i learned in qmail in 1 hour...weigh the consequences.
well, if you all weren't interested, sorry - else, thanks much for the help!
-blake