boitalettres/scripts/test_imap.sh

24 lines
533 B
Bash
Executable file

#!/bin/sh
# APPEND example from RFC9051
nc localhost 4567 <<EOF
A CAPABILITY
B LOGIN lx plop
C APPEND saved-messages (\\Seen) {297+}
Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)
From: Fred Foobar <foobar@example.com>
Subject: afternoon meeting
To: mooch@example.com
Message-Id: <B27397-0100000@example.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
Hello Joe, do you think we can meet at 3:30 tomorrow?
D NOOP
E LOGOUT
EOF
echo "^ expected output: responses to A B C D and E, last one is E OK LOGOUT completed"