Hi Dave,

What os are you on and what version of curl do you have installed?

[EMAIL PROTECTED]:~$ curl --version

curl 7.13.2 (i386-pc-linux-gnu) libcurl/7.13.2 OpenSSL/0.9.7e zlib/1.2.2 
libidn/0.5.13

Protocols: ftp gopher telnet dict ldap http file https ftps Features: IDN IPv6 Largefile NTLM SSL libz

Can you send me the output of RDJ launched interactively? I'm primarily interested in the debug output that shows the curl command and output, eg:

exec: curl -w %{http_code} --compressed -O -R -s -S -z 
/etc/spamassassin/RulesDuJour/99_FVGT_Tripwire.cf 
http://www.rulesemporium.com/rules/99_FVGT_Tripwire.cf 2>&1

curl_output: 304


Also, try taking the exec line and running it directly from a shell, eg:

[EMAIL PROTECTED]:~$ curl -w %{http_code} --compressed -O -R -s -S -z 
/etc/spamassassin/RulesDuJour/70_sare_evilnum2.cf 
http://www.rulesemporium.com/rules/70_sare_evilnum2.cf

(more below)


Dave Duffner - PSCGi wrote:

Greetings,

        Sent this to the MailScanner List, didn't realize
my subscription to the SA List had taken a hike for some reason!

        Anyone with a clue, I'm all ears!

Ok,

        Determined Curl Error 7, Socket Error 110 to
be a failure to connect to the 'Host' to retrieve
the stuff.  That's rulesemporium.com and I can not
only go there in a browser, but if I screw with
the RDJ code enough to force it to fallback to
wget (not without errors mind you) both will access
the site and attempt to pull the code.


Odd.

        Ports are opened, the proper IP's are allowed
full traffic in/out so that's not it.  It seems to
be a Curl call error and here's where I find the
mystery:

"${CURL_OPTS}" CURL_OPTS="-w %{http_code} --compressed
-O -R -s -S -z";  # Parameters of the curl program
        (note, this is a bit mangled to get it to pass)

        What is %{http_code}??  There's no other
reference to this in the script, no outside scripts

The parameter "-w %{http_code}" tells curl to print the http return code on stdout. The %{http_code} is passed literally to curl, it's not a variable reference.

'included' that
could pass this parameter so I can't see how Curl could be called properly with that in there. Took it out, still the same error,
but I'd swear there's something missing or improperly
coded in that line. Seems more like it should be ${CURL_HTTP_CODE} or something similar?

        When I run this the thing I note in the
flow/logs is that it states 'now connecting () to
www. rulesemporuim .com : 80 ' where it seems something like 'localhost' should be in that () and the improper coding is causing the system not to accept
the connection command and thus the socket error?

        Anyone with any clues?  I can't find a hint of
this beyond my posts out in the Net as to how to
get it fixed.  Curl docs state any % commands are
Windows (I'm Linux), so could that be part of the
problem?


I don't think so... the manpage simply indicates that on winders you must doublequote the percent signs (%%):

-w/--write-out <format>
<snip>
The variables present in the output format will be substituted by the value or text that curl thinks fit, as described below. All variables are speci- fied like %{variable_name} and to output a normal % you just write them like %%. You can output a newline by using \n, a carriage return with \r and a
             tab space with \t.

NOTE: The %-letter is a special letter in the win32-environment, where all occurrences of % must be doubled when using this option.



        Dave


-----Original Message-----
From: MailScanner mailing list
[mailto:[EMAIL PROTECTED]
On Behalf Of Dave
Duffner - PSCGi
Sent: Wednesday, July 06, 2005 11:07 AM
To: [EMAIL PROTECTED]
Subject: Strange Rules Du Jour error


Greetings,

        Running RDJ 1.21, the apparent latest version
I can find. It was falsing out with an SA lint error
that's been
corrected, but is still generating this set of errors
when run in
cron:

The following rules had errors:
TripWire had an unknown error:
curl exit code: 7
curl: (7) socket error: 110
000
EvilNumber had an unknown error:
curl exit code: 7
curl: (7) socket error: 110
000
SARE Random Ruleset for SpamAssassin 2.5x and higher had
an unknown
error: curl exit code: 7
curl: (7) socket error: 110
000

        There was an issue where apparently the script
had updated, and returned the SA_DIR variable to the
wrong default
location. Fixed that, running it from the command line
produces
the same error response above except for the fact it
now says '404
Error' at the end of the Subject line?

        Looks like this may be getting blocked by
either port or IP, but I can't find where we're
doing that in either of our firewall setups, nor
MailScanner/SA or
the like?

        Anyone know what a curl 7 error really is?

        Thanks!

    David J. Duffner

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to