dataset/seed/postfix-relay/templates/postfix.service
Emmanuel Garette 543ba30f8c reorganize
2022-08-18 10:19:43 +02:00

11 lines
508 B
Desktop File

[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)
%set %%ip = %%get_ip(%%local)
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