mirror of
https://github.com/chatmail/relay.git
synced 2026-05-11 16:34:39 +00:00
Compare commits
1 Commits
hpk/debug3
...
hpk/fix-te
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
136385f991 |
@@ -350,9 +350,7 @@ def _configure_dovecot(config: Config, debug: bool = False) -> bool:
|
|||||||
need_restart |= lua_push_notification_script.changed
|
need_restart |= lua_push_notification_script.changed
|
||||||
|
|
||||||
sieve_script = files.put(
|
sieve_script = files.put(
|
||||||
src=importlib.resources.files(__package__).joinpath(
|
src=importlib.resources.files(__package__).joinpath("dovecot/default.sieve"),
|
||||||
"dovecot/default.sieve"
|
|
||||||
),
|
|
||||||
dest="/etc/dovecot/default.sieve",
|
dest="/etc/dovecot/default.sieve",
|
||||||
user="root",
|
user="root",
|
||||||
group="root",
|
group="root",
|
||||||
@@ -361,10 +359,8 @@ def _configure_dovecot(config: Config, debug: bool = False) -> bool:
|
|||||||
need_restart |= sieve_script.changed
|
need_restart |= sieve_script.changed
|
||||||
if sieve_script.changed:
|
if sieve_script.changed:
|
||||||
server.shell(
|
server.shell(
|
||||||
name=f"compile sieve script",
|
name="compile sieve script",
|
||||||
commands=[
|
commands=["/usr/bin/sievec /etc/dovecot/default.sieve"],
|
||||||
f"/usr/bin/sievec /etc/dovecot/default.sieve"
|
|
||||||
],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
files.template(
|
files.template(
|
||||||
@@ -457,7 +453,9 @@ def check_config(config):
|
|||||||
blocked_words = "merlinux schmieder testrun.org".split()
|
blocked_words = "merlinux schmieder testrun.org".split()
|
||||||
for key in config.__dict__:
|
for key in config.__dict__:
|
||||||
value = config.__dict__[key]
|
value = config.__dict__[key]
|
||||||
if key.startswith("privacy") and any(x in str(value) for x in blocked_words):
|
if key.startswith("privacy") and any(
|
||||||
|
x in str(value) for x in blocked_words
|
||||||
|
):
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
f"please set your own privacy contacts/addresses in {config._inipath}"
|
f"please set your own privacy contacts/addresses in {config._inipath}"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ import importlib
|
|||||||
import subprocess
|
import subprocess
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
from typing import Optional
|
|
||||||
|
|
||||||
|
|
||||||
class DNS:
|
class DNS:
|
||||||
def __init__(self, out, mail_domain):
|
def __init__(self, out, mail_domain):
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ class TestEndToEndDeltaChat:
|
|||||||
|
|
||||||
addr = ac2.get_config("addr").lower()
|
addr = ac2.get_config("addr").lower()
|
||||||
saved_ok = 0
|
saved_ok = 0
|
||||||
for line in remote.iter_output("journalctl -f -u dovecot"):
|
for line in remote.iter_output("journalctl -n0 -f -u dovecot"):
|
||||||
if addr not in line:
|
if addr not in line:
|
||||||
# print(line)
|
# print(line)
|
||||||
continue
|
continue
|
||||||
@@ -112,7 +112,7 @@ class TestEndToEndDeltaChat:
|
|||||||
lp.sec("ac1 sends a message and ac2 marks it as seen")
|
lp.sec("ac1 sends a message and ac2 marks it as seen")
|
||||||
chat = ac1.create_chat(ac2)
|
chat = ac1.create_chat(ac2)
|
||||||
msg = chat.send_text("hi")
|
msg = chat.send_text("hi")
|
||||||
m = ac2.wait_next_incoming_message()
|
m = ac2._evtracker.wait_next_incoming_message()
|
||||||
m.mark_seen()
|
m.mark_seen()
|
||||||
# we can only indirectly wait for mark-seen to cause an smtp-error
|
# we can only indirectly wait for mark-seen to cause an smtp-error
|
||||||
lp.sec("try to wait for markseen to complete and check error states")
|
lp.sec("try to wait for markseen to complete and check error states")
|
||||||
@@ -132,7 +132,7 @@ def test_hide_senders_ip_address(cmfactory):
|
|||||||
chat = cmfactory.get_accepted_chat(user1, user2)
|
chat = cmfactory.get_accepted_chat(user1, user2)
|
||||||
|
|
||||||
chat.send_text("testing submission header cleanup")
|
chat.send_text("testing submission header cleanup")
|
||||||
user2.wait_next_incoming_message()
|
user2._evtracker.wait_next_incoming_message()
|
||||||
user2.direct_imap.select_folder("Inbox")
|
user2.direct_imap.select_folder("Inbox")
|
||||||
msg = user2.direct_imap.get_all_messages()[0]
|
msg = user2.direct_imap.get_all_messages()[0]
|
||||||
assert public_ip not in msg.obj.as_string()
|
assert public_ip not in msg.obj.as_string()
|
||||||
@@ -146,5 +146,5 @@ def test_echobot(cmfactory, chatmail_config, lp):
|
|||||||
text = "hi, I hope you text me back"
|
text = "hi, I hope you text me back"
|
||||||
chat.send_text(text)
|
chat.send_text(text)
|
||||||
lp.sec("Wait for reply from echobot")
|
lp.sec("Wait for reply from echobot")
|
||||||
reply = ac.wait_next_incoming_message()
|
reply = ac._evtracker.wait_next_incoming_message()
|
||||||
assert reply.text == text
|
assert reply.text == text
|
||||||
|
|||||||
Reference in New Issue
Block a user