On 8 Apr 2021, at 5:05, Michael Grant wrote:

I'm running debian on my mail server.  I use etckeeper to track
changes in /etc.

Often I run across modules such as spamassassin-esp and maybe I would
consider playing with Jared Hall's CHAOS module.

I'm curious what the recommended best practice is to install such
modules from a git repo.

Best practice? Don't.

For spamassassin-esp, I cloned the repo into my /etc/spamassassin/
directory and then added this to my local.cf:

Apart from anything specific to SpamAssassin, putting code under /etc/ is a bad practice.

loadplugin Mail::SpamAssassin::Plugin::Esp spamassassin-esp/Esp.pm
include spamassassin-esp/Esp.cf

This allows me to 'git pull' from this repository from time to time to
update it.  But it's not perfect, especially as I have local changes
to Esp.cf.  It's actually worse since I forked it to give back some
changes but I'd say that's perhaps less usual.

Furthermore, as I said, I use etckeeper and when I 'apt upgrade', I get
constant warnings:

modified: spamassassin/spamassassin-esp (modified content, untracked content)

I'm not familiar with etckeeper but it seems like it is working as designed and that it may be designed for a purpose at odds with how you actually want to manage your system.

So clearly it's not ideal to clone a spamassassin module into
/etc/spamassassin!

I'm curious if someone has a clean solution here that allows updating
the module from time to time from git.

That module? No. I have the utmost respect for and trust in Giovanni Bechis and use his code every day, but that module as it exists at Github is not structured to be used from a git checkout. The 4 significant files all properly belong in different places. The specific proper places would depend on how your Perl and SA installations were configured.

I realize this may be more a debian question and I may post it on the
debian-users list if I don't get any decent replies here.

I expect this qualifies as an indecent reply...

--
Bill Cole
b...@scconsult.com or billc...@apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Not Currently Available For Hire

Reply via email to