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

13 lines
790 B
SYSTEMD
Raw Permalink 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
2023-06-23 08:12:05 +02:00
{% for local in general.postfix.postfix_relay_authentifications %}
2024-09-10 13:41:03 +02:00
{% set local_norm = local|normalize_family %}
{% set user = general.postfix['local_authentification_' + local_norm]['local_authentification_username_' + local_norm] %}
{% set password = general.postfix['local_authentification_' + local_norm]['local_authentification_password_' + local_norm] %}
{% set ip = general.postfix['local_authentification_' + local_norm]['postfix_relay_ip_' + local_norm] %}
2023-06-23 08:12:05 +02:00
ExecStartPre=-/usr/bin/bash -c "echo {{ password }} | /usr/sbin/saslpasswd2 -u {{ ip }} {{ user }} -p"
{% endfor %}
2022-03-08 19:42:28 +01:00
ExecStartPre=/usr/bin/chown postfix: /etc/sasl2/sasldb2
PIDFile=/srv/postfix/spool/pid/master.pid