You've already forked Mailu
mirror of
https://github.com/Mailu/Mailu.git
synced 2025-07-13 01:20:28 +02:00
DKIM signing of alternative domains
When rspamd looks up the DKIM key of the domains, also the alternative domains are queried. In case there is a match, the admin container is providing the DKIM key of the domain belonging to the alternative domain. file modified: core/admin/mailu/internal/views/rspamd.py
This commit is contained in:
@ -24,6 +24,15 @@ def rspamd_dkim_key(domain_name):
|
|||||||
'selector': flask.current_app.config.get('DKIM_SELECTOR', 'dkim'),
|
'selector': flask.current_app.config.get('DKIM_SELECTOR', 'dkim'),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
elif domain := models.Alternative.query.get(domain_name):
|
||||||
|
if key := domain.domain.dkim_key:
|
||||||
|
selectors.append(
|
||||||
|
{
|
||||||
|
'domain' : domain.name,
|
||||||
|
'key' : key.decode('utf8'),
|
||||||
|
'selector': flask.current_app.config.get('DKIM_SELECTOR', 'dkim'),
|
||||||
|
}
|
||||||
|
)
|
||||||
return flask.jsonify({'data': {'selectors': selectors}})
|
return flask.jsonify({'data': {'selectors': selectors}})
|
||||||
|
|
||||||
@internal.route("/rspamd/local_domains", methods=['GET'])
|
@internal.route("/rspamd/local_domains", methods=['GET'])
|
||||||
|
Reference in New Issue
Block a user