SYSTEM WARNING: 'date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.' in '/usr/share/mantis/www/core.php' line 264

0000112: SPAM rules update with sa-update - MantisBT
MantisBT - Endian Firewall
View Issue Details
0000112Endian FirewallApplication Level Proxiespublic2007-02-13 15:082008-02-02 07:28
aender 
peter-endian 
normalmajoralways
closedfixed 
2.1 
2.2-beta3 
0000112: SPAM rules update with sa-update
Hello.

I found no mechanism to update the rules vor spamassassin.
Also a sa-update at the console doesn´t work properly.
Here the error:
Can't locate LWP/UserAgent.pm in @INC (@INC contains: /var/tmp/perl-Mail-SpamAssassin-buildroot/usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/5.8.5/i386-linux-thread-multi /usr/lib/perl5/5.8.5 /usr/lib/.....................

Please give us a solution to update the rules.
Also for the blocked URLS in the http proxy.

I understand that there are some more features in the commercial version.
But up to date rules are also a MUST for the community version.
In the community version it could be a manual task at the console.
The nice gui variant could be only in the commercial.

Please give us a solution.
No tags attached.
related to 0000428closed peter-endian fix sa-update 
Issue History
2007-02-13 15:08aenderNew Issue
2007-03-06 09:32aenderNote Added: 0000209
2007-06-26 21:57baldyNote Added: 0000363
2007-06-26 23:56baldyNote Edited: 0000363
2007-06-26 23:58baldyNote Edited: 0000363
2007-06-26 23:58baldyNote Edited: 0000363
2008-01-09 10:41peter-endianRelationship addedrelated to 0000428
2008-01-09 19:22peter-endianStatusnew => resolved
2008-01-09 19:22peter-endianFixed in Version => 2.2-beta3
2008-01-09 19:22peter-endianResolutionopen => fixed
2008-01-09 19:22peter-endianAssigned To => peter-endian
2008-02-02 07:28raphael-endianStatusresolved => closed

Notes
(0000209)
aender   
2007-03-06 09:32   
Hello.

Because nobody gives me an answer to this bug i solved it for myself.

Here a short description for a manual update without any garranty

First we have to install some RPM

rpm -Uvh http://www.stellarcore.net/downloads/efw2-development/perl-extras-5.8.5-34.RHEL4.endian1.i386.rpm [^]
rpm -Uvh http://www.stellarcore.net/downloads/efw2-updates/perl-Mail-SpamAssassin-extras-3.1.7-1.endian4.i386.rpm [^]

rpm -Uvh ftp://ftp.secureit.at/make-3.80-5.endian0.i386.rpm [^]


Now whe can install the missing UserAgent Module with

cpan LWP::UserAgent

If there are any setup questions from cpan you can just accept each one by pressing RETURN

If you get an error like this try to do a manual make

--- ERROR MESSAGE ---

Writing Makefile for LWP
    -- NOT OK
Running make test
  Can't test without successful make

--- ERROR MESSAGE ---

Running a manual make:

cd /root/.cpan/build/libwww-perl-5.805/
make && make test && make install

Now sa-update should work fine on 2.0
Just type in: sa-update

On 2.1 i got errors about pgp keys. I not longer search for a resolution. I just disable the checking with --nogpg

Here two examples for special channels.

sa-update --nogpg --debug --channel saupdates.openprotect.com
sa-update --nogpg --debug --channel 70_sare_bayes_poison_nxm.cf.sare.sa-update.dostech.net

After a sa-update it is neccessary to restart the smtpscan with this command:

/usr/local/bin/restartsmtpscan.py

Maybe Peter can give us a single ready to run RPM wich include my solution and do a gui extension to setup a update interval in the smtp-proxy gui.

Would be very very nice.
looking forward to you peter.
(0000363)
baldy   
2007-06-26 21:57   
(edited on: 2007-06-26 23:58)
Aender,

Thanks for your post, it has helped me sort out the same problem you had.

For the GPG errors I have been able to resolve them as well.

NOTE : On some installations with an updated spamassassin you might be missing a folder and some files

cd /etc/spamassassin
mkdir sa-update-keys <-- this was the missing folder
chmod 700 sa-update-keys <-- set correct permissions on this folder

To get the GPG.KEY file

cd /root
curl -C - -O http://spamassassin.apache.org/updates/GPG.KEY [^]
sa-update --gpghomedir /etc/spamassassin/sa-update-keys --import /root/GPG.KEY <-- sa-update now creates the missing files in the sa-update-keys folder

cd /etc/spamassassin/sa-update-keys
chmod 600 * <-- set correct permissions on the missing files

If you now run sa-update it will still fail with a GPG error.

sa-update --nogpg <-- needs to be run once to fix gpg errors

sa-update <-- should now complete with no errors.

/usr/local/bin/restartsmtpscan.py <-- needs to be restarted to update the changes.

I have tested this on both EFW 2.0 and EFW 2.1 machines.
Currently supporting and maintaining about sixteen machines with either 2.0 or 2.1 for educational environments.

Later this week I will implement the above procedure on the remainder of those machines
Hope this helps.

Regards,

Klaas