Bug#739489: spamassassin: Failed to update

2018-09-30 Thread Noah Meyerhans
On Sun, Feb 23, 2014 at 07:05:29PM -0700, Bob Proulx wrote:
> Best would be if spamassassin itself was able to understand that this
> directory is not fully populated yet and ignore it until it is so that
> it could avoid the "no rules" error itself.  If there is a bug to be
> pointed at I think that is the place to point.

I can confirm that this bug is still present in the recently released
3.4.2. If /var/lib/spamassassin/3.004002 exists but is empty, spamd will
fail to start.



signature.asc
Description: PGP signature


Bug#739489: spamassassin: Failed to update

2014-02-26 Thread Stefano Callegari
Il Tue, Feb 25, 2014 at 09:39:09AM +0100, To Noah Meyerhans scrisse:
 Il Sun, Feb 23, 2014 at 07:48:29PM -0500, Noah Meyerhans scrisse:
 [cut]
  If you delete /var/lib/spamassassin/3.004000, you should be able to
  update to 3.4.0. Can you confirm this? If that works, then I'd be
 
 I confirm.
 
  interested in seeing if things stay stable following a manual run of
  sa-update:
  
  su - debian-spamd -c sa-update --gpghomedir 
  /var/lib/spamassassin/sa-update-keys
 
 ~ -su # su - debian-spamd -c sa-update --gpghomedir
 /var/lib/spamassassin/sa-update-keys
 
 mar feb 25 09:02:05 @hpdv5: 
 
 mail.log hasn't reported warnings or errors.
 
 But
 
 If you remember I have been able to update spamassassin but the day after
 at boot the error has been shown again. Now I try to reboot but until
 tomorrow I can't say you if all is ok.
 
 [edit] After the reboot seems all ok...
  

I'm happy to inform you that this morning spamassassin runs ok...

Thanks.
-- 
Stefano Callegari ste...@infinito.it


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#739489: spamassassin: Failed to update

2014-02-25 Thread Stefano Callegari
Il Sun, Feb 23, 2014 at 07:48:29PM -0500, Noah Meyerhans scrisse:
[cut]
 If you delete /var/lib/spamassassin/3.004000, you should be able to
 update to 3.4.0. Can you confirm this? If that works, then I'd be

I confirm.

 interested in seeing if things stay stable following a manual run of
 sa-update:
 
 su - debian-spamd -c sa-update --gpghomedir 
 /var/lib/spamassassin/sa-update-keys

~ -su # su - debian-spamd -c sa-update --gpghomedir
/var/lib/spamassassin/sa-update-keys

mar feb 25 09:02:05 @hpdv5: 

mail.log hasn't reported warnings or errors.

But

If you remember I have been able to update spamassassin but the day after
at boot the error has been shown again. Now I try to reboot but until
tomorrow I can't say you if all is ok.

[edit] After the reboot seems all ok...
 
 Thanks
 noah
 

Ciao
-- 
Stefano Callegari ste...@infinito.it


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#739489: spamassassin: Failed to update

2014-02-23 Thread Noah Meyerhans
On Fri, Feb 21, 2014 at 09:46:13AM +0100, Stefano Callegari wrote:
 Feb 21 09:12:22.731 [22110] dbg: config: using
 /var/lib/spamassassin/3.004000 for sys rules pre files
 Feb 21 09:12:22.731 [22110] dbg: config: using
 /var/lib/spamassassin/3.004000 for default rules dir
 Feb 21 09:12:22.731 [22110] error: config: no rules were found! Do you need
 to run 'sa-update'?
 config: no rules were found!  Do you need to run 'sa-update'?

It's trying to load rules from /var/lib/spamassassin/3.004000, which is
where sa-update installs them. Packaged rules are installed in
/usr/share/spamassassin.

If bug 739373 was triggered on the first sa-update run, then
/var/lib/spamassassin/3.004000 would have been created but never
populated with rules. This could leave spamassassin in a situation
similar to the one you're in. It would have to affect the very first run
of sa-update, though, because if that succeeded, then subsequent runs
would simply leave behind rules from a previous run.

What I don't understand is what ran sa-update. It isn't run by postinst
or any other processes that would run during a package upgrade.  Is
there anything else on your system that could have triggered sa-update?

If you delete /var/lib/spamassassin/3.004000, you should be able to
update to 3.4.0. Can you confirm this? If that works, then I'd be
interested in seeing if things stay stable following a manual run of
sa-update:

su - debian-spamd -c sa-update --gpghomedir 
/var/lib/spamassassin/sa-update-keys

Thanks
noah



signature.asc
Description: Digital signature


Bug#739489: spamassassin: Failed to update

2014-02-23 Thread Bob Proulx
Noah Meyerhans wrote:
 If bug 739373 was triggered on the first sa-update run, then
 /var/lib/spamassassin/3.004000 would have been created but never
 populated with rules. This could leave spamassassin in a situation
 similar to the one you're in. It would have to affect the very first run
 of sa-update, though, because if that succeeded, then subsequent runs
 would simply leave behind rules from a previous run.
 
 What I don't understand is what ran sa-update. It isn't run by postinst
 or any other processes that would run during a package upgrade.  Is
 there anything else on your system that could have triggered sa-update?

Cron will run /etc/cron.daily/spamassassin when the time comes.  I had
that situation on my machine.  I enabled CRON=1 and I see that Stefano
had also enabled CRON=1 too.

Additionally I normally add the sought.rules.yerp.org channel in
/etc/cron.daily/spamassassin.  Since that channel was functioning I
definitely had a /var/lib/spamassassin/3.004000 directory with the
sought rules but without the updates_spamassassin_org rules.

And then as an additional error message my spamassasin was then
complaining about being unable to find templates.  I never figured
that part out because it wasn't important to me because of the other
problem.

 If you delete /var/lib/spamassassin/3.004000, you should be able to
 update to 3.4.0. Can you confirm this? If that works, then I'd be
 interested in seeing if things stay stable following a manual run of
 sa-update:

For what it is worth I just now tried a couple of experiments.  I
purged all.  I installed the previous version 3.3.2-7.  I upgraded to
the latest 3.4.0-1.  All was okay for me.  I ran the cron script
/etc/cron.daily/spamassassin to run sa-update.  All was okay for me.

I purged all.  I installed spamassassin.  I hacked the
/etc/cron.daily/spamassassin to only load my other additional channel
and not load any updates.  Ran it.  All worked okay.

I purged all.  I installed spamassassin.  I hacked do_dns_query in
sa-update to produce a bogus result for just the serial number.  I did
it by adding this line (truly a hack) to break that specific case.

  my $text = $rr-UNIVERSAL::can('txtdata') ? $rr-txtdata : $rr-rdatastr;
+ $text .= 555  if defined $text  $text ne ''  $text =~ m/^15/;
+ printf(DEBUG: hacking txt data: %s\n,$text);
  push(@result,$text)  if defined $text  $text ne '';

At that point I was able to completely recreate the problem I had
experienced and that you have proposed that Stefano experienced too.

sa-update output:
  channel: could not find working mirror, channel failed

And if I try to run spamassassin I get this output:

  config: no rules were found!  Do you need to run 'sa-update'? at 
/usr/bin/spamassassin line 407.

To me it seems that you have the root cause of the problem figured
out.  It occurs if the upstream serial number is incorrect and there
hasn't ever been a correct set of rules loaded previously.  In that
case the following are created which sets up the problem.

  /var/lib/spamassassin/3.004000
  /var/lib/spamassassin/3.004000/updates_spamassassin_org
  /var/lib/spamassassin/3.004000/updates_spamassassin_org/MIRRORED.BY

