about summary refs log tree commit diff
path: root/pkgs/servers/mail/spamassassin
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-12-24 22:15:05 +0000
committerAlyssa Ross <hi@alyssa.is>2020-01-30 00:47:10 +0000
commit85a9743f135b3687281efc5881baaab8ca2a8e09 (patch)
treec81c855079b4d9f56c4d564011f02555458b640a /pkgs/servers/mail/spamassassin
parenta8ea4f0d33fb655e32a9cd66d6c1e7542d9c536e (diff)
spamassassin: use /etc/mail/spamassassin for config
Using a custom path in the Nix store meant that users of the module
couldn't add their own config files, which is a desirable feature.  I
don't think avoiding /etc buys us anything.
Diffstat (limited to 'pkgs/servers/mail/spamassassin')
-rw-r--r--pkgs/servers/mail/spamassassin/default.nix5
-rw-r--r--pkgs/servers/mail/spamassassin/sa-update_add--siteconfigpath.patch17
2 files changed, 2 insertions, 20 deletions
diff --git a/pkgs/servers/mail/spamassassin/default.nix b/pkgs/servers/mail/spamassassin/default.nix
index 274f45d5b2d11..6980dca940356 100644
--- a/pkgs/servers/mail/spamassassin/default.nix
+++ b/pkgs/servers/mail/spamassassin/default.nix
@@ -9,9 +9,6 @@ perlPackages.buildPerlPackage rec {
     sha256 = "1380cmrgjsyidnznr844c5yr9snz36dw7xchdfryi2s61vjzvf55";
   };
 
-  # https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7434
-  patches = [ ./sa-update_add--siteconfigpath.patch ];
-
   buildInputs = [ makeWrapper ] ++ (with perlPackages; [
     HTMLParser NetCIDRLite NetDNS NetAddrIP DBFile HTTPDate MailDKIM LWP
     IOSocketSSL DBI EncodeDetect IPCountry NetIdent Razor2ClientAgent MailSPF
@@ -22,7 +19,7 @@ perlPackages.buildPerlPackage rec {
   # for the PERL5LIB environment variable. Needs further investigation.
   makeFlags = [ "PERL_BIN=${perlPackages.perl}/bin/perl" "PERL_TAINT=no" ];
 
-  makeMakerFlags = [ "CONFDIR=/homeless/shelter" "LOCALSTATEDIR=/var/lib/spamassassin" ];
+  makeMakerFlags = [ "SYSCONFDIR=/etc LOCALSTATEDIR=/var/lib/spamassassin" ];
 
   doCheck = false;
 
diff --git a/pkgs/servers/mail/spamassassin/sa-update_add--siteconfigpath.patch b/pkgs/servers/mail/spamassassin/sa-update_add--siteconfigpath.patch
index 3264aefc0722b..bac048892fe83 100644
--- a/pkgs/servers/mail/spamassassin/sa-update_add--siteconfigpath.patch
+++ b/pkgs/servers/mail/spamassassin/sa-update_add--siteconfigpath.patch
@@ -30,7 +30,7 @@ index bb7396d..39f681f 100755
  
  # check only disabled gpg
  # https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5854
-@@ -1808,6 +1812,7 @@ Options:
+@@ -1808,7 +1812,7 @@ Options:
    --updatedir path        Directory to place updates, defaults to the
                            SpamAssassin site rules directory
                            (default: @@LOCAL_STATE_DIR@@/@@VERSION@@)
@@ -39,21 +39,6 @@ index bb7396d..39f681f 100755
    -D, --debug [area=n,...]  Print debugging messages
    -v, --verbose           Be verbose, like print updated channel names;
 -- 
-diff --git a/lib/Mail/SpamAssassin/PerMsgStatus.pm b/lib/Mail/SpamAssassin/PerMsgStatus.pm
-index 6d8beaa..6ad87dc 100644
---- a/lib/Mail/SpamAssassin/PerMsgStatus.pm
-+++ b/lib/Mail/SpamAssassin/PerMsgStatus.pm
-@@ -389,7 +389,8 @@ sub check_timed {
-     if (!$self->{main}->have_plugin("check_main")) {
-       die "check: no loaded plugin implements 'check_main': cannot scan!\n".
-             "Check that the necessary '.pre' files are in the config directory.\n".
--              "At a minimum, v320.pre loads the Check plugin which is required.\n";
-+              "At a minimum, v320.pre loads the Check plugin which is required.\n".
-+              "NixOS: Since there is no '/etc/spamassassin' simply restart 'spamd.service' which on its behalf will run 'sa-learn --siteconfigpath=/nix/store/l4hr4yxk8mb4wbkha6vm6rh92pj19rj6-spamd-env ...' to update the /var/lib/spamassassin configs.\n";
-     }
-   }
- 
--- 
 
 2.12.2