bundles/postfix: add alias database
All checks were successful
bundlewrap/pipeline/head This commit looks good
All checks were successful
bundlewrap/pipeline/head This commit looks good
This commit is contained in:
parent
d39cb5bd82
commit
3ff5d8a7dd
4 changed files with 26 additions and 0 deletions
5
bundles/postfix/files/aliases
Normal file
5
bundles/postfix/files/aliases
Normal 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
|
|
@ -11,6 +11,7 @@ mailbox_size_limit = 0
|
||||||
recipient_delimiter = +
|
recipient_delimiter = +
|
||||||
inet_protocols = all
|
inet_protocols = all
|
||||||
message_size_limit = ${node.metadata.get('postfix', {}).get('message_size_limit_mb', 10)*1024*1024}
|
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'):
|
% if node.has_bundle('postfixadmin'):
|
||||||
inet_interfaces = all
|
inet_interfaces = all
|
||||||
|
|
|
@ -8,6 +8,12 @@ files = {
|
||||||
'svc_systemd:postfix:restart',
|
'svc_systemd:postfix:restart',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
'/etc/aliases': {
|
||||||
|
'content_type': 'mako',
|
||||||
|
'triggers': {
|
||||||
|
'action:postfix_newaliases',
|
||||||
|
},
|
||||||
|
},
|
||||||
'/etc/postfix/master.cf': {
|
'/etc/postfix/master.cf': {
|
||||||
'content_type': 'mako',
|
'content_type': 'mako',
|
||||||
'triggers': {
|
'triggers': {
|
||||||
|
@ -22,6 +28,13 @@ files = {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
actions = {
|
||||||
|
'postfix_newaliases': {
|
||||||
|
'command': 'newaliases',
|
||||||
|
'triggered': True,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
svc_systemd = {
|
svc_systemd = {
|
||||||
'postfix': {
|
'postfix': {
|
||||||
'needs': {
|
'needs': {
|
||||||
|
|
|
@ -19,6 +19,13 @@ defaults = {
|
||||||
'cron': {
|
'cron': {
|
||||||
'clamav-unofficial-sigs': f'{node.magic_number%60} */4 * * * clamav /usr/sbin/clamav-unofficial-sigs >/dev/null 2>&1',
|
'clamav-unofficial-sigs': f'{node.magic_number%60} */4 * * * clamav /usr/sbin/clamav-unofficial-sigs >/dev/null 2>&1',
|
||||||
},
|
},
|
||||||
|
'postfix': {
|
||||||
|
'aliases': {
|
||||||
|
'clamav': {
|
||||||
|
'root',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue