reload aliases table after appending

This commit is contained in:
missytake 2020-07-15 21:01:29 +02:00
parent 26def0a845
commit 337d5d4330

4
db.py
View file

@ -245,6 +245,10 @@ u\d\d?"""
uid = json['uid']
with open("/etc/aliases", "a+") as f:
f.write(city + ": " + config["mail"]["mbox_user"] + "\n")
try:
os.system("newaliases")
except:
logger.exception()
self.execute("INSERT INTO email (user_id, email) VALUES(?, ?);",
(uid, json['email']))
self.execute("""INSERT INTO telegram_accounts (user_id, apikey,