Update postfix config

This commit is contained in:
Benoit S 2021-09-04 21:15:21 +09:00
parent b54883abd0
commit a3240a774a

View file

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