You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by "RALLS,CASEY (HP-Boise,ex1)" <ca...@hp.com> on 2004/02/20 16:48:02 UTC

SpamAssassin on Qmail

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

 

However the /usr/bin/qmail-spamc is there. I did a "make
qmail/qmail-spamc.c" from the spamassassin directory and then "cp
qmail/qmail-spamc.c /usr/bin/qmail-spamc"

 

Does anyone see anything wrong with my process here? Maybe I need some more
detailed instructions on how to get spamassassin working with qmail?

 

-Axiom


Re: SpamAssassin on Qmail

Posted by Ole Nomann Thomsen <on...@uni-c.dk>.
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.


Re: SpamAssassin on Qmail

Posted by Ole Nomann Thomsen <on...@uni-c.dk>.
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
$