2020-11-07 21:31:47 +00:00
|
|
|
# Postfix bundle creates metadata and directories which are also used
|
|
|
|
# by this bundle
|
2021-04-02 16:57:13 +00:00
|
|
|
repo.libs.tools.require_bundle(node, 'postfix')
|
2020-11-07 21:31:47 +00:00
|
|
|
|
|
|
|
files = {
|
|
|
|
'/etc/dovecot/dovecot.conf': {
|
|
|
|
'content_type': 'mako',
|
|
|
|
'context': {
|
|
|
|
'admin_email': node.metadata['dovecot']['admin_email'],
|
|
|
|
},
|
|
|
|
'needs': {
|
|
|
|
'pkg_apt:'
|
|
|
|
},
|
|
|
|
'triggers': {
|
|
|
|
'svc_systemd:dovecot:restart',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'/etc/dovecot/dovecot-sql.conf': {
|
|
|
|
'content_type': 'mako',
|
|
|
|
'context': node.metadata['dovecot']['database'],
|
|
|
|
'needs': {
|
|
|
|
'pkg_apt:'
|
|
|
|
},
|
|
|
|
'triggers': {
|
|
|
|
'svc_systemd:dovecot:restart',
|
|
|
|
},
|
|
|
|
},
|
2021-08-21 05:31:22 +00:00
|
|
|
'/etc/dovecot/conf.d/auth-system.conf.ext': {
|
|
|
|
'delete': True,
|
|
|
|
'needs': {
|
|
|
|
'pkg_apt:'
|
|
|
|
},
|
|
|
|
'triggers': {
|
|
|
|
'svc_systemd:dovecot:restart',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'/etc/dovecot/conf.d/10-auth.conf': {
|
|
|
|
'delete': True,
|
|
|
|
'needs': {
|
|
|
|
'pkg_apt:'
|
|
|
|
},
|
|
|
|
'triggers': {
|
|
|
|
'svc_systemd:dovecot:restart',
|
|
|
|
},
|
|
|
|
},
|
2020-11-07 21:31:47 +00:00
|
|
|
}
|
|
|
|
|
2024-04-14 10:05:58 +00:00
|
|
|
symlinks['/usr/lib/dovecot/decode2text.sh'] = {
|
|
|
|
'target': '/usr/share/doc/dovecot-core/examples/decode2text.sh',
|
|
|
|
'before': {
|
|
|
|
'svc_systemd:dovecot',
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2020-11-07 21:31:47 +00:00
|
|
|
svc_systemd = {
|
|
|
|
'dovecot': {
|
|
|
|
'needs': {
|
2024-05-05 13:49:45 +00:00
|
|
|
'action:generate-dhparam',
|
2020-11-07 21:31:47 +00:00
|
|
|
'file:/etc/dovecot/dovecot.conf',
|
|
|
|
'file:/etc/dovecot/dovecot-sql.conf',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
if node.has_bundle('rspamd'):
|
|
|
|
files['/var/mail/vmail/sieve/global/learn-ham.sieve'] = {
|
|
|
|
'owner': 'nobody',
|
|
|
|
'group': 'nogroup',
|
|
|
|
}
|
|
|
|
files['/var/mail/vmail/sieve/global/learn-spam.sieve'] = {
|
|
|
|
'owner': 'nobody',
|
|
|
|
'group': 'nogroup',
|
|
|
|
}
|
|
|
|
files['/var/mail/vmail/sieve/global/spam-global.sieve'] = {
|
|
|
|
'owner': 'nobody',
|
|
|
|
'group': 'nogroup',
|
|
|
|
}
|