Re: RulesDuJour and Curl Connect Problem

2006-02-11 Thread Shane Kelly

Yousef Raffah wrote:

On Wed, 2006-02-08 at 15:41 +, Shane Kelly wrote:

Hi Yousef,



I have to connect through a proxy server to get to the internet but I'm
not sure how to set the proxy for curl. I tried to change the line
in /var/lib/spamassassin/rules_du_jour
To this:
 [ "${CURL_OPTS}" ] || CURL_OPTS="-w %{http_code} --compressed -O -R -s
-S -z -x proxy.nour.net.sa:8080";

as I understood from man curl that -x is the parameter to use for a
proxy server!

The only relevant thread I found so far is this:
http://thread.gmane.org/gmane.mail.spam.spamassassin.general/76192
but I have the outbound port 80 open and it is confirmed as when I
invoke the script manually (not through cron) it works perfectly (at
least that is what I see :) )
I suspect you need to set your proxy settings in the crontab, as most 
recent crons run with a clean environment for security. (I got bitten by 
the same thing :-) )



Hummm, that's pretty interesting, will test and let you know, because I
though I had it already. Just out of curiousity, should I specify the
proxy (export the variables in crontab) or the environment variable
should just be "there"? Currently I have the variable set for the root
user in the bash profile


I have these as lines above the cron entries in the system crontab (i.e. 
/etc/crontab) on a Suse 9.3 system, but below the shell, path and mailto 
 vars. Both wget and curl pick them up from there.


HTTP_PROXY='http://wwwcache.xxx.xx.uk:8080'
http_proxy='http://wwwcache.xxx.xx.uk:8080'

Regards,
Shane.


Re: RulesDuJour and Curl Connect Problem

2006-02-08 Thread Shane Kelly

Hi Yousef,




I have to connect through a proxy server to get to the internet but I'm
not sure how to set the proxy for curl. I tried to change the line
in /var/lib/spamassassin/rules_du_jour
To this:
 [ "${CURL_OPTS}" ] || CURL_OPTS="-w %{http_code} --compressed -O -R -s
-S -z -x proxy.nour.net.sa:8080";

as I understood from man curl that -x is the parameter to use for a
proxy server!

The only relevant thread I found so far is this:
http://thread.gmane.org/gmane.mail.spam.spamassassin.general/76192
but I have the outbound port 80 open and it is confirmed as when I
invoke the script manually (not through cron) it works perfectly (at
least that is what I see :) )


I suspect you need to set your proxy settings in the crontab, as most 
recent crons run with a clean environment for security. (I got bitten by 
the same thing :-) )


Hope this helps.

Shane.