Use absolute path to spamc

This commit is contained in:
David Bürgin 2021-08-01 13:25:30 +02:00
parent ab7fac6666
commit 4567044820
4 changed files with 12 additions and 3 deletions

View file

@ -1,5 +1,12 @@
# SpamAssassin Milter changelog
## 0.2.0 (unreleased)
* Invoke `spamc` using the absolute path `/usr/bin/spamc`. To customise this,
set the environment variable `SPAMASSASSIN_MILTER_SPAMC` to the desired path
when building the application.
* The minimum supported Rust version is now 1.46.0.
## 0.1.6 (2021-05-17)
* Improve processing of incoming `X-Spam-Flag` headers. Previously, in rare

View file

@ -3,7 +3,6 @@ name = "spamassassin-milter"
version = "0.1.6" # remember to update html_root_url and VERSION
edition = "2018"
description = "Milter for spam filtering with SpamAssassin"
authors = ["David Bürgin <dbuergin@gluet.ch>"]
license = "GPL-3.0-or-later"
categories = ["email"]
keywords = ["email", "milter", "spam", "spamassassin"]

View file

@ -61,7 +61,7 @@ recently, `miltertest` had a serious bug that prevents most integration tests in
this package from completing; make sure you use an up-to-date version of
`miltertest`.)
The minimum supported Rust version is 1.42.0.
The minimum supported Rust version is 1.46.0.
[Rust]: https://www.rust-lang.org

View file

@ -26,7 +26,10 @@ pub struct Spamc {
}
impl Spamc {
const SPAMC_PROGRAM: &'static str = "spamc";
const SPAMC_PROGRAM: &'static str = match option_env!("SPAMASSASSIN_MILTER_SPAMC") {
Some(p) => p,
None => "/usr/bin/spamc",
};
pub fn new(spamc_args: &'static [String]) -> Self {
Self {