Blame tests/p_dovecot/dovecot_imap_login.sh

Karanbir Singh 0b5bb2
#!/bin/sh
Karanbir Singh 0b5bb2
# Author: Athmane Madjoudj <athmanem@gmail.com>
Karanbir Singh 0b5bb2
Karanbir Singh 2dd0be
t_Log "Running $0 - adding imaptest local user account + attempting IMAP login"
Karanbir Singh 0b5bb2
Karanbir Singh 2dd0be
{ userdel imaptest; useradd imaptest && echo imaptest | passwd --stdin imaptest; } &>/dev/null
Karanbir Singh 2dd0be
Karanbir Singh 2dd0be
t_Log "Dovecot IMAP login test"
Karanbir Singh 0b5bb2
echo -e "01 LOGIN imaptest imaptest\n" | nc localhost 143 | grep "01 OK Logged in." > /dev/null 2>&1
Karanbir Singh 2dd0be
Karanbir Singh 2dd0be
t_CheckExitStatus $?