summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Othacehe <othacehe@gnu.org>2025-11-02 19:19:02 +0100
committerMathieu Othacehe <othacehe@gnu.org>2025-11-08 11:24:56 +0100
commitefb910877f6ddf415519c66a2f305c00fb070454 (patch)
treeb81159ba4dbec685e4907f2e5892035bcc74d037
parent9ab50a57ac414f6476295fa75563e215d4115ae2 (diff)
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
-rw-r--r--gnu/tests/mail.scm15
1 files 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)))