Initial version of a SpamAssassin service.

The configuration is expected to be managed by the user in /etc/spamassassin.
wip/yesman
Peter Simons 12 years ago
parent 1fcef0a0e0
commit 1b249eaf05
  1. 1
      modules/module-list.nix
  2. 45
      modules/services/mail/spamassassin.nix

@ -88,6 +88,7 @@
./services/mail/freepops.nix
./services/mail/mail.nix
./services/mail/postfix.nix
./services/mail/spamassassin.nix
./services/misc/autofs.nix
./services/misc/disnix.nix
./services/misc/felix.nix

@ -0,0 +1,45 @@
{ config, pkgs, ... }:
with pkgs.lib;
let
cfg = config.services.spamassassin;
in
{
###### interface
options = {
services.spamassassin = {
enable = mkOption {
default = false;
description = "Whether to run the SpamAssassin daemon.";
};
};
};
###### implementation
config = mkIf cfg.enable {
# This makes comfortable for users to run 'spamassassin'.
environment.systemPackages = [ pkgs.spamassassin ];
jobs.spamd = {
description = "Spam Assassin Server";
startOn = "started networking and filesystem";
environment.TZ = config.time.timeZone;
exec = "spamd -C /etc/spamassassin/init.pre --siteconfigpath=/etc/spamassassin --debug --pidfile=/var/run/spamd.pid";
};
};
}
Loading…
Cancel
Save