Browse Source

Update postfix config

lxd-local
Benoît S. 2 months ago
parent
commit
a3240a774a
  1. 66
      setup-base.py

66
setup-base.py

@ -50,31 +50,47 @@ apt.packages(
update=False,
)
#files.line(
# name='Enable postfix relays to mail.benpro.fr',
# path='/etc/postfix/main.cf',
# line=r'relayhost = .*',
# replace='relayhost = 10.0.0.2',
#)
#
#files.line(
# name='Set root aliases',
# path='/etc/aliases',
# line='root: lxd10@benpro.fr',
#)
#
#server.shell(
# name='Load aliases table',
# commands=['newaliases'],
#)
#
#systemd.service(
# name='Restart and enable postfix service',
# service='postfix.service',
# running=True,
# restarted=True,
# enabled=True,
#)
files.put(
name='Add postfix conf with relay to mail.benpro.fr',
src='files/main.cf',
dest='/etc/postfix/main.cf',
user='root',
group='root',
mode='644',
)
files.put(
name='Add postfix sasl_passwd',
src='files/sasl_passwd',
dest='/etc/postfix/sasl_passwd',
user='root',
group='root',
mode='400',
)
server.shell(
name='Postmap sasl_passwd',
commands=['postmap hash:/etc/postfix/sasl_passwd'],
)
files.line(
name='Set root aliases',
path='/etc/aliases',
line='root: lxd@benpro.fr',
)
server.shell(
name='Load aliases table',
commands=['newaliases'],
)
systemd.service(
name='Restart and enable postfix service',
service='postfix.service',
running=True,
restarted=True,
enabled=True,
)
if not host.fact.directory('/var/snap/lxd'):
server.shell(

Loading…
Cancel
Save