mirror of
https://github.com/chatmail/relay.git
synced 2026-05-10 16:04:37 +00:00
feat: Remove echobot special cases
This commit is contained in:
committed by
holger krekel
parent
9bf99cc8a9
commit
49c66116bf
@@ -13,8 +13,6 @@ class LastLoginDictProxy(DictProxy):
|
|||||||
keyname = parts[1].split("/")
|
keyname = parts[1].split("/")
|
||||||
value = parts[2] if len(parts) > 2 else ""
|
value = parts[2] if len(parts) > 2 else ""
|
||||||
if keyname[0] == "shared" and keyname[1] == "last-login":
|
if keyname[0] == "shared" and keyname[1] == "last-login":
|
||||||
if addr.startswith("echo@"):
|
|
||||||
return True
|
|
||||||
addr = keyname[2]
|
addr = keyname[2]
|
||||||
timestamp = int(value)
|
timestamp = int(value)
|
||||||
user = self.config.get_user(addr)
|
user = self.config.get_user(addr)
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class User:
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def can_track(self):
|
def can_track(self):
|
||||||
return "@" in self.addr and not self.addr.startswith("echo@")
|
return "@" in self.addr
|
||||||
|
|
||||||
def get_userdb_dict(self):
|
def get_userdb_dict(self):
|
||||||
"""Return a non-empty dovecot 'userdb' style dict
|
"""Return a non-empty dovecot 'userdb' style dict
|
||||||
@@ -55,10 +55,8 @@ class User:
|
|||||||
try:
|
try:
|
||||||
write_bytes_atomic(self.password_path, password)
|
write_bytes_atomic(self.password_path, password)
|
||||||
except PermissionError:
|
except PermissionError:
|
||||||
if not self.addr.startswith("echo@"):
|
|
||||||
logging.error(f"could not write password for: {self.addr}")
|
logging.error(f"could not write password for: {self.addr}")
|
||||||
raise
|
raise
|
||||||
if not self.addr.startswith("echo@"):
|
|
||||||
self.enforce_E2EE_path.touch()
|
self.enforce_E2EE_path.touch()
|
||||||
|
|
||||||
def set_last_login_timestamp(self, timestamp):
|
def set_last_login_timestamp(self, timestamp):
|
||||||
|
|||||||
Reference in New Issue
Block a user