mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-21 04:42:07 +03:00
spamassassin: use a dedicated user for running spamd
This commit is contained in:
parent
2769f594f3
commit
51e58dafca
@ -73,6 +73,7 @@ in
|
|||||||
fprot = 52;
|
fprot = 52;
|
||||||
bind = 53;
|
bind = 53;
|
||||||
wwwrun = 54;
|
wwwrun = 54;
|
||||||
|
spamd = 55;
|
||||||
|
|
||||||
# When adding a uid, make sure it doesn't match an existing gid.
|
# When adding a uid, make sure it doesn't match an existing gid.
|
||||||
|
|
||||||
|
@ -33,11 +33,17 @@ in
|
|||||||
# Allow users to run 'spamc'.
|
# Allow users to run 'spamc'.
|
||||||
environment.systemPackages = [ pkgs.spamassassin ];
|
environment.systemPackages = [ pkgs.spamassassin ];
|
||||||
|
|
||||||
|
users.extraUsers = singleton
|
||||||
|
{ name = "spamd";
|
||||||
|
description = "Spam Assassin Daemon";
|
||||||
|
uid = config.ids.uids.spamd;
|
||||||
|
};
|
||||||
|
|
||||||
jobs.spamd = {
|
jobs.spamd = {
|
||||||
description = "Spam Assassin Server";
|
description = "Spam Assassin Server";
|
||||||
startOn = "started networking and filesystem";
|
startOn = "started networking and filesystem";
|
||||||
environment.TZ = config.time.timeZone;
|
environment.TZ = config.time.timeZone;
|
||||||
exec = "${pkgs.spamassassin}/bin/spamd -C /etc/spamassassin/init.pre --siteconfigpath=/etc/spamassassin --debug --pidfile=/var/run/spamd.pid";
|
exec = "${pkgs.spamassassin}/bin/spamd -C /etc/spamassassin/init.pre --siteconfigpath=/etc/spamassassin --username=spamd --pidfile=/var/run/spamd.pid";
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user