mirror of
https://github.com/Mailu/Mailu.git
synced 2025-01-16 02:46:44 +02:00
save dkim key after creation
This commit is contained in:
parent
f8db4a0531
commit
54b46a13c6
@ -272,7 +272,7 @@ class Domain(Base):
|
||||
return dkim.strip_key(dkim_key).decode('utf8')
|
||||
|
||||
def generate_dkim_key(self):
|
||||
""" generate and activate new DKIM key """
|
||||
""" generate new DKIM key """
|
||||
self.dkim_key = dkim.gen_key()
|
||||
|
||||
def has_email(self, localpart):
|
||||
|
@ -74,6 +74,8 @@ def domain_details(domain_name):
|
||||
def domain_genkeys(domain_name):
|
||||
domain = models.Domain.query.get(domain_name) or flask.abort(404)
|
||||
domain.generate_dkim_key()
|
||||
models.db.session.add(domain)
|
||||
models.db.session.commit()
|
||||
return flask.redirect(
|
||||
flask.url_for(".domain_details", domain_name=domain_name))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user