Ace Suares wrote:
>
> Hi,
>
> I am using a small perl-script, which is far from perfect, that does
> the trick. Some users on this list raised concerns about the script,
> but I still haven't found someone to make this script failsafe. Use
> at your own risk.
> I use this script, since i really don't want that extra ~qmail user.
>
> qmail-domainforward.pl:
> $uservariable="$ENV{LOCAL}\@$ARGV[0]";
> exec "/var/qmail/bin/qmail-inject",$uservariable || print "Problem with Domain F
>orwarding (Could not execute qmail-inject)" && exit 111;
>
> in ldap database: (for entry catchall@domain1)
> deliveryprogrampath: preline /usr/sbin/qmail-domainforward.pl domain2
>
> this makes anyuser@domain1 go to anyuser@domain2
>
It is not a good idea to use Perl scripts on high volume mail servers
(delivering mail through them). You could potentially be firing up the
perl interpreter 10,000 times a day. Think about the load this puts on
your machine. Use a simple shell script instead, the muscle of perl is
not required for this task.
Mike