From efb910877f6ddf415519c66a2f305c00fb070454 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Sun, 2 Nov 2025 19:19:02 +0100 Subject: [PATCH] gnu: tests: Fix getmail. When Shepherd starts the getmail service, the TESTBOX mailbox needs to be present, otherwise getmail fails with: Copyright (C) 1998-2023 Charles Cazabon and others. Licensed under GNU GPL version 2. SimpleIMAPRetriever:alice@localhost:143: mailbox b'TESTBOX' not selectable (TESTBOX) - verify the mailbox exists and you have sufficient permissions 0 messages (0 bytes) retrieved, 0 skipped from SimpleIMAPRetriever:alice@localhost:143 * gnu/tests/mail.scm (run-getmail-test): Move the TESTBOX creation from here ... (%getmail-os): ... to the dovecot configuration. Change-Id: Ic6348565629c69e8b7bccf7c61460ca96850e6bd --- gnu/tests/mail.scm | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/gnu/tests/mail.scm b/gnu/tests/mail.scm index 07a4487d785..389bb4b1569 100644 --- a/gnu/tests/mail.scm +++ b/gnu/tests/mail.scm @@ -484,7 +484,17 @@ addheader \"X-Sieve-Filtered\" \"Guix\"; (mail-location (string-append "maildir:~/Maildir" ":INBOX=~/Maildir/INBOX" - ":LAYOUT=fs")))) + ":LAYOUT=fs")) + (namespaces + (list + (namespace-configuration + (name "main") + (inbox? #t) + (mailboxes + (list + (mailbox-configuration + (name "TESTBOX") + (auto "create"))))))))) (service getmail-service-type (list (getmail-configuration @@ -594,9 +604,6 @@ Subject: Hello Nice to meet you!") (read-line imap) ;+ (write-line "c2lyaGM=" imap) (read-line imap) ;OK - ;; Create a TESTBOX mailbox - (write-line "a CREATE TESTBOX" imap) - (read-line imap) ;OK ;; Append a message to a TESTBOX mailbox (write-line (format #f "a APPEND TESTBOX {~a}" (number->string (message-length message)))