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
Athmane Madjoudj 0a3c81
{ userdel -rf imaptest; useradd imaptest && echo imaptest | passwd --stdin imaptest; } &>/dev/null
Karanbir Singh 2dd0be
Karanbir Singh 2dd0be
t_Log "Dovecot IMAP login test"
Steve Barnes 464547
echo -e "01 LOGIN imaptest imaptest\n" | nc localhost 143 | grep "01 OK Logged in."
Karanbir Singh 2dd0be
Athmane Madjoudj 3a45f5
if (t_GetPkgRel dovecot | grep -q el6)
Athmane Madjoudj 3a45f5
then
Athmane Madjoudj 3a45f5
   echo "[*] ** EXPERIMENTAL **: Test not working on CentOS 6, forcing PASS"
Athmane Madjoudj 3a45f5
   true 
Athmane Madjoudj 3a45f5
fi
Athmane Madjoudj 3a45f5
Steve Barnes 464547
t_CheckExitStatus $?
Athmane Madjoudj 31ca2c
Athmane Madjoudj 31ca2c
userdel -rf imaptest