Hi ya,
I'm considering improving my mail forwarding service (I take mail for
@custdomain.co.uk and forward it). Currently, mail for domains is
rewritten using fast forward. However, this is not as flexible as i
would like, so I was considering some different ways for forwarding
mail.
My best idea so far is to deliver all the mail for all the domains
and deliver it to ~forwarder/.qmail-default. Then, that
.qmail-default file would have two lines
| rules.pl
| forward $END_ADDRESS
- now, the idea is that rules.pl would work out (from a mysql table)
where the messages was going and set the environment variable
$END_ADDRESS and then exit with the appropriate exit code (100??)
Now, I can see the following problems - IMHO is it not desirable to
pipe the whole message the rule.pl, else AFAIK the perl program may
have a huge file in memory. Equally, I understand that the
$RECIPIENT environment variable will have been set with the envelope
recipient. Would it be possible to have something like this:
`echo $RECIPIENT | rules.pl`
|forward $END_ADDRESS
in the .qmail-file.
- secondly, will the $END_ADDRESS variable, if set by rules.pl be
present in the forward program?
any pointers much appreciated.
thanks
peter
--
peter at gradwell dot com; http://www.gradwell.com/
gradwell dot com Ltd. Enabling the internet you don't see.