bundles/postfix: add alias database
All checks were successful
bundlewrap/pipeline/head This commit looks good

This commit is contained in:
Franzi 2020-11-09 10:52:24 +01:00
parent d39cb5bd82
commit 3ff5d8a7dd
Signed by: kunsi
GPG key ID: 12E3D2136B818350
4 changed files with 26 additions and 0 deletions

View file

@ -0,0 +1,5 @@
root: hostmaster@kunbox.net
% for source, target in node.metadata.get('postfix', {}).get('aliases', {}).items():
${source}: ${', '.join(sorted(target))}
% endfor

View file

@ -11,6 +11,7 @@ mailbox_size_limit = 0
recipient_delimiter = +
inet_protocols = all
message_size_limit = ${node.metadata.get('postfix', {}).get('message_size_limit_mb', 10)*1024*1024}
alias_database = hash:/etc/aliases
% if node.has_bundle('postfixadmin'):
inet_interfaces = all

View file

@ -8,6 +8,12 @@ files = {
'svc_systemd:postfix:restart',
},
},
'/etc/aliases': {
'content_type': 'mako',
'triggers': {
'action:postfix_newaliases',
},
},
'/etc/postfix/master.cf': {
'content_type': 'mako',
'triggers': {
@ -22,6 +28,13 @@ files = {
},
}
actions = {
'postfix_newaliases': {
'command': 'newaliases',
'triggered': True,
},
}
svc_systemd = {
'postfix': {
'needs': {

View file

@ -19,6 +19,13 @@ defaults = {
'cron': {
'clamav-unofficial-sigs': f'{node.magic_number%60} */4 * * * clamav /usr/sbin/clamav-unofficial-sigs >/dev/null 2>&1',
},
'postfix': {
'aliases': {
'clamav': {
'root',
},
},
},
}