On Sat, 9 Oct 1999 08:41:32 +0100  Peter Gradwell wrote:

> 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??)

The environment variable won't be set once rules.pl has exited.  An
exit code of 100 will bounce the mail.  I expect you need to forward
the mail within rules.pl to do what you want.

> 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.

Only if the perl script reads the message -- if it doesn't read it,
then it won't have to allocate the memory.

Regards,

Giles

Reply via email to