Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 172736

Summary: mail-filter/spamassassin - redundant set of configuration files in /etc
Product: Gentoo Linux Reporter: Boney McCracker <brendlerjg>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: VERIFIED INVALID    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Boney McCracker 2007-03-30 02:51:32 UTC
This is to recommend elimination of /etc/spamassassin configuration file set in favor the redundant set of configuration files at /etc/mail/spamassassin.

I have mail-filter/spamassassin-3.1.8

I have two sets of configuration files for it, created with identical time stamps.  I don't know how long this redundancy has existed.  One set is /etc/spamassassin.  The other set is /etc/mail/spamassassin.  The problem with this is that spamassassin looks in both locations, but will only use the first it finds.  Since it looks first in /etc/mail/spamassassin, it will ignore any user configuration in /etc/spamassassin.  However, since /etc/spamassassin is more visible to the user, they are likely to make edits there, and wonder why they have not had the intended effect.

Since /etc/mail/spamassassin is the first location checked (and also appears to be the preferred location for spamassassin plugins), it would seem that the other set of config files would the one to trash.



Reproducible: Always




/etc/spamassassin $ ls -l
total 24
-rw-r--r-- 1 root root  951 2007-03-20 02:57 init.pre
-rw-r--r-- 1 root root 1208 2007-03-20 02:57 local.cf
-rw-r--r-- 1 root root  140 2007-03-20 02:57 local.cf.example
-r-------- 1 root root  664 2007-03-20 02:57 secrets.cf.example
-rw-r--r-- 1 root root 2179 2007-03-20 02:57 v310.pre
-rw-r--r-- 1 root root  806 2007-03-20 02:57 v312.pre

/etc/mail/spamassassin $ ls -l
total 24
-rw-r--r-- 1 root root  951 2007-03-20 02:57 init.pre
-rw-r--r-- 1 root root 1208 2007-03-20 02:57 local.cf
-rw-r--r-- 1 root root  140 2007-03-20 02:57 local.cf.example
-r-------- 1 root root  664 2007-03-20 02:57 secrets.cf.example
-rw-r--r-- 1 root root 2179 2007-03-20 02:57 v310.pre
-rw-r--r-- 1 root root  806 2007-03-20 02:57 v312.pre
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-03-30 07:09:02 UTC
Uhm... /etc/mail/spamassassin is supposed to be a *symlink* to /etc/spamassasin
Comment 2 Boney McCracker 2007-03-30 20:50:34 UTC
Well, that would make sense.  But as you can see from my directory listing, it was not created on my system as a symlink.  

In case it's of any value, this is the system in question.  This is the only box I have spamassassin on, so I can't help diagnose whether it's platform-specific:

# emerge --info

Portage 2.1.2.2 (default-linux/ppc/ppc32/2006.1/G4, gcc-4.1.1, glibc-2.5-r0, 2.6.19-gentoo-r5 ppc)
=================================================================
System uname: 2.6.19-gentoo-r5 ppc 7400, altivec supported
Gentoo Base System release 1.12.9
Timestamp of tree: Fri, 30 Mar 2007 19:50:01 +0000
ccache version 2.4 [enabled]
dev-java/java-config: 1.3.7, 2.0.31
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r6
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="ppc"
AUTOCLEAN="yes"
CBUILD="powerpc-unknown-linux-gnu"
CFLAGS="-O2 -mtune=7400 -mcpu=7400 -maltivec -mabi=altivec -pipe"
CHOST="powerpc-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -mtune=7400 -mcpu=7400 -maltivec -mabi=altivec -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict userfetch"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ ftp://ftp.gtlib.gatech.edu/pub/gentoo http://open-systems.ufl.edu/mirrors/gentoo "
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X a52 aac alsa altivec apache2 ati bash-completion berkdb bitmap-fonts bonobo caps cdparanoia cdr cli cracklib crypt cups dbus directfb dri dv dvd eds encode esd exif fbcon ffmpeg firefox flac fortran gdbm gif gnome gpm gstreamer gtk gtk2 gtkhtml hal iconv ieee1394 imagemagick java jpeg libg++ libwww logrotate mad midi mikmod mime mozilla mp3 mpeg ncurses nls nptl nptlonly nsplugin offensive ofx ogg opengl pam pcre pdf perl png ppc python quicktime readline reflection reiserfs ruby samba sdl session spell spl ssl startup-notification svg symlink sysfs tcpd threads tiff truetype truetype-fonts type1-fonts unicode usb userlocales vorbis xface xine xml xorg xpm xv zlib" ALSA_CARDS="powermac" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" USERLAND="GNU" VIDEO_CARDS="r128"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 3 Boney McCracker 2007-03-31 00:45:33 UTC
I see that you marked this "resolved/invalid".  I assume that means that those must be hard symlinks.

Comment 4 Jakub Moc (RETIRED) gentoo-dev 2007-03-31 07:20:46 UTC
(In reply to comment #3)
> I assume that means that those must be hard symlinks.

Not hardlink; symlink. And that's exactly what ebuild does:

<snip>
dosym /etc/mail/spamassassin /etc/spamassassin
</snip>

If it's not a symlink, well not an ebuild fault plus you'll have duplicate files. So delete the /etc/mail/spamassassin directory and let the ebuild do its job.
Comment 5 Boney McCracker 2007-03-31 17:26:22 UTC
> If it's not a symlink, well not an ebuild fault plus you'll have duplicate
> files. So delete the /etc/mail/spamassassin directory and let the ebuild do its
> job.

Ok, thanks.  I had already deleted them.

But SOMETHING created those files, and I certainly did not do it manually.  My guess is that the ebuild changed the location of the config files, and the dosym command has an option that's the equivalent of ln -sf that's not being used.  It's did not replace the actual files with symlinks.

But close it if you want.  It's fixed for me and you'll hear about it again if it's actually a problem for anybody.

Thank you.