[Evolution] Bug#724884: evolution: Evolution Spamassassin integration doesn't detect system spamd

Tim Day timday at bottlenose.demon.co.uk
Sun Sep 29 10:37:09 UTC 2013


Package: evolution
Version: 3.4.4-3
Severity: normal
Tags: patch

Dear Maintainer,

> What led up to the situation?

I'm a long time user of both Spamassassin and Evolution.
Until now, all my Spamassassin processing has been done
by some scripting in the getmail setup I use to pull email
from various POP boxes, and I've never had any reason to
enable Evolution's own "Check incoming messages for junk"
option.
However, I recently had cause to enable this option in Evolution.
What I found was that Evolution seemed to be unable to detect
the system spamd and instead spawns one for each user
(I have muliple users running Evolution on the box).
This in itself wouldn't be a problem; however Evolution's
subsequent invokations of spamc to connect to the user spamd appears
to be broken: it adds an empty argument after --socket (when it
should be a path to the socket created to communicate with spamd)
and incoming messages silently fail to be checked.  I could see
what was being invoked by running
  while true ; do ps -elf | grep spamc | grep -v grep; done
in a terminal.

> What exactly did you do that was effective?

I wanted to try and get Evolution to detect and use the system spamd
as the per-user spamd seems to be unnecessarily complicated.
Inspection of the Evolution.dsc package suggests that while the
Debian packaging's patches attempt to fix at least one mention of
  /usr/bin/spamd
to Debian's /usr/sbin/spamd, there are some other mentions left
untouched (I don't know if that's just history and new mentions have
crept into upstream source, or there really is theoretically just
one place this path can be changed and override the others; either
way I didn't trust any of the /usr/bin/spamd mentions not to cause
trouble).

What I found was:

$ grep -r /usr/bin/spamd .
./modules/spamassassin/evolution-spamassassin.c:#define SPAMD_BINARY "/usr/bin/spamd"
./data/org.gnome.evolution.spamassassin.gschema.xml.in:      <default>'/usr/bin/spamd'</default>
./data/org.gnome.evolution.spamassassin.gschema.xml:      <default>'/usr/bin/spamd'</default>

$ grep -r /usr/sbin/spamd .
./debian/evolution-common.gsettings-override:spamd-binary='/usr/sbin/spamd'
./debian/changelog:    - Correct the path to spamd as /usr/sbin/spamd

After building the .dsc with dpkg-buildpackage, I changed the three
former mentions of /usr/bin/spamd to the correct /usr/sbin/spamd.  I also
changed one mention of /usr/sbin/spamc in
  ./modules/spamassassin/evolution-spamassassin.c
to the correct /usr/bin/spamc.

(Sorry, I know I indicated this reportbug includes a patch; the above
description is it; let me know if a "proper" patch/diffs would be better
I am a total n00b at source package workflows; this is actually the first
time I've used dpkg-buildpackage or done anything with a .dsc).
 
> What was the outcome of this action?

With the above changes to source made, I rebuilt with
  dpkg-buildpackage -nc
and installed the resulting debs
  dpkg -i *.deb
I restarted evolution (and spamassassin FWIW), observed that Evolution
was no longer creating a per-user spamd, hit send/recieve in Evolution
and was pleased to see a bunch of more sensible looking
  /usr/bin/spamc --check --timeout=60
streaming past in my process observer mentioned above and spamd
logging to syslog.  I didn't have to wait long to see some UBE
being correctly sorted into Evolution's "Junk" folder either.

Some additional information:

* Same issue (or at least the spamc --socket aspect) seems to have
been reported on Ubuntu
  https://bugs.launchpad.net/spamassassin/+bug/1178826
(although incorrectly against SpamAssassin when it's clearly really 
an Evolution issue, which caused an epic flamewar upstream at 
  https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6939
)

* Evolution upstream certainly seems to regard this area of SA integration as needing improvement
  https://mail.gnome.org/archives/commits-list/2013-July/msg02156.html
(personally I don't understand why they bothered with the per-user spamd complication
in the first place; a system spamd isn't too much to ask for).

-- System Information:
Debian Release: 7.1
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-4-686-pae (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages evolution depends on:
ii  dbus                     1.6.8-1+deb7u1
ii  debconf [debconf-2.0]    1.5.49
ii  evolution-common         3.4.4-3
ii  evolution-data-server    3.4.4-3
ii  gconf-service            3.2.5-1+build1
ii  gconf2                   3.2.5-1+build1
ii  gnome-icon-theme         3.4.0-2
ii  libatk1.0-0              2.4.0-2
ii  libc6                    2.13-38
ii  libcairo-gobject2        1.12.2-3
ii  libcairo2                1.12.2-3
ii  libcamel-1.2-33          3.4.4-3
ii  libclutter-gtk-1.0-0     1.2.0-2
ii  libdbus-glib-1-2         0.100.2-1
ii  libebackend-1.2-2        3.4.4-3
ii  libebook-1.2-13          3.4.4-3
ii  libecal-1.2-11           3.4.4-3
ii  libedataserver-1.2-16    3.4.4-3
ii  libedataserverui-3.0-1   3.4.4-3
ii  libenchant1c2a           1.6.0-7
ii  libevolution             3.4.4-3
ii  libgail-3-0              3.4.2-6
ii  libgconf-2-4             3.2.5-1+build1
ii  libgdata13               0.12.0-1
ii  libgdk-pixbuf2.0-0       2.26.1-1
ii  libglib2.0-0             2.33.12+really2.32.4-5
ii  libgnome-desktop-3-2     3.4.2-1
ii  libgtk-3-0               3.4.2-6
ii  libgtkhtml-4.0-0         4.4.4-1
ii  libgtkhtml-editor-4.0-0  4.4.4-1
ii  libgweather-3-0          3.4.1-1+build1
ii  libical0                 0.48-2
ii  libmx-1.0-2              1.4.6-1
ii  libnotify4               0.7.5-1
ii  libnspr4                 2:4.10-1~bpo70+1
ii  libnspr4-0d              2:4.10-1~bpo70+1
ii  libnss3                  2:3.15.1-1~bpo70+1
ii  libnss3-1d               2:3.15.1-1~bpo70+1
ii  libpango1.0-0            1.30.0-1
ii  libsoup2.4-1             2.38.1-2
ii  libsqlite3-0             3.7.17-1~bpo70+1
ii  libxml2                  2.8.0+dfsg1-7+nmu1
ii  psmisc                   22.19-1+deb7u1

Versions of packages evolution recommends:
ii  evolution-plugins  3.4.4-3
ii  evolution-webcal   2.32.0-2+b2
ii  spamassassin       3.3.2-5
ii  yelp               3.4.2-1+b1

Versions of packages evolution suggests:
ii  evolution-dbg                   3.4.4-3
pn  evolution-exchange              <none>
ii  evolution-plugins-experimental  3.4.4-3
ii  gnupg                           1.4.12-7+deb7u1
ii  network-manager                 0.9.4.0-10

-- debconf information:
  evolution/needs_shutdown:
  evolution/kill_processes:



More information about the Pkg-evolution-maintainers mailing list