spamassin-milter + non-default-path spamc -- **runtime** spamc path specification ? #7
Labels
No labels
bug
enhancement
suggestion
support
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: glts/spamassassin-milter#7
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
i'm building spamassassin-milter from src, for a local rpm install
build's OK, and bin's good
my
spamc
is from a local spamassassin build, built in a self-contained perl local::lib env,i.e., my
spamc
is not @ default path,/usr/bin/spamc
.i need to point spamassassin-milter at my spamc.
iiuc, build time config can do the trick
i modded my spamassassin-milter rpm build/install stages,
&
respectively.
and then, systemd launch with, e.g.,
unfortunately, received messages (on a postfix + spamassassin + spamassassin-milter setup) are REJECTed, failing @
which, according to
is a rather-generic
and for which I haven't yet solved for.
(1) is there runtime, not @ build, config support in spamassin-milter for pointing at an arbitrary
spamc
instance?(2) how/where do I get greater detail out of spammassin-milter + spamc re: the cause of that "status code 74" ?
fwiw,
suggests that
spamc
is healthy enough to address directly, and that the issue lies between it & milter ...the 'error 74' was pebkac.
pointing at the wrong socket end ...
changing
fixes that.
leaving,
"(1) is there runtime, not @ build, config support in spamassin-milter for pointing at an arbitrary spamc instance?"
changed title from spamassin-milter + non-default-path spamc {-failing with "status code 74"-} ? to spamassin-milter + non-default-path spamc {+-- runtime spamc path specification+} ?
There isn’t. I don’t remember if there is a specific reason for this (security?). One thing you could try is export
SPAMASSASSIN_MILTER_SPAMC=spamc
, then the milter will use the firstspamc
it finds in its execution environment (env variablePATH
).i do see in
CHANGELOG.md
,that it was the DEFAULT that changed
and, in
src/client.rs
,that the env var should still be used
but setting the runtime var in unit file,
doesn't do the trick, failing with
whereas setting the buildtime var in spec file,
does.
not clear, yet, why.
(mis)usage in unit file env ?
Hm, my suggestion was if you build with
SPAMASSASSIN_MILTER_SPAMC=spamc
, then at runtime you can put whateverspamc
you want on thePATH
. This works for me.I vaguely remember that the current approach is deliberate, due to some security principle. I think the idea is that the milter should not be allowed to run arbitrary user-specified programs. Rather, it is the system administrator who may choose which SpamAssassin client program is used.
Is there a strong case for making this a command-line option? My inclination is not to pursue this for now.
ah, i understood
to export into env @ runtime.
if I (1) build w/
SPAMASSASSIN_MILTER_SPAMC=spamc
and then in unit file, (2)
Environment="PATH=/path0/to/spamassassin/perl5app/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
it, indeed, runs as intended
the only issue was being able to communicate with a specific, non-system-path spamc instance WITHOUT hard-coding "another app's" bin path into the milter's rpm build .spec.
this, as above, does the trick well enough