This commit is contained in:
mwiegand 2021-06-16 19:17:12 +02:00
parent ac25279276
commit 8de3f4f0eb
4 changed files with 28 additions and 17 deletions

View file

@ -4,11 +4,12 @@ Canonicalization relaxed/simple
KeyTable refile:/etc/opendkim/key_table KeyTable refile:/etc/opendkim/key_table
SigningTable refile:/etc/opendkim/signing_table SigningTable refile:/etc/opendkim/signing_table
UMask 002 UMask 007
UserID opendkim:opendkim UserID opendkim:opendkim
PidFile /var/run/opendkim/opendkim.pid PidFile /run/opendkim/opendkim.pid
Socket local:/var/run/opendkim/opendkim.sock Socket inet:8891@localhost
Syslog yes Syslog yes
SyslogSuccess Yes SyslogSuccess Yes
SyslogFacility mail
LogWhy Yes LogWhy Yes

View file

@ -48,16 +48,25 @@ files = {
for domain in node.metadata.get('opendkim/domains'): for domain in node.metadata.get('opendkim/domains'):
directories[f'/etc/opendkim/keys/{domain}'] = { directories[f'/etc/opendkim/keys/{domain}'] = {
**file_attributes, **file_attributes,
'purge': True,
}
files[f'/etc/opendkim/keys/{domain}/mail.private'] = {
**file_attributes,
'content_type': 'any',
}
files[f'/etc/opendkim/keys/{domain}/mail.txt'] = {
**file_attributes,
'content_type': 'any',
} }
actions[f'generate_{domain}_dkim_key'] = { actions[f'generate_{domain}_dkim_key'] = {
'command': ( 'command': (
'sudo --user opendkim' f'sudo --user opendkim'
' opendkim-genkey' f' opendkim-genkey'
f' --selector=mail'
f' --directory=/etc/opendkim/keys/{domain}' f' --directory=/etc/opendkim/keys/{domain}'
f' --domain={domain}' f' --domain={domain}'
), ),
'unless': f'test -f /etc/opendkim/keys/{domain}/default.private', 'unless': f'test -f /etc/opendkim/keys/{domain}/mail.private',
'needs': [ 'needs': [
'svc_systemd:opendkim', 'svc_systemd:opendkim',
f'directory:/etc/opendkim/keys/{domain}', f'directory:/etc/opendkim/keys/{domain}',

View file

@ -45,5 +45,5 @@ mua_helo_restrictions = permit_mynetworks, reject_non_fqdn_hostname, reject_inva
# opendkim # opendkim
milter_protocol = 2 milter_protocol = 2
milter_default_action = accept milter_default_action = accept
smtpd_milters = local:/var/run/opendkim/opendkim.sock smtpd_milters = inet:localhost:8891
non_smtpd_milters = local:/var/run/opendkim/opendkim.sock non_smtpd_milters = inet:localhost:8891

View file

@ -12,14 +12,15 @@
'metadata': { 'metadata': {
'opendkim': { 'opendkim': {
'domains': [ 'domains': [
"sublimity.de", 'mail2.sublimity.de',
"freibrief.net", # 'sublimity.de',
"nadenau.net", # 'freibrief.net',
"naeder.net", # 'nadenau.net',
"rolfwerner.eu", # 'naeder.net',
"wettengl.net", # 'rolfwerner.eu',
"wingl.de", # 'wettengl.net',
"woodpipe.de", # 'wingl.de',
# 'woodpipe.de',
], ],
}, },
'interfaces': { 'interfaces': {