bundles/dovecot: add iptables config

This commit is contained in:
Franzi 2021-03-21 11:12:03 +01:00
parent 5775001301
commit 31ddea7649
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -1,3 +1,5 @@
from bundlewrap.metadata import atomic
defaults = {
'apt': {
'packages': {
@ -60,3 +62,22 @@ def import_database_settings_from_postfixadmin(metadata):
},
},
}
@metadata_reactor.provides(
'iptables/port_rules/143',
'iptables/port_rules/993',
'iptables/port_rules/4190',
)
def iptables(metadata):
return {
'iptables': {
'port_rules': {
# imap(s)
'143': atomic(metadata.get('dovecot/restrict-to', set('*'))),
'993': atomic(metadata.get('dovecot/restrict-to', set('*'))),
# managesieve
'4190': atomic(metadata.get('dovecot/restrict-to', set('*'))),
},
},
}