The sa-update script could avoid this problem if it were to figure out
the serial number and channel first and then make the above
MIRRORED.BY only afterward.

Best would be if spamassassin itself was able to understand that this
directory is not fully populated yet and ignore it until it is so that
it could avoid the no rules error itself.  If there is a bug to be
pointed at I think that is the place to point.

Hope that helps.

Bob


signature.asc
Description: Digital signature


Bug#739489: spamassassin: Failed to update

2014-02-21 Thread Stefano Callegari
Il gio, feb 20, 2014 at 10:18:47 +0100, To Noah Meyerhans scrisse:
[cut]
 and no more errors!
 
 /var/cache/apt/archives -su # /etc/init.d/amavis status
 [ ok ] amavisd is running.
 
 gio feb 20 09:51:32 @hpdv5: 
 /var/cache/apt/archives -su # /etc/init.d/spamassassin status
 [ ok ] spamd is running.
 
 gio feb 20 09:51:44 @hpdv5: 
 
 Please, don't ask me why ... :)
 
 Maybe before have I tried to update spamassassin and spamc but now only
 spamassassin (spamc has been updated yesterday)?
[cut]

No luck...

This morning spamassassin and thus amavis haven't started at boot.

Some logs

~ -su # /etc/init.d/spamassassin status
[FAIL] spamd is not running ... failed!

ven feb 21 09:11:51 @hpdv5: 
~ -su # /etc/init.d/spamassassin start
Starting SpamAssassin Mail Filter Daemon: child process [22102] exited or
timed out without signaling production of a PID file: exit 255 at
/usr/sbin/spamd line 2960.

ven feb 21 09:12:01 @hpdv5: 
~ -su # spamd -D
Feb 21 09:12:22.704 [22110] dbg: logger: adding facilities: all
Feb 21 09:12:22.704 [22110] dbg: logger: logging level is DBG
Feb 21 09:12:22.717 [22110] dbg: logger: calling setlogsock(unix)
Feb 21 09:12:22.717 [22110] dbg: logger: opening syslog with unix socket
Feb 21 09:12:22.717 [22110] dbg: logger: successfully connected to
syslog/unix
Feb 21 09:12:22.717 [22110] dbg: logger: successfully added syslog method
Feb 21 09:12:22.717 [22110] dbg: spamd: will perform setuids? 1
Feb 21 09:12:22.718 [22110] dbg: spamd: socket module of choice:
IO::Socket::INET6 2.71, Socket 2.009, have PF_INET, have PF_INET6, using
Socket::getaddrinfo, AI_ADDRCONFIG is supported
Feb 21 09:12:22.718 [22110] dbg: spamd: socket specification: localhost,
IP address: localhost, port: 783
Feb 21 09:12:22.718 [22110] dbg: spamd: attempting to listen on IP
addresses: 127.0.0.1, ::1, port 783
Feb 21 09:12:22.718 [22110] dbg: spamd: creating IO::Socket::INET6 socket:
Listen: 128, LocalAddr: 127.0.0.1, LocalPort: 783, Proto: tcp, ReuseAddr:
1, Type: 1
Feb 21 09:12:22.719 [22110] dbg: spamd: creating IO::Socket::INET6 socket:
Listen: 128, LocalAddr: ::1, LocalPort: 783, Proto: tcp, ReuseAddr: 1,
Type: 1
Feb 21 09:12:22.719 [22110] dbg: spamd: server listen sockets fd bit field:
0110
Feb 21 09:12:22.719 [22110] dbg: logger: adding facilities: all
Feb 21 09:12:22.720 [22110] dbg: logger: logging level is DBG
Feb 21 09:12:22.720 [22110] dbg: generic: SpamAssassin version 3.4.0
Feb 21 09:12:22.720 [22110] dbg: generic: Perl 5.018002, PREFIX=/usr,
DEF_RULES_DIR=/usr/share/spamassassin, LOCAL_RULES_DIR=/etc/spamassassin,
LOCAL_STATE_DIR=/var/lib/spamassassin
Feb 21 09:12:22.720 [22110] dbg: config: timing enabled
Feb 21 09:12:22.721 [22110] dbg: config: score set 0 chosen.
Feb 21 09:12:22.728 [22110] dbg: spamd: Preloading modules with
HOME=/tmp/spamd-22110-init
Feb 21 09:12:22.729 [22110] dbg: config: using /etc/spamassassin for site
rules pre files
Feb 21 09:12:22.729 [22110] dbg: config: read file
/etc/spamassassin/init.pre
Feb 21 09:12:22.729 [22110] dbg: config: read file
/etc/spamassassin/sa-compile.pre
Feb 21 09:12:22.729 [22110] dbg: config: read file
/etc/spamassassin/v310.pre
Feb 21 09:12:22.730 [22110] dbg: config: read file
/etc/spamassassin/v312.pre
Feb 21 09:12:22.730 [22110] dbg: config: read file
/etc/spamassassin/v320.pre
Feb 21 09:12:22.730 [22110] dbg: config: read file
/etc/spamassassin/v330.pre
Feb 21 09:12:22.730 [22110] dbg: config: read file
/etc/spamassassin/v340.pre
Feb 21 09:12:22.731 [22110] dbg: config: using
/var/lib/spamassassin/3.004000 for sys rules pre files
Feb 21 09:12:22.731 [22110] dbg: config: using
/var/lib/spamassassin/3.004000 for default rules dir
Feb 21 09:12:22.731 [22110] error: config: no rules were found! Do you need
to run 'sa-update'?
config: no rules were found!  Do you need to run 'sa-update'?

ven feb 21 09:12:22 @hpdv5: 


From /var/log/mail.log

[...]
Feb 21 08:56:04 hpdv5 amavis[5010]: (!!)TROUBLE in pre_loop_hook: config:
no rules were found!  Do you need to run 'sa-update'?
Feb 21 08:56:04 hpdv5 amavis[5010]: (!)_DIE: Suicide () TROUBLE in
pre_loop_hook: config: no rules were found!  Do you need to run
'sa-update'?
Feb 21 08:57:04 hpdv5 spamd[8226]: logger: removing stderr method
Feb 21 08:57:07 hpdv5 spamd[8257]: config: no rules were found! Do you need
to run 'sa-update'?
Feb 21 08:57:07 hpdv5 spamd[8226]: child process [8257] exited or timed out
without signaling production of a PID file: exit 255 at /usr/sbin/spamd
line 2960.
[...]
Feb 21 09:12:00 hpdv5 spamd[22100]: logger: removing stderr method
Feb 21 09:12:00 hpdv5 spamd[22102]: config: no rules were found! Do you need to
run 'sa-update'?
Feb 21 09:12:01 hpdv5 spamd[22100]: child process [22102] exited or timed out
without signaling production of a PID file: exit 255 at /usr/sbin/spamd line
2960.
Feb 21 09:12:22 hpdv5 spamd[22110]: logger: successfully added syslog method
Feb 21 09:12:22 hpdv5 spamd[22110]: spamd: will perform setuids? 1
Feb 21 09:12:22 hpdv5 spamd[22110]: spamd: 

Bug#739489: spamassassin: Failed to update

