Skip to content

Commit 7cac955

Browse files
committed
feat: Remove echobot special cases
1 parent c84ddf6 commit 7cac955

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

chatmaild/src/chatmaild/lastlogin.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ def handle_set(self, addr, parts):
1313
keyname = parts[1].split("/")
1414
value = parts[2] if len(parts) > 2 else ""
1515
if keyname[0] == "shared" and keyname[1] == "last-login":
16-
if addr.startswith("echo@"):
17-
return True
1816
addr = keyname[2]
1917
timestamp = int(value)
2018
user = self.config.get_user(addr)

chatmaild/src/chatmaild/user.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def __init__(self, maildir, addr, password_path, uid, gid):
1919

2020
@property
2121
def can_track(self):
22-
return "@" in self.addr and not self.addr.startswith("echo@")
22+
return "@" in self.addr
2323

2424
def get_userdb_dict(self):
2525
"""Return a non-empty dovecot 'userdb' style dict
@@ -55,11 +55,9 @@ def set_password(self, enc_password):
5555
try:
5656
write_bytes_atomic(self.password_path, password)
5757
except PermissionError:
58-
if not self.addr.startswith("echo@"):
59-
logging.error(f"could not write password for: {self.addr}")
60-
raise
61-
if not self.addr.startswith("echo@"):
62-
self.enforce_E2EE_path.touch()
58+
logging.error(f"could not write password for: {self.addr}")
59+
raise
60+
self.enforce_E2EE_path.touch()
6361

6462
def set_last_login_timestamp(self, timestamp):
6563
"""Track login time with daily granularity

0 commit comments

Comments
 (0)