You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Jack Gostl <go...@argoscomp.com> on 2006/11/23 19:13:42 UTC

saupdate

I'm trying to understand saupdate and how to use it. I have two questions. I'm running AIX 5.3.

Question 1:

 I run the following command:

/usr/opt/perl5/bin/sa-update --nogpg -D --updatedir /tmp/update

It finishes with a return code of 1. It sounds to me like something failed. I can't find any documentation on the return codes, so I'm not sure where to take this. Here is the debug output:

Use of uninitialized value in concatenation (.) or string at /usr/opt/perl5/lib/5.8.2/Scalar/Util.pm line 30.
[27694] dbg: logger: adding facilities: all
[27694] dbg: logger: logging level is DBG
[27694] dbg: generic: SpamAssassin version 3.1.7
[27694] dbg: config: score set 0 chosen.
[27694] dbg: message: ---- MIME PARSER START ----
[27694] dbg: message: main message type: text/plain
[27694] dbg: message: parsing normal part
[27694] dbg: message: added part, type: text/plain
[27694] dbg: message: ---- MIME PARSER END ----
[27694] dbg: dns: is Net::DNS::Resolver available? yes
[27694] dbg: dns: Net::DNS version: 0.59
[27694] dbg: generic: sa-update version svn454083
[27694] dbg: generic: using update directory: /tmp/update
[27694] dbg: diag: perl platform: 5.008002 aix
[27694] dbg: diag: module installed: Digest::SHA1, version 2.11
[27694] dbg: diag: module installed: Net::SMTP, version 2.29
[27694] dbg: diag: module installed: Mail::SPF::Query, version 1.999001
[27694] dbg: diag: module installed: IP::Country::Fast, version 604.001
[27694] dbg: diag: module not installed: Razor2::Client::Agent ('require' failed)
[27694] dbg: diag: module installed: Net::Ident, version 1.20
[27694] dbg: diag: module not installed: IO::Socket::INET6 ('require' failed)
[27694] dbg: diag: module not installed: IO::Socket::SSL ('require' failed)
[27694] dbg: diag: module installed: Time::HiRes, version 1.52
[27694] dbg: diag: module installed: DBI, version 1.53
[27694] dbg: diag: module installed: Getopt::Long, version 2.34
[27694] dbg: diag: module installed: LWP::UserAgent, version 2.003
[27694] dbg: diag: module installed: HTTP::Date, version 1.44
[27694] dbg: diag: module installed: Archive::Tar, version 1.30
[27694] dbg: diag: module installed: IO::Zlib, version 1.04
[27694] dbg: diag: module installed: DB_File, version 1.814
[27694] dbg: diag: module installed: HTML::Parser, version 3.35
[27694] dbg: diag: module installed: MIME::Base64, version 2.21
[27694] dbg: diag: module installed: Net::DNS, version 0.59
[27694] dbg: channel: attempting channel updates.spamassassin.org
[27694] dbg: channel: update directory /tmp/update/updates_spamassassin_org
[27694] dbg: channel: channel cf file /tmp/update/updates_spamassassin_org.cf
[27694] dbg: channel: channel pre file /tmp/update/updates_spamassassin_org.pre
[27694] dbg: channel: metadata version = 477972
[27694] dbg: dns: 7.1.3.updates.spamassassin.org => 477972, parsed as 477972
[27694] dbg: channel: current version is 477972, new version is 477972, skipping channel
[27694] dbg: diag: updates complete, exiting with code 1

Question 2:

After running saupdate, I assume that all I have to do is to restart spamd. How can I force spamd to restart and reload its rules? Can a do a simple kill -1? Or do I need an actual kill and restart?

Thanks

Jack

Re: saupdate

Posted by Jason Frisvold <xe...@gmail.com>.
On 11/23/06, Jack Gostl <go...@argoscomp.com> wrote:
>
>
> I'm trying to understand saupdate and how to use it. I have two questions.
> I'm running AIX 5.3.
>
> Question 2:
>
> After running saupdate, I assume that all I have to do is to restart spamd.
> How can I force spamd to restart and reload its rules? Can a do a simple
> kill -1? Or do I need an actual kill and restart?

I use this to check for updates and restart spamassassin :

#!/bin/sh
#
# Updates SA

# Update the link to the correct version
VERSION=`grep -m 1 -E 'VERSION = '
/usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin.pm | cut -f2 -d\"`
rm /var/lib/spamassassin/current
ln -s /var/lib/spamassassin/${VERSION} /var/lib/spamassassin/current

sa-update --gpgkey 26C900A46DD40CD5AD24F6D7DEE01987265FA05B --channel
updates.spamassassin.org && /etc/init.d/spamassassin restart
>/dev/null

> Thanks
>
> Jack
>

-- 
Jason 'XenoPhage' Frisvold
XenoPhage0@gmail.com

Re: saupdate

Posted by Jack Gostl <go...@argoscomp.com>.
----- Original Message ----- 
From: "Craig Morrison" <cr...@2cah.com>
To: "Jack Gostl" <go...@argoscomp.com>
Cc: "spamassassin" <us...@spamassassin.apache.org>
Sent: Thursday, November 23, 2006 3:01 PM
Subject: Re: saupdate


> Jack Gostl wrote:
>>
>> ----- Original Message ----- From: "Craig Morrison" <cr...@2cah.com>
>> To: "Jack Gostl" <go...@argoscomp.com>
>> Cc: "spamassassin" <us...@spamassassin.apache.org>
>> Sent: Thursday, November 23, 2006 2:40 PM
>> Subject: Re: saupdate
>>
>>
>>>
>>> Please keep replies on the list for the benefit of others.. Comments 
>>> inline..
>>>
>>> Jack Gostl wrote:
>>>>
>>>>>>  Question 2:
>>>>>>  After running saupdate, I assume that all I have to do is to restart 
>>>>>> spamd. How can I force spamd to restart and reload its rules? Can a 
>>>>>> do a simple kill -1? Or do I need an actual kill and restart?
>>>>>
>>>>> That is highly dependent upon how spamd is invoked.
>>>>>
>>>>> -- 
>>>>> Craig
>>>>>
>>>>
>>>> Thanks for the response.
>>>>
>>>> It was invoked through /etc/inittab with the command:
>>>>
>>>> spam:2:once:/usr/opt/perl5/bin/spamd -m20 -d -A 10.165.1.3,127.0.0.1 -i
>>>>
>>>> Which means no automatic respawning. So does spamd respond to a SIGHUP 
>>>> by restarting?
>>>>
>>>
>>> `man spamd':
>>>
>>> "DESCRIPTION
>>>        The purpose of this program is to provide a daemonized version of 
>>> the spamassassin executable.  The goal is improving throughput 
>>> performance for automated mail checking.
>>>
>>>        This is intended to be used alongside "spamc", a fast, 
>>> low-overhead C client program.
>>>
>>>        See the README file in the "spamd" directory of the SpamAssassin 
>>> distribution for more details.
>>>
>>>        Note: Although "spamd" will check per-user config files for every 
>>> message, any changes to the system wide config files will require either 
>>> restarting spamd or forcing it to reload itself via SIGHUP for the 
>>> changes to take effect.
>>>
>>>        Note: If "spamd" receives a SIGHUP, it internally reloads itself, 
>>> which means that it will change its pid and might not restart at all if 
>>> its environment changed  (ie. if it can’t change back into its own 
>>> directory).  If you plan to use SIGHUP, you should always start "spamd" 
>>> with the -r switch to know its current pid."
>>>
>>> I'm usually not a RTFM prude, however, SpamAssassin is VERY well 
>>> documented in its manual pages.
>>>
>>> -- 
>>> Craig
>>>
>>
>> I understand about RTFM, but there is so much new stuff introduced in 
>> this release, I'm trying to catch up. What is funny is that I read all 
>> the documentation, and this stuff just flew by me. Anyway, one final 
>> thing, and I'm pretty sure this one isn't in the manual.
>>
>> When I run sa-update, I get this message:
>>
>> Use of uninitialized value in concatenation (.) or string at 
>> /usr/opt/perl5/lib/5.8.2/Scalar/Util.pm line 30.
>>
>> Not sure what to do about that one. Or if it even matters.
>>
>> Jack
>>
>>
>>
>
> I can't comment on if it matters, but I am fairly certain from experience 
> the answer is most likely going to be upgrading Perl to at least 5.8.8..


Ugh! I'll give it a shot. Thanks for all your help. 



Re: saupdate

Posted by Craig Morrison <cr...@2cah.com>.
Jack Gostl wrote:
> 
> ----- Original Message ----- From: "Craig Morrison" <cr...@2cah.com>
> To: "Jack Gostl" <go...@argoscomp.com>
> Cc: "spamassassin" <us...@spamassassin.apache.org>
> Sent: Thursday, November 23, 2006 2:40 PM
> Subject: Re: saupdate
> 
> 
>>
>> Please keep replies on the list for the benefit of others.. Comments 
>> inline..
>>
>> Jack Gostl wrote:
>>>
>>>>>  Question 2:
>>>>>  After running saupdate, I assume that all I have to do is to 
>>>>> restart spamd. How can I force spamd to restart and reload its 
>>>>> rules? Can a do a simple kill -1? Or do I need an actual kill and 
>>>>> restart?
>>>>
>>>> That is highly dependent upon how spamd is invoked.
>>>>
>>>> -- 
>>>> Craig
>>>>
>>>
>>> Thanks for the response.
>>>
>>> It was invoked through /etc/inittab with the command:
>>>
>>> spam:2:once:/usr/opt/perl5/bin/spamd -m20 -d -A 10.165.1.3,127.0.0.1 -i
>>>
>>> Which means no automatic respawning. So does spamd respond to a 
>>> SIGHUP by restarting?
>>>
>>
>> `man spamd':
>>
>> "DESCRIPTION
>>        The purpose of this program is to provide a daemonized version 
>> of the spamassassin executable.  The goal is improving throughput 
>> performance for automated mail checking.
>>
>>        This is intended to be used alongside "spamc", a fast, 
>> low-overhead C client program.
>>
>>        See the README file in the "spamd" directory of the 
>> SpamAssassin distribution for more details.
>>
>>        Note: Although "spamd" will check per-user config files for 
>> every message, any changes to the system wide config files will 
>> require either restarting spamd or forcing it to reload itself via 
>> SIGHUP for the changes to take effect.
>>
>>        Note: If "spamd" receives a SIGHUP, it internally reloads 
>> itself, which means that it will change its pid and might not restart 
>> at all if its environment changed  (ie. if it can’t change back into 
>> its own directory).  If you plan to use SIGHUP, you should always 
>> start "spamd" with the -r switch to know its current pid."
>>
>> I'm usually not a RTFM prude, however, SpamAssassin is VERY well 
>> documented in its manual pages.
>>
>> -- 
>> Craig
>>
> 
> I understand about RTFM, but there is so much new stuff introduced in 
> this release, I'm trying to catch up. What is funny is that I read all 
> the documentation, and this stuff just flew by me. Anyway, one final 
> thing, and I'm pretty sure this one isn't in the manual.
> 
> When I run sa-update, I get this message:
> 
> Use of uninitialized value in concatenation (.) or string at 
> /usr/opt/perl5/lib/5.8.2/Scalar/Util.pm line 30.
> 
> Not sure what to do about that one. Or if it even matters.
> 
> Jack
> 
> 
> 

I can't comment on if it matters, but I am fairly certain from 
experience the answer is most likely going to be upgrading Perl to at 
least 5.8.8..

-- 
Craig

Re: saupdate

Posted by Jack Gostl <go...@argoscomp.com>.
----- Original Message ----- 
From: "Craig Morrison" <cr...@2cah.com>
To: "Jack Gostl" <go...@argoscomp.com>
Cc: "spamassassin" <us...@spamassassin.apache.org>
Sent: Thursday, November 23, 2006 2:40 PM
Subject: Re: saupdate


>
> Please keep replies on the list for the benefit of others.. Comments 
> inline..
>
> Jack Gostl wrote:
>>
>>>>  Question 2:
>>>>  After running saupdate, I assume that all I have to do is to restart 
>>>> spamd. How can I force spamd to restart and reload its rules? Can a do 
>>>> a simple kill -1? Or do I need an actual kill and restart?
>>>
>>> That is highly dependent upon how spamd is invoked.
>>>
>>> -- 
>>> Craig
>>>
>>
>> Thanks for the response.
>>
>> It was invoked through /etc/inittab with the command:
>>
>> spam:2:once:/usr/opt/perl5/bin/spamd -m20 -d -A 10.165.1.3,127.0.0.1 -i
>>
>> Which means no automatic respawning. So does spamd respond to a SIGHUP by 
>> restarting?
>>
>
> `man spamd':
>
> "DESCRIPTION
>        The purpose of this program is to provide a daemonized version of 
> the spamassassin executable.  The goal is improving throughput performance 
> for automated mail checking.
>
>        This is intended to be used alongside "spamc", a fast, low-overhead 
> C client program.
>
>        See the README file in the "spamd" directory of the SpamAssassin 
> distribution for more details.
>
>        Note: Although "spamd" will check per-user config files for every 
> message, any changes to the system wide config files will require either 
> restarting spamd or forcing it to reload itself via SIGHUP for the changes 
> to take effect.
>
>        Note: If "spamd" receives a SIGHUP, it internally reloads itself, 
> which means that it will change its pid and might not restart at all if 
> its environment changed  (ie. if it can’t change back into its own 
> directory).  If you plan to use SIGHUP, you should always start "spamd" 
> with the -r switch to know its current pid."
>
> I'm usually not a RTFM prude, however, SpamAssassin is VERY well 
> documented in its manual pages.
>
> -- 
> Craig
>

I understand about RTFM, but there is so much new stuff introduced in this 
release, I'm trying to catch up. What is funny is that I read all the 
documentation, and this stuff just flew by me. Anyway, one final thing, and 
I'm pretty sure this one isn't in the manual.

When I run sa-update, I get this message:

Use of uninitialized value in concatenation (.) or string at 
/usr/opt/perl5/lib/5.8.2/Scalar/Util.pm line 30.

Not sure what to do about that one. Or if it even matters.

Jack



Re: saupdate

Posted by Craig Morrison <cr...@2cah.com>.
Please keep replies on the list for the benefit of others.. Comments 
inline..

Jack Gostl wrote:
> 
>>>  Question 2:
>>>  After running saupdate, I assume that all I have to do is to restart 
>>> spamd. How can I force spamd to restart and reload its rules? Can a 
>>> do a simple kill -1? Or do I need an actual kill and restart?
>>
>> That is highly dependent upon how spamd is invoked.
>>
>> -- 
>> Craig
>>
> 
> Thanks for the response.
> 
> It was invoked through /etc/inittab with the command:
> 
> spam:2:once:/usr/opt/perl5/bin/spamd -m20 -d -A 10.165.1.3,127.0.0.1 -i
> 
> Which means no automatic respawning. So does spamd respond to a SIGHUP 
> by restarting?
> 

`man spamd':

"DESCRIPTION
        The purpose of this program is to provide a daemonized version 
of the spamassassin executable.  The goal is improving throughput 
performance for automated mail checking.

        This is intended to be used alongside "spamc", a fast, 
low-overhead C client program.

        See the README file in the "spamd" directory of the SpamAssassin 
distribution for more details.

        Note: Although "spamd" will check per-user config files for 
every message, any changes to the system wide config files will require 
either restarting spamd or forcing it to reload itself via SIGHUP for 
the changes to take effect.

        Note: If "spamd" receives a SIGHUP, it internally reloads 
itself, which means that it will change its pid and might not restart at 
all if its environment changed  (ie. if it can’t change back into its 
own directory).  If you plan to use SIGHUP, you should always start 
"spamd" with the -r switch to know its current pid."

I'm usually not a RTFM prude, however, SpamAssassin is VERY well 
documented in its manual pages.

-- 
Craig

Re: saupdate

Posted by Craig Morrison <cr...@2cah.com>.
Jack Gostl wrote:
> I'm trying to understand saupdate and how to use it. I have two 
> questions. I'm running AIX 5.3.
>  
> Question 1:
>  
>  I run the following command:
>  
> /usr/opt/perl5/bin/sa-update --nogpg -D --updatedir /tmp/update
>  
> It finishes with a return code of 1. It sounds to me like something 
> failed. I can't find any documentation on the return codes, so I'm not 
> sure where to take this. Here is the debug output:
>  
> Use of uninitialized value in concatenation (.) or string at 
> /usr/opt/perl5/lib/5.8.2/Scalar/Util.pm line 30.
> [27694] dbg: logger: adding facilities: all
> [27694] dbg: logger: logging level is DBG
> [27694] dbg: generic: SpamAssassin version 3.1.7
> [27694] dbg: config: score set 0 chosen.
> [27694] dbg: message: ---- MIME PARSER START ----
> [27694] dbg: message: main message type: text/plain
> [27694] dbg: message: parsing normal part
> [27694] dbg: message: added part, type: text/plain
> [27694] dbg: message: ---- MIME PARSER END ----
> [27694] dbg: dns: is Net::DNS::Resolver available? yes
> [27694] dbg: dns: Net::DNS version: 0.59
> [27694] dbg: generic: sa-update version svn454083
> [27694] dbg: generic: using update directory: /tmp/update
> [27694] dbg: diag: perl platform: 5.008002 aix
> [27694] dbg: diag: module installed: Digest::SHA1, version 2.11
> [27694] dbg: diag: module installed: Net::SMTP, version 2.29
> [27694] dbg: diag: module installed: Mail::SPF::Query, version 1.999001
> [27694] dbg: diag: module installed: IP::Country::Fast, version 604.001
> [27694] dbg: diag: module not installed: Razor2::Client::Agent 
> ('require' failed)
> [27694] dbg: diag: module installed: Net::Ident, version 1.20
> [27694] dbg: diag: module not installed: IO::Socket::INET6 ('require' 
> failed)
> [27694] dbg: diag: module not installed: IO::Socket::SSL ('require' failed)
> [27694] dbg: diag: module installed: Time::HiRes, version 1.52
> [27694] dbg: diag: module installed: DBI, version 1.53
> [27694] dbg: diag: module installed: Getopt::Long, version 2.34
> [27694] dbg: diag: module installed: LWP::UserAgent, version 2.003
> [27694] dbg: diag: module installed: HTTP::Date, version 1.44
> [27694] dbg: diag: module installed: Archive::Tar, version 1.30
> [27694] dbg: diag: module installed: IO::Zlib, version 1.04
> [27694] dbg: diag: module installed: DB_File, version 1.814
> [27694] dbg: diag: module installed: HTML::Parser, version 3.35
> [27694] dbg: diag: module installed: MIME::Base64, version 2.21
> [27694] dbg: diag: module installed: Net::DNS, version 0.59
> [27694] dbg: channel: attempting channel updates.spamassassin.org
> [27694] dbg: channel: update directory /tmp/update/updates_spamassassin_org
> [27694] dbg: channel: channel cf file 
> /tmp/update/updates_spamassassin_org.cf
> [27694] dbg: channel: channel pre file 
> /tmp/update/updates_spamassassin_org.pre
> [27694] dbg: channel: metadata version = 477972
> [27694] dbg: dns: 7.1.3.updates.spamassassin.org => 477972, parsed as 477972
> [27694] dbg: channel: current version is 477972, new version is 477972, 
> skipping channel
> [27694] dbg: diag: updates complete, exiting with code 1

man sa-update:

EXIT CODES
        An exit code of 0 means an update was available, and was 
downloaded and installed successfully.

        An exit code of 1 means no fresh updates were available.

        An exit code of 4 or higher, indicates that errors occurred 
while attempting to download and extract updates.

>  
> Question 2:
>  
> After running saupdate, I assume that all I have to do is to restart 
> spamd. How can I force spamd to restart and reload its rules? Can a do a 
> simple kill -1? Or do I need an actual kill and restart?

That is highly dependent upon how spamd is invoked.

-- 
Craig