From 1902c40c3cf8d8de82dd47131bffd193b79b60c8 Mon Sep 17 00:00:00 2001 From: Mathieu Trossevin Date: Fri, 5 Nov 2021 11:34:21 +0100 Subject: [PATCH] lxc-php: Fix config for opensmtpd on bullseye --- CHANGELOG.md | 3 ++- lxc-php/tasks/mail_opensmtpd.yml | 10 ++++++++++ lxc-php/templates/smtpd.conf.bullseye.j2 | 17 +++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 lxc-php/templates/smtpd.conf.bullseye.j2 diff --git a/CHANGELOG.md b/CHANGELOG.md index 7284a7a1..2ab40fd7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,8 +34,9 @@ The **patch** part changes is incremented if multiple releases happen the same m * evolinux-base: fix alert5.service dependency syntax * mysql : Create a default ~root/.my.cnf for compatibility reasons * nginx : fix variable name and debug to actually use nginx-light -* packweb-apache : Support php 8.0 +* packweb-apache : Support php 8.0 * nagios-nrpe: Fix check\_nfsserver for buster and bullseye +* lxc-php: fix config for opensmtpd on bullseye containers ### Removed diff --git a/lxc-php/tasks/mail_opensmtpd.yml b/lxc-php/tasks/mail_opensmtpd.yml index 1b4dbea0..25dec9ea 100644 --- a/lxc-php/tasks/mail_opensmtpd.yml +++ b/lxc-php/tasks/mail_opensmtpd.yml @@ -11,3 +11,13 @@ dest: "/var/lib/lxc/{{ lxc_php_version }}/rootfs/etc/smtpd.conf" mode: "0644" notify: "Restart opensmtpd" + when: lxc_php_container_releases[lxc_php_version] in ["jessie", "stretch", "buster"] + + +- name: "{{ lxc_php_version }} - Configure opensmtpd (in the container)" + template: + src: smtpd.conf.bullseye.j2 + dest: "/var/lib/lxc/{{ lxc_php_version }}/rootfs/etc/smtpd.conf" + mode: "0644" + notify: "Restart opensmtpd" + when: not lxc_php_container_releases[lxc_php_version] in ["jessie", "stretch", "buster"] diff --git a/lxc-php/templates/smtpd.conf.bullseye.j2 b/lxc-php/templates/smtpd.conf.bullseye.j2 new file mode 100644 index 00000000..0a6d658f --- /dev/null +++ b/lxc-php/templates/smtpd.conf.bullseye.j2 @@ -0,0 +1,17 @@ +# This is the smtpd server system-wide configuration file. +# See smtpd.conf(5) for more information. + +# To accept external mail, replace with: listen on all +#listen on localhost + +# If you edit the file, you have to run "smtpctl update table aliases" +table aliases file:/etc/aliases + +action "mbox" mbox alias +action "relay" relay host "smtp://127.0.0.1" + +# Uncomment the following to accept external mail for domain "example.org" +#match from any for domain "example.org" action "mbox" + +match for local action "mbox" +match for any action "relay"