untested code that may just work

main
Florent Daigniere 2 years ago
parent 5ebcecf4dd
commit 8775a2bf04

@ -25,3 +25,8 @@ def rspamd_dkim_key(domain_name):
} }
) )
return flask.jsonify({'data': {'selectors': selectors}}) return flask.jsonify({'data': {'selectors': selectors}})
@internal.route("/rspamd/local_domains", methods=['GET'])
def rspamd_local_domains():
domains = set(models.Domain.query.all() + models.Alternative.query.all())
return '\n'.join(domains)

@ -0,0 +1,8 @@
rules {
BLACKLIST_ANTISPOOF = {
valid_dmarc = true;
blacklist = true;
domains = "http://{{ ADMIN_ADDRESS }}/internal/rspamd/local_domains";
score = 15.0;
}
}
Loading…
Cancel
Save