summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mail-filter/spamassassin/files/spamassassin.service-r410
-rw-r--r--mail-filter/spamassassin/files/spamassassin.service.conf-r22
-rw-r--r--mail-filter/spamassassin/spamassassin-3.4.1-r19.ebuild (renamed from mail-filter/spamassassin/spamassassin-3.4.1-r18.ebuild)10
3 files changed, 18 insertions, 4 deletions
diff --git a/mail-filter/spamassassin/files/spamassassin.service-r4 b/mail-filter/spamassassin/files/spamassassin.service-r4
new file mode 100644
index 000000000000..b539cd2bb5a3
--- /dev/null
+++ b/mail-filter/spamassassin/files/spamassassin.service-r4
@@ -0,0 +1,10 @@
+[Unit]
+Description=Spamassassin daemon
+After=network.target
+
+[Service]
+ExecStart=/usr/sbin/spamd $SPAMD_OPTS
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/mail-filter/spamassassin/files/spamassassin.service.conf-r2 b/mail-filter/spamassassin/files/spamassassin.service.conf-r2
new file mode 100644
index 000000000000..442dde44e078
--- /dev/null
+++ b/mail-filter/spamassassin/files/spamassassin.service.conf-r2
@@ -0,0 +1,2 @@
+[Service]
+Environment="SPAMD_OPTS=--username=spamd --groupname=spamd --max-children=5 --create-prefs --helper-home-dir"
diff --git a/mail-filter/spamassassin/spamassassin-3.4.1-r18.ebuild b/mail-filter/spamassassin/spamassassin-3.4.1-r19.ebuild
index 49b14da50159..2f2e31f1087d 100644
--- a/mail-filter/spamassassin/spamassassin-3.4.1-r18.ebuild
+++ b/mail-filter/spamassassin/spamassassin-3.4.1-r19.ebuild
@@ -159,8 +159,8 @@ src_install () {
newinitd "${FILESDIR}/3.4.1-spamd.init-r2" spamd
newconfd "${FILESDIR}/3.4.1-spamd.conf-r1" spamd
- systemd_newunit "${FILESDIR}/${PN}.service-r3" "${PN}.service"
- systemd_install_serviced "${FILESDIR}/${PN}.service.conf-r1" \
+ systemd_newunit "${FILESDIR}/${PN}.service-r4" "${PN}.service"
+ systemd_install_serviced "${FILESDIR}/${PN}.service.conf-r2" \
"${PN}.service"
use postgres && dodoc sql/*_pg.sql
@@ -243,7 +243,9 @@ pkg_postinst() {
elog
ewarn 'If this version of SpamAssassin causes permissions issues'
- ewarn 'with your user configurations or bayes databases, you may'
- ewarn 'need to set SPAMD_RUN_AS_ROOT=true in your OpenRC service'
+ ewarn 'with your user configurations or bayes databases, then you'
+ ewarn 'may need to set SPAMD_RUN_AS_ROOT=true in your OpenRC service'
+ ewarn 'configuration file, or remove the --username and --groupname'
+ ewarn 'flags from the SPAMD_OPTS variable in your systemd service'
ewarn 'configuration file.'
}