[Unit]
Description=GNU Mailing List Manager
After=syslog.target network.target postgresql.service

[Service]
Type=forking
PIDFile={{ mailman_root_dir }}/tmp/master.pid
Environment=MAILMAN_CONFIG_FILE={{ mailman_root_dir }}/etc/mailman.cfg
User={{ mailman_user }}
Group={{ mailman_user }}
ExecStart={{ mailman_root_dir }}/venv/bin/mailman start
ExecReload={{ mailman_root_dir }}/venv/bin/mailman restart
ExecStop={{ mailman_root_dir }}/venv/bin/mailman stop
PrivateTmp=yes
ProtectSystem=full
ProtectHome=yes
NoNewPrivileges=yes
MemoryLimit=2048M
Restart=on-failure
StartLimitInterval=0
RestartSec=30

[Install]
WantedBy=multi-user.target
