You've already forked docker-mailserver
mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-09 23:07:35 +02:00
Added IMAP connection integration test
This commit is contained in:
4
test/email-templates/test-imap.txt
Normal file
4
test/email-templates/test-imap.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
a1 LOGIN user1@localhost.localdomain mypassword
|
||||
a3 EXAMINE INBOX
|
||||
a4 FETCH 1 BODY[]
|
||||
a5 LOGOUT
|
@@ -10,6 +10,10 @@ assert_raises "docker exec mail ps aux --forest | grep '/usr/sbin/saslauthd'" 0
|
||||
assert_raises "docker exec mail ps aux --forest | grep '/usr/sbin/clamd'" 0
|
||||
assert_raises "docker exec mail ps aux --forest | grep '/usr/sbin/amavisd-new'" 0
|
||||
|
||||
# Testing IMAP server
|
||||
assert_raises "docker exec mail nc -w 1 0.0.0.0 143 | grep '* OK' | grep 'STARTTLS' | grep 'Courier-IMAP ready'" 0
|
||||
assert_raises "docker exec mail /bin/sh -c 'nc -w 1 0.0.0.0 143 < /tmp/test/email-templates/test-imap.txt'" 0
|
||||
|
||||
# Testing user creation
|
||||
assert "docker exec mail sasldblistusers2" "user1@localhost.localdomain: userPassword\nuser2@otherdomain.tld: userPassword"
|
||||
assert "docker exec mail ls -A /var/mail/localhost.localdomain/user1" "cur\nnew\ntmp"
|
||||
|
Reference in New Issue
Block a user