about summary refs log tree commit diff
path: root/modules/services/mail
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2012-09-27 17:12:25 +0200
committerPeter Simons <simons@cryp.to>2012-09-27 17:12:25 +0200
commitbcb80387265e9a3865c0dc346631690c8c4da606 (patch)
tree27ba90d927e51a43f6ba9369495c4a7027a0b749 /modules/services/mail
parent9d83b8897bf616dd6f83b8627e5d2edd2e58f777 (diff)
downloadnixlib-bcb80387265e9a3865c0dc346631690c8c4da606.tar
nixlib-bcb80387265e9a3865c0dc346631690c8c4da606.tar.gz
nixlib-bcb80387265e9a3865c0dc346631690c8c4da606.tar.bz2
nixlib-bcb80387265e9a3865c0dc346631690c8c4da606.tar.lz
nixlib-bcb80387265e9a3865c0dc346631690c8c4da606.tar.xz
nixlib-bcb80387265e9a3865c0dc346631690c8c4da606.tar.zst
nixlib-bcb80387265e9a3865c0dc346631690c8c4da606.zip
spamassassin: add option for running the spamd daemon in debug mode
Diffstat (limited to 'modules/services/mail')
-rw-r--r--modules/services/mail/spamassassin.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/services/mail/spamassassin.nix b/modules/services/mail/spamassassin.nix
index ecbb5dc31054..9e378ab0f20c 100644
--- a/modules/services/mail/spamassassin.nix
+++ b/modules/services/mail/spamassassin.nix
@@ -21,6 +21,11 @@ in
         description = "Whether to run the SpamAssassin daemon.";
       };
 
+      debug = mkOption {
+        default = false;
+        description = "Whether to run the SpamAssassin daemon in debug mode.";
+      };
+
     };
 
   };
@@ -43,7 +48,7 @@ in
       description = "Spam Assassin Server";
       startOn = "started networking and filesystem";
       environment.TZ = config.time.timeZone;
-      exec = "${pkgs.spamassassin}/bin/spamd -D --username=spamd --pidfile=/var/run/spamd.pid";
+      exec = "${pkgs.spamassassin}/bin/spamd ${optionalString cfg.debug "-D"} --username=spamd --pidfile=/var/run/spamd.pid";
     };
 
   };