Ole Nomann Thomsen wrote:

> RALLS,CASEY (HP-Boise,ex1) wrote:
> 
>> Hi All,
>> 
>>  
>> 
>> I've added the following to my /etc/profile
>> 
>>  
>> 
>> export QMAILQUEUE='/usr/bin/qmail-spamc'
>> 
>>  
>> 
>> Now I am supposed to "add a similar line to the run script for the smtpd
>> service".
>> 
>>  
>> 
>> I believe this script is /var/qmail/rc which looks like the following.
>> 
>>  
>> 
>> #!/bin/sh
>> 
>>  
>> 
>> # Using splogger to send the log through syslog.
>> 
>> # Using qmail-local to deliver messages to ~/Mailbox by default.
>> 
>>  
>> 
>> exec env - PATH="/var/qmail/bin:$PATH" \
>> 
>> export QMAILQUEUE='/usr/bin/qmail-spamc'
>> 
>> qmail-start ./Maildir/ splogger qmail
>> 
>>  
>> 
>>  
>> 
>> Now when I run my startup script by doing /var/qmail/rc I get the
>> following:
>> 
>>  
>> 
>> env: export: No such file or directory
>> 
> 
> I thinks its a shell-syntax err, is it really in the distribution?
> 
> The "export" keyword is causing this error, as in:
> 
> $ env X="y" export Y="x" env
> env: export: No such file or directory
> 
> Remove the export to correct it. (The first) env will export for you:
> 
> $ env X="y" Y="x" env | sort | tail -2
> X=y
> Y=x
> $

Perhaps i should add that the "\" at the end of the line is escaping the
newline, thus making the whole statement into:

"exec env - PATH="/var/qmail/bin:$PATH" export QMAI .."

The combination of env and export seems wrong to me BTW, it should be
either:


exec env - PATH="/var/qmail/bin:$PATH" \
QMAILQUEUE='/usr/bin/qmail-spamc' \
qmail-start ./Maildir/ splogger qmail


or:


export PATH="/var/qmail/bin:$PATH" 
export QMAILQUEUE='/usr/bin/qmail-spamc' 
qmail-start ./Maildir/ splogger qmail


(Except the latter wont unset your original environment)

- Ole.

Reply via email to