wip
This commit is contained in:
parent
742d3db032
commit
0230dd4762
1 changed files with 25 additions and 0 deletions
|
@ -15,8 +15,16 @@ defaults = {
|
|||
'domains': [],
|
||||
'keys': {},
|
||||
},
|
||||
'dns': {
|
||||
'mail._domainkey.mail2.sublimity.de': {
|
||||
'TXT': [
|
||||
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@metadata_reactor.provides(
|
||||
'opendkim/keys'
|
||||
)
|
||||
|
@ -66,3 +74,20 @@ def keys(metadata):
|
|||
'keys': keys,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@metadata_reactor.provides(
|
||||
'opendkim/keys'
|
||||
)
|
||||
def dns(metadata):
|
||||
dns = {}
|
||||
|
||||
for domain, keys in metadata.get('opendkim/keys').items():
|
||||
raw_key = keys['public'].replace('ssh-rsa ', '')
|
||||
dns[f'mail._domainkey.{domain}'] = {
|
||||
'TXT': f'v=DKIM1; k=rsa; p={raw_key}',
|
||||
}
|
||||
|
||||
return {
|
||||
'dns': dns,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue