2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 03:06:37 +00:00

49_Arlo.pm: delete old 2FA mails before login

git-svn-id: https://svn.fhem.de/fhem/trunk@28062 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
maluk 2023-10-17 18:10:00 +00:00
parent abc7491b44
commit 1680e2cb17

View File

@ -165,6 +165,9 @@ class TfaMailCheck:
res, ids = self._imap.search(None, "FROM", "do_not_reply@arlo.com")
for msg_id in ids[0].split():
self._determine_code_and_delete_mail(msg_id)
if res.lower() == "ok" and len(ids) > 0:
self._imap.close()
res, status = self._imap.select()
if res.lower() != "ok":
return False