mirror of
https://github.com/chatmail/relay.git
synced 2026-08-29 19:43:14 +00:00
enforce encryption for in-server mails (#535)
* enforce encryption for in-server mails * make tests work with chatmail server only support e2ee internally * fix echobot test * simplify quota-exceeded test * work around rpc-server fixture changes
This commit is contained in:
@@ -72,9 +72,8 @@ def maildata(request):
|
||||
def maildata(name, from_addr, to_addr, subject="[...]"):
|
||||
# Using `.read_bytes().decode()` instead of `.read_text()` to preserve newlines.
|
||||
data = datadir.joinpath(name).read_bytes().decode()
|
||||
|
||||
text = data.format(from_addr=from_addr, to_addr=to_addr, subject=subject)
|
||||
return BytesParser(policy=policy.default).parsebytes(text.encode())
|
||||
return BytesParser(policy=policy.SMTP).parsebytes(text.encode())
|
||||
|
||||
return maildata
|
||||
|
||||
|
||||
Reference in New Issue
Block a user