R P Herrold a écrit :
> On Fri, 8 Jan 2010, mouss wrote:
> 
>> you can query DNS to get the "version" of the rules. for example:
>>
>> $ host -t txt "*.2.3.updates.spamassassin.org"
>> *.2.3.updates.spamassassin.org descriptive text "895075"
>>
>> (2.3 is the "reverse" of 3.2, which corresponds to the SA version you
>> use).
> 
> Looks like 3.3 is not so behaving
> 
> [herr...@new .procmail]$  host -t txt  "*.2.3.updates.spamassassin.org"
> *.2.3.updates.spamassassin.org descriptive text "895075"
> [herr...@new .procmail]$  host -t txt  "*.3.3.updates.spamassassin.org"
> Host *.3.3.updates.spamassassin.org not found: 3(NXDOMAIN)
> [herr...@new .procmail]$ rpm -q spamassassin
> spamassassin-3.3.0-0.29.rc1
> [herr...@new .procmail]$
> 

As Kai said, use the "exact" version (no wildcard):

host -t txt 0.3.3.updates.spamassassin.org

you could do something like:

CHANNEL=updates.spamassassin.org
SA_VERSION=`spamassassin -V | grep -i spamassassin|head -1 |awk '{print
$3}'`
SA_VERSION_REV=`echo ${SA_VERSION} |awk -F. '{print $3 "." $2 "." $1}'`
REMOTE_VERSION=`host -t txt ${SA_VERSION_REV}.${CHANNEL} | grep "
descriptive text"|head -1|awk '{print $4}' | sed 's/\"//g'`

...

although the shell isn't the best language for such tasks ;-p

note that sa-update will do all this for you. so you only need such
games if you suspect something...


Reply via email to