You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Ebbe Hjorth <in...@ebbehjorth.dk> on 2008/07/31 09:49:07 UTC

sa-update through cron error

Hi,

I have a cronjob running once every night

/usr/local/bin/sa-update && /usr/local/etc/rc.d/sa-spamd restart

when i run it from a shell, everything is allright, but when i run i
through cron (root), then i get an email saying

error: gpg required but not found!

What i dont understand is why it works if i run it manually?


Thank you very much in advance,


Ebbe, Denmark

System:
freebsd
postfix
spamassassin


Re: sa-update through cron error

Posted by Peter Christozov <sp...@inforent.net>.
Ebbe Hjorth wrote:
> Hi,
> 
> I have a cronjob running once every night
> 
> /usr/local/bin/sa-update && /usr/local/etc/rc.d/sa-spamd restart
> 
> when i run it from a shell, everything is allright, but when i run i
> through cron (root), then i get an email saying
> 
> error: gpg required but not found!
> 
> What i dont understand is why it works if i run it manually?
> 
> 
When runnig as cron, sa-update is unable to find the gpg programm.
You need to find out where is you gpg is (which gpg) and put it in the PATH
I suggest to create a small shell script, which runs per cron.
Something like that:

#!/bin/bash

#supposing "which gpg" delivers /usr/bin/gpg
export PATH=$PATH:/usr/bin
/usr/local/bin/sa-update
/usr/local/etc/rc.d/sa-spamd restart


I hope this helps

Regards
	Peter