bundles/postfix: add feature to block email recipients
This commit is contained in:
parent
57c76e5eba
commit
ee58509e93
3 changed files with 28 additions and 0 deletions
|
@ -39,6 +39,16 @@ files = {
|
|||
'action:postfix_newaliases',
|
||||
},
|
||||
},
|
||||
'/etc/postfix/blocked_recipients': {
|
||||
'content_type': 'mako',
|
||||
'context': {
|
||||
'blocked': node.metadata.get('postfix/blocked_recipients', set()),
|
||||
},
|
||||
'triggers': {
|
||||
'action:postfix_postmap_blocked_recipients',
|
||||
'svc_systemd:postfix:restart',
|
||||
},
|
||||
},
|
||||
'/etc/postfix/master.cf': {
|
||||
'content_type': 'mako',
|
||||
'triggers': {
|
||||
|
@ -74,6 +84,19 @@ actions = {
|
|||
'needs': {
|
||||
my_package,
|
||||
},
|
||||
'before': {
|
||||
'svc_systemd:postfix',
|
||||
},
|
||||
},
|
||||
'postfix_postmap_blocked_recipients': {
|
||||
'command': 'postmap hash:/etc/postfix/blocked_recipients',
|
||||
'triggered': True,
|
||||
'needs': {
|
||||
my_package,
|
||||
},
|
||||
'before': {
|
||||
'svc_systemd:postfix',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue