We want to relay mails from the container to localhost (the LXC host mail system)
This commit is contained in:
parent
177ae83795
commit
d625d840a9
|
@ -88,10 +88,10 @@
|
||||||
when: name != 'php73'
|
when: name != 'php73'
|
||||||
|
|
||||||
- name: Configure opensmtpd
|
- name: Configure opensmtpd
|
||||||
replace:
|
template:
|
||||||
name: "/var/lib/lxc/{{name}}/rootfs/etc/smtpd.conf"
|
src: smtpd.conf.j2
|
||||||
regexp: "^listen.*"
|
dest: "/var/lib/lxc/{{name}}/rootfs/etc/smtpd.conf"
|
||||||
replace: "#listen on localhost"
|
mode: "0644"
|
||||||
notify: "Restart opensmtpd"
|
notify: "Restart opensmtpd"
|
||||||
when: name == 'php73'
|
when: name == 'php73'
|
||||||
|
|
||||||
|
|
14
lxc-php/templates/smtpd.conf.j2
Normal file
14
lxc-php/templates/smtpd.conf.j2
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
# 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
|
||||||
|
|
||||||
|
# Uncomment the following to accept external mail for domain "example.org"
|
||||||
|
#accept from any for domain "example.org" alias <aliases> deliver to mbox
|
||||||
|
|
||||||
|
accept for local alias <aliases> deliver to mbox
|
||||||
|
accept for any relay via "smtp://127.0.0.1"
|
Loading…
Reference in a new issue