Merge pull request #50 from ticketfrei/rate-limit-39

missing newlines in /etc/aliases
This commit is contained in:
b3yond 2018-10-07 23:05:52 +02:00 committed by GitHub
commit 9a3c09b119
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

2
db.py
View file

@ -252,7 +252,7 @@ u\d\d?"""
else: else:
uid = json['uid'] uid = json['uid']
with open("/etc/aliases", "a+") as f: with open("/etc/aliases", "a+") as f:
f.write(city + ": " + config["mail"]["mbox_user"]) f.write(city + ": " + config["mail"]["mbox_user"] + "\n")
self.execute("INSERT INTO email (user_id, email) VALUES(?, ?);", self.execute("INSERT INTO email (user_id, email) VALUES(?, ?);",
(uid, json['email'])) (uid, json['email']))
self.execute("""INSERT INTO telegram_accounts (user_id, apikey, self.execute("""INSERT INTO telegram_accounts (user_id, apikey,