| 1 |
n=1 # at least one message to send remotely |
| 2 |
sample_message | deliver -u "local" |
| 3 |
for ((i = 0; i < 32; i++)); do |
| 4 |
u="$(shuf -n1 -e "local" "remote")" |
| 5 |
[ "$u" = "remote" ] || n=$(( n+1 )) |
| 6 |
sample_message | deliver -u "$u" |
| 7 |
done |
| 8 |
|
| 9 |
# check that credentials aren't leaked to the debug output |
| 10 |
interimap --debug || error |
| 11 |
grep -Fx "remote: C: xxx AUTHENTICATE PLAIN [REDACTED]" <"$STDERR" || error |
| 12 |
|
| 13 |
# make sure we didn't use SASL-IR |
| 14 |
grep -oE -m1 '^remote: S: \* OK \[CAPABILITY IMAP4rev1( [^]]*)? AUTH=[^]]*\]' <"$STDERR" >"$TMPDIR/capability" |
| 15 |
|
| 16 |
sed -ri 's/^remote: S: \* OK \[CAPABILITY (.*)\]$/\1/' "$TMPDIR/capability" |
| 17 |
tr " " "\\n" <"$TMPDIR/capability" >"$TMPDIR/capabilities" |
| 18 |
grep -Fx "IMAP4rev1" <"$TMPDIR/capabilities" || error |
| 19 |
! grep -Fx "SASL-IR" <"$TMPDIR/capabilities" || error |
| 20 |
|
| 21 |
# make sure all literals were synchronizing (and that we didn't use MULTIAPPEND) |
| 22 |
xcgrep "$n" -E "^remote(\(INBOX\))?: C: [0-9]+ APPEND INBOX .* \{[0-9]+\}$" <"$STDERR" |
| 23 |
|
| 24 |
check_mailbox_status "INBOX" |
| 25 |
|
| 26 |
# vim: set filetype=bash : |