2014-02-20 Thread Stefano Callegari
Il Thu, Feb 20, 2014 at 12:36:38AM -0500, Noah Meyerhans scrisse:
 On Wed, Feb 19, 2014 at 10:32:15AM +0100, Stefano wrote:
  Feb 19 09:27:30 hpdv5 spamd[29307]: logger: removing stderr method
  Feb 19 09:27:30 hpdv5 spamd[29310]: config: no rules were found! Do you
  need to run 'sa-update'?
 
 That's odd, since of course there are rules included in the package.
 Have you made any modifications to the system-wide config files? Notably
 /etc/default/spamassassin or /etc/spamassassin/*

I think yes: reportbug has asked me if copy these changes. 

You find them at the bottom of my first e-mail.

 
 You might also try running spamassassin or spamd with the '-D' option to
 see if it logs any useful additional details. Note that this will keep
 spamd in the foreground.

From /var/log/mail.log

aptitude stops the old:
[...] 
Feb 20 09:46:21 hpdv5 spamd[7664]: spamd: child [7865] killed successfully: inte
rrupted, signal 2 (0002)
Feb 20 09:46:21 hpdv5 spamd[7664]: spamd: child [7864] killed successfully: inte
rrupted, signal 2 (0002)
Feb 20 09:46:22 hpdv5 spamd[7664]: logger: removing stderr method
Feb 20 09:46:33 hpdv5 spamd[24140]: plugin: failed to parse plugin (from @INC): 
Can't locate Mail/SpamAssassin/Plugin/AskDNS.pm in @INC (you may need to install
 the Mail::SpamAssassin::Plugin::AskDNS module) (@INC contains: lib /usr/share/p
erl5 /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/
perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl) at (eval
 89) line 1.
Feb 20 09:46:35 hpdv5 spamd[24140]: zoom: able to use 361/361 'body_0' compiled 
rules (100%)
[...]

and no more errors!

/var/cache/apt/archives -su # /etc/init.d/amavis status
[ ok ] amavisd is running.

gio feb 20 09:51:32 @hpdv5: 
/var/cache/apt/archives -su # /etc/init.d/spamassassin status
[ ok ] spamd is running.

gio feb 20 09:51:44 @hpdv5: 

Please, don't ask me why ... :)

Maybe before have I tried to update spamassassin and spamc but now only
spamassassin (spamc has been updated yesterday)?

 
  /var/cache/apt/archives -su # sa-update
  channel: could not find working mirror, channel failed
 
 This is a known upstream bug; see
 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=739373

It hasn't be my intention to give a new report but only show what happen. I
see it later.

 
 noah
 

Many thanks.

Stefano
-- 
Stefano Callegari ste...@infinito.it


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#739489: spamassassin: Failed to update

2014-02-19 Thread Stefano
Package: spamassassin
Version: 3.4.0-1
Severity: important
Tags: d-i

Dear Maintainer,

during last update, aptitude exit with

Failed to perform requested operation on package.  Trying to recover:
Configurazione di spamassassin (3.4.0-1)...
Starting SpamAssassin Mail Filter Daemon: child process [29899] exited or
timed out without signaling production of a PID file: exit 255 at
/usr/sbin/spamd line 2960.
invoke-rc.d: initscript spamassassin, action start failed.
dpkg: error processing package spamassassin (--configure):


Into /var/log/mail.log I see

Feb 19 09:27:30 hpdv5 spamd[29307]: logger: removing stderr method
Feb 19 09:27:30 hpdv5 spamd[29310]: config: no rules were found! Do you
need to run 'sa-update'?
Feb 19 09:27:31 hpdv5 spamd[29307]: child process [29310] exited or timed
out without signaling production of a PID file: exit 255 at /usr/sbin/spamd
line 2960.
Feb 19 09:27:34 hpdv5 spamd[29897]: logger: removing stderr method
Feb 19 09:27:34 hpdv5 spamd[29899]: config: no rules were found! Do you
need to run 'sa-update'?
Feb 19 09:27:35 hpdv5 spamd[29897]: child process [29899] exited or timed
out without signaling production of a PID file: exit 255 at /usr/sbin/spamd
line 2960.

and if I restart amavis, into /var/log/mail.log I see again

Feb 19 09:28:45 hpdv5 amavis[29946]: (!!)TROUBLE in pre_loop_hook: config:
no rules were found!  Do you need to run 'sa-update'?
Feb 19 09:28:45 hpdv5 amavis[29946]: (!)_DIE: Suicide () TROUBLE in
pre_loop_hook: config: no rules were found!  Do you need to run
'sa-update'?


If I try to run sa-update

/var/cache/apt/archives -su # sa-update
channel: could not find working mirror, channel failed


and, obviously, 

/var/cache/apt/archives -su # /etc/init.d/spamassassin restart
Restarting SpamAssassin Mail Filter Daemon: No /usr/bin/perl found running;
none killed.
child process [32528] exited or timed out without signaling production of a
PID file: exit 255 at /usr/sbin/spamd line 2960.


Now, to send this, I have downgraded to the previous release.

Thanks

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (903, 'unstable'), (500, 'testing'), (400, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.12-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages spamassassin depends on:
ii  adduser 3.113+nmu3
pn  libarchive-tar-perl none
ii  libhtml-parser-perl 3.71-1+b1
ii  libnet-dns-perl 0.68-1.2
ii  libnetaddr-ip-perl  4.071+dfsg-1
ii  libsocket6-perl 0.25-1
ii  libsys-hostname-long-perl   1.4-3
ii  libwww-perl 6.05-2
ii  perl5.18.2-2
ii  perl-modules [libio-zlib-perl]  5.18.2-2

Versions of packages spamassassin recommends:
ii  gnupg  1.4.16-1
ii  libio-socket-inet6-perl2.71-1
ii  libmail-spf-perl   2.9.0-2
ii  perl [libsys-syslog-perl]  5.18.2-2
ii  sa-compile 3.4.0-1
ii  spamc  3.3.2-8

Versions of packages spamassassin suggests:
ii  libdbi-perl  1.631-1
ii  libio-compress-perl [libcompress-zlib-perl]  2.064-1
ii  libio-socket-ssl-perl1.967-1
ii  libmail-dkim-perl0.40-1
ii  perl [libcompress-zlib-perl] 5.18.2-2
ii  pyzor1:0.5.0-2
ii  razor1:2.85-4+b2

-- Configuration Files:
/etc/default/spamassassin changed:
ENABLED=1
OPTIONS=--create-prefs --max-children 5 --helper-home-dir
PIDFILE=/var/run/spamd.pid
CRON=1

/etc/spamassassin/local.cf changed:
trusted_networks 192.168. 10.
bayes_ignore_header X-Bogosity
bayes_ignore_header X-Spam-Flag
bayes_ignore_header X-Spam-Status
bayes_path /var/lib/amavis/.spamassassin/bayes
bayes_file_mode 0666
score BAYES_99 0.0001 0.0001 5.0 5.0 
ifplugin Mail::SpamAssassin::Plugin::Shortcircuit
shortcircuit USER_IN_BLACKLIST   on
shortcircuit USER_IN_BLACKLIST_TOon
shortcircuit SUBJECT_IN_BLACKLISTon
shortcircuit ALL_TRUSTED on
shortcircuit BAYES_99spam
shortcircuit BAYES_00ham
endif # Mail::SpamAssassin::Plugin::Shortcircuit


-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#739489: spamassassin: Failed to update

2014-02-19 Thread Noah Meyerhans
On Wed, Feb 19, 2014 at 10:32:15AM +0100, Stefano wrote:
 Feb 19 09:27:30 hpdv5 spamd[29307]: logger: removing stderr method
 Feb 19 09:27:30 hpdv5 spamd[29310]: config: no rules were found! Do you
 need to run 'sa-update'?

That's odd, since of course there are rules included in the package.
Have you made any modifications to the system-wide config files? Notably
/etc/default/spamassassin or /etc/spamassassin/*

You might also try running spamassassin or spamd with the '-D' option to
see if it logs any useful additional details. Note that this will keep
spamd in the foreground.

 /var/cache/apt/archives -su # sa-update
 channel: could not find working mirror, channel failed

This is a known upstream bug; see
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=739373

noah



signature.asc
Description: Digital signature