Mark Drummond <[EMAIL PROTECTED]> wrote:
>Please excuse my stundedness but here is my /var/qmail/rc:
>
>#!/bin/sh
>
># Using splogger to send the log through syslog.
># Using qmail-local to deliver messages to ~/Maildir/ by default.
>
>exec env - PATH="/var/qmail/bin:$PATH" \
>qmail-start | bouncesaying VIRUS awk '/^Subject: hello/{exit 0}/^$/{exit
>1}END{exit 0}' \
>./Maildir/ splogger qmail
>
>I know there is an error in here, but what.
The problem is that the entire "aliasemtpy": the part from "|
bouncesaying" through "./Maildir/" needs to be passed to qmail-start
as a single argument. This is tricky because there are multiple levels
of shell quoting required. Luckily, there are only two levels of
quoting required, and the shell supports two different types of string
quotes (' and "). This (untested) ought to work:
exec env - PATH="/var/qmail/bin:$PATH" \
qmail-start "| bouncesaying VIRUS awk '/^Subject: hello/{exit 0}/^$/{exit
1}END{exit 0}' \
./Maildir/" splogger qmail
If that doesn't work, I'd put the aliasemtpy commands in a file, say
/var/qmail/control/aliasemtpy, and use:
exec env - PATH="/var/qmail/bin:$PATH" \
qmail-start `cat /var/qmail/control/aliasempty` splogger qmail
Note: those are backquotes (`), not single quotes (').
>Should there really be a pipe in there?
Yes.
>If so, how does qmail-start see the ./Maildir/ ?
It's on a separate line. aliasemtpy follows dot-qmail rules, and can
contain multiple delivery instructions.
-Dave