on Thu, Feb 07, 2002 at 10:03:25PM -0000, D wrote:
We currently have sendmail configured to parse local mail through a perl script. This takes 3 arguments From, User, Host
user being the alias, host being the domain.
It then checks a couple of files for the domain, and works out what local user should have the mail.
If then goes to that users home directory and looks for a file called .redirect
This either redirects it to another local user or to a program for processing or another email address
This can be done with .qmail files (or .forward if you get the dot-forward addon.)
You can invoke "spooler" by letting all mail fall back onto the qmail "alias" user. It's home is usually something like /var/qmail/alias. In /var/qmail/alias, if you create a file called .qmail there with something like: | preline perl /path/to/myscript.pl
all mail should be piped into the script.
Why do you want to keep with this perl script? I think it's quite probably possible to replace it with mechanisms native to qmail, which would be much faster and more efficient.
The mail should also be delivered to /var/spool/mail, some users don't own their own home dir.
qmail natively too.