Skip to content

Commit 1ed66d1

Browse files
committed
tests: adjust tests for Dovecot 2.4
Dovecot 2.4 (used in Debian trixie) changed its configuration significantly. Have two sections for the old and the new version. QubesOS/qubes-issues#8841
1 parent d9a7ee7 commit 1ed66d1

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

splitgpg2tests/tests.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -370,9 +370,14 @@ def setUp(self):
370370

371371
# IMAP configuration
372372
self.imap_pw = "pass"
373-
self.frontend.run(
374-
'echo "mail_location=maildir:~/Mail\nuserdb {\n driver = passwd\n}\npassdb {\n driver = static\n args = password=pass\n}" |\
375-
tee /etc/dovecot/conf.d/100-mail.conf', wait=True, user="root")
373+
if self.frontend.run("grep -q mail_driver /etc/dovecot/conf.d/10-mail.conf", wait=True) == 0:
374+
self.frontend.run(
375+
'echo "mail_driver = maildir\nmail_path = ~/Mail\nmail_inbox_path = ~/Mail\nuserdb static {\n driver = passwd\n}\npassdb static {\n driver = static\n password=pass\n}" |\
376+
tee /etc/dovecot/conf.d/100-mail.conf', wait=True, user="root")
377+
else:
378+
self.frontend.run(
379+
'echo "mail_location=maildir:~/Mail\nuserdb {\n driver = passwd\n}\npassdb $db_name {\n driver = static\n args = password=pass\n}" |\
380+
tee /etc/dovecot/conf.d/100-mail.conf', wait=True, user="root")
376381
self.frontend.run(
377382
"sed -i 's/^!include/#\\0/' /etc/dovecot/conf.d/10-auth.conf",
378383
wait=True, user="root")

0 commit comments

Comments
 (0)