You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Yousef Raffah <yr...@savola.com> on 2006/02/08 10:34:09 UTC
RulesDuJour and Curl Connect Problem
Hello Everyone,
I'm quite new to SA and RulesDuJour however, I'm assuming I have it all
set up properly except for the Rules update.
I have set RulesDuJour to update through cron but I keep on getting
these error messages:
The following rules had errors:
TripWire had an unknown error:
curl exit code: 7
curl: Remote file name has no length!
curl: try 'curl --help' or 'curl --manual' for more information
curl: (3) <url> malformed
curl: (7) couldn't connect to host
000000
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 :) )
Versions:
curl --version
curl 7.15.1 (i386-pc-linux-gnu) libcurl/7.15.1 OpenSSL/0.9.7e zlib/1.2.3
Protocols: tftp ftp gopher telnet dict http file https ftps
Features: Largefile NTLM SSL libz
spamc -V
SpamAssassin Client version 3.1.0
compiled with SSL support (OpenSSL 0.9.7e 25 Oct 2004)
OS:
Linux kansai 2.6.14-gentoo-r5 #2 SMP PREEMPT Sun Dec 18 08:49:10 ?? 2005
i686 Intel(R) Pentium(R) 4 CPU 3.00GHz GenuineIntel GNU/Linux
Your kind feedback will be very much appreciated. Thanks :)
Sincerely,
Yousef Raffah
Senior Systems Administrator
SSIS - The Savola Group
--
Aren't you using Firefox? Get it at getfirefox.com
Re: RulesDuJour and Curl Connect Problem
Posted by Yousef Raffah <yr...@savola.com>.
On Sat, 2006-02-11 at 15:01 +0300, Yousef Raffah wrote:
> On Sat, 2006-02-11 at 11:42 +0000, Shane Kelly wrote:
> > Yousef Raffah wrote:
> > > On Wed, 2006-02-08 at 15:41 +0000, 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'
> >
> Cool, I just configured it. Will let you know if it worked tonight ;).
> Many thanks.
>
Unfortunately it didn't work out :/ Could it be the double quotes? I
always have problems whether it is a single or double quote!
Sincerely,
Yousef Raffah
Senior Systems Administrator
SSIS - The Savola Group
--
Aren't you using Firefox? Get it at getfirefox.com
yousef.raffah.com
Re: RulesDuJour and Curl Connect Problem
Posted by Yousef Raffah <yr...@savola.com>.
On Sat, 2006-02-11 at 11:42 +0000, Shane Kelly wrote:
> Yousef Raffah wrote:
> > On Wed, 2006-02-08 at 15:41 +0000, 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'
>
Cool, I just configured it. Will let you know if it worked tonight ;).
Many thanks.
Sincerely,
Yousef Raffah
Senior Systems Administrator
SSIS - The Savola Group
--
Aren't you using Firefox? Get it at getfirefox.com
yousef.raffah.com
Re: RulesDuJour and Curl Connect Problem
Posted by Shane Kelly <s....@physics.gla.ac.uk>.
Yousef Raffah wrote:
> On Wed, 2006-02-08 at 15:41 +0000, 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
Posted by Yousef Raffah <yr...@savola.com>.
On Wed, 2006-02-08 at 15:41 +0000, 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!
Sincerely,
Yousef Raffah
Senior Systems Administrator
SSIS - The Savola Group
--
Aren't you using Firefox? Get it at getfirefox.com
Re: RulesDuJour and Curl Connect Problem
Posted by Shane Kelly <S....@physics.gla.ac.uk>.
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.