dataset/seed/postfix-relay/templates/postfix.service

12 lines
529 B
SYSTEMD
Raw Normal View History

2022-03-08 19:42:28 +01:00
[Service]
ExecStartPre=/usr/sbin/postmap /etc/postfix/lmtp
ExecStartPre=/usr/sbin/postmap -F /etc/postfix/sni
%for %%local in %%postfix_relay_authentifications
%set %%user = %%normalize_family(%%local)
%set %%password = %%getVar('local_authentification_password_' + %%user)
2022-12-25 17:08:52 +01:00
%set %%ip = %%getVar('postfix_relay_ip_' + %%user)
2022-03-08 19:42:28 +01:00
ExecStartPre=-/usr/bin/bash -c "echo %%password | /usr/sbin/saslpasswd2 -u %%ip %%user -p"
%end for
ExecStartPre=/usr/bin/chown postfix: /etc/sasl2/sasldb2
PIDFile=/srv/postfix/spool/pid/master.pid