e2e: find m2 by header fetch
This commit is contained in:
1 parent
f723e1eaa8
commit
d4d7d2e623
1 file changed
+4
-2
@@ -79,8 +79,10 @@ def late():
|
||||
a = old("alice", "alicepass")
|
||||
append(a, "INBOX", msg("late@test", "arrived after the bulk copy"))
|
||||
a.select("INBOX")
|
||||
typ, data = a.search(None, "HEADER", "Message-ID", "<m2@test>")
|
||||
a.store(data[0].split()[0], "+FLAGS", r"(\Seen)")
|
||||
# Find m2 by its header (Stalwart's HEADER search is full-text, not substring).
|
||||
typ, data = a.fetch("1:*", "(BODY.PEEK[HEADER.FIELDS (MESSAGE-ID)])")
|
||||
seq = next(item[0].split()[0] for item in data if isinstance(item, tuple) and b"<m2@test>" in item[1])
|
||||
a.store(seq, "+FLAGS", r"(\Seen)")
|
||||
a.logout()
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user