You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Michael Scheidell <sc...@secnap.net> on 2007/03/20 18:57:50 UTC

patches for FREEBSD sa-update

I am the maintainer for the FreeBsd SA port and about to release patches
that change the default state directory from /var/lib/spamassassin to
/usr/local/lib/spamassassin
This makes it more consistent with FBSD's directory structure (they
don't use /var/lib for anything).

The reason its important, is if you do use something like 'sa-update
--updatedir /usr/local/share/spamassassin  or ../etc/mail/spamassassin,
THREE sets of plugins are loaded:

#1, custom: /usr/local/etc/mail/spamassassin
#2, site: /usr/local/share/spamassassin
#3, the updates.

if you apply this update patch, and run sa-update, then restart spamd or
amavisd-new, only TWO sets of plugins will be loaded.

If you update, or deinstall/reinstall it will erase any old
/var/lib/spamassassin directory and its contents.

Minor issues also including checking minimum versions of certain
utilities based on problems or security issues, including forcing gnupg1
to at least 1.47.

If anyone would like a tarball of these (pre-release) ports file, you
can download it here (for the next week, or until the official ports
collection is updated)
I will be taking any (helpful) suggestions till Friday when I will send
this to ports for updates.

http://www.secnap.com/downloads/saport.tgz.
Instructions for install, just unzip it into
/usr/ports/mail/p5-Mail-SpamAssassin.

(offer void where prohibited or taxed, your mileage may vary, use at one
risk)

-- 
Michael Scheidell, CTO
SECNAP Network Security Corporation


----------------------------------------------------------------- 
This email has been scanned and certified safe by SpammerTrap(tm) 
For Information please see http://www.spammertrap.com 
----------------------------------------------------------------- 

Re: patches for FREEBSD sa-update

Posted by Mark Martinec <Ma...@ijs.si>.
Michael,

> I am the maintainer for the FreeBsd SA port and about to release patches
> that change the default state directory from /var/lib/spamassassin to
> /usr/local/lib/spamassassin
> This makes it more consistent with FBSD's directory structure (they
> don't use /var/lib for anything).

I'm not sure if /usr/local/lib/spamassassin is any better than the
unusual /var/lib/spamassassin. The 'man 7 hier' suggests the lib/
is mainly for shared libraries and ar libraries, and rules files
do not fit well into such category.

If updated rules are supposed to go into /var, then perhaps the place
for them is /var/db/spamassassin -- but I guess not: /var is for
'multi-purpose log, temporary, transient, and spool files');

Or maybe /usr/local/share/spamassassin-var ('man 7 hier' suggests
that architecture-independent files, possibly NFS-mounted, belong
under /usr/local/share/, but /usr/local/share/spamassassin is
unfortunately already used for another purpose).

Perhaps the closest thing is /usr/local/libdata/, intended
for 'miscellaneous utility data files'.

The change will cause some confusion with current practices,
with talks on the mailing list, and a mismatch in documentation.

If doing the change, don't forget to patch the default for
LOCALSTATEDIR in Makefile.PL (which ends up as LOCAL_STATE_DIR
option default). There is a corresponding default in amavisd-new
(but is only needed with versions of SA older than 3.1.5).

> The reason its important, is if you do use something like 'sa-update
> --updatedir /usr/local/share/spamassassin  or ../etc/mail/spamassassin,
> THREE sets of plugins are loaded:

Don't assume anybody is using --updatedir /usr/local/share/spamassassin.
It is plain wrong, and this was discussed when sa-update became popular,
both on the SA-user list a number of times, as well as on the amavis-user
ML, so I hope nobody does it anymore. It is a waste of effort catering
for such a misuse.

  Mark

RE: patches for FREEBSD sa-update

Posted by Michael Scheidell <sc...@secnap.net>.
 

> -----Original Message-----
> From: Theo Van Dinter [mailto:felicity@apache.org] 
> Sent: Tuesday, March 20, 2007 2:40 PM
> To: users@spamassassin.apache.org
> Subject: Re: patches for FREEBSD sa-update
> 
> On Tue, Mar 20, 2007 at 01:57:50PM -0400, Michael Scheidell wrote:
> > The reason its important, is if you do use something like 
> 'sa-update 
> > --updatedir /usr/local/share/spamassassin  or 
> > ../etc/mail/spamassassin, THREE sets of plugins are loaded:
> 
> It's really rules, not necessarily plugins.
> 
Right, yes, rules.

> fwiw, people are highly encouraged to *not* use site or 
> default rules dirs for sa-update.  doing so leads to problems.

Yes, and the wiki and documentation isn't clean enough (yes, I know, I
can update it myself ;-)

Bottom line: if you do it wrong, it MIGHT work.

(ps, the reason I did it with sa-update --updatedir
/usr/local/share/spamassassin for a year was the first time I did it
default (with /var/lib/spamassassin) is that link failed, since the new
rules added to /var/lib/spamassin (which replaced the old rules in
/usr/local/share/spamassassin) were missing lots of files, and I ASS U
ME D that it was a patch failure.

Doing it my way worked (passed lint) but does load 3 sets of rules, so
it was wrong.


---------------------------------------------------------------------------
This email has been scanned and certified safe by SpammerTrap(tm) 
For Information please see http://www.spammertrap.com 
---------------------------------------------------------------------------

Re: patches for FREEBSD sa-update

Posted by Theo Van Dinter <fe...@apache.org>.
On Tue, Mar 20, 2007 at 01:57:50PM -0400, Michael Scheidell wrote:
> The reason its important, is if you do use something like 'sa-update
> --updatedir /usr/local/share/spamassassin  or ../etc/mail/spamassassin,
> THREE sets of plugins are loaded:

It's really rules, not necessarily plugins.

fwiw, people are highly encouraged to *not* use site or default rules dirs for
sa-update.  doing so leads to problems.

-- 
Randomly Selected Tagline:
"... you are a very evil man.  Evil, evil, evil...
 It's my job.  It pays well and I get to work my own hours."
         - J. Michael Straczynski