projects/aports·blob master · refs

30 lines · 512 B

1#!/sbin/openrc-run
2name=nullmailer
3description="Nullmailer relay-only MTA"
4
5command=/usr/sbin/nullmailer-send
6command_user=nullmailer:nullmailer
7command_background=true
8pidfile=/run/nullmailer.pid
9
10depend() {
11 use net logger
12}
13
14checkconfig() {
15 local error=0
16 local f
17 for f in failed queue tmp; do
18 install -dm 0750 -o nullmailer /var/spool/nullmailer/$f
19 done
20 local f=/var/spool/nullmailer/trigger
21 if [ ! -p "$f" ]; then
22 mkfifo -m660 "$f"
23 chown nullmailer:mail "$f"
24 fi
25}
26
27start_pre() {
28 checkconfig
29}
30