Blame tests/p_dovecot/dovecot_pop3_login.sh
|
Karanbir Singh |
2dd0be |
#!/bin/bash
|
|
Karanbir Singh |
0b5bb2 |
# Author: Athmane Madjoudj <athmanem@gmail.com>
|
|
Karanbir Singh |
0b5bb2 |
|
|
Karanbir Singh |
2dd0be |
t_Log "Running $0 - adding pop3test local user account + attempting POP3 login"
|
|
Karanbir Singh |
0b5bb2 |
|
|
Karanbir Singh |
2dd0be |
{ userdel pop3test; useradd pop3test && echo pop3test | passwd --stdin pop3test; } &>/dev/null
|
|
Karanbir Singh |
2dd0be |
|
|
Karanbir Singh |
2dd0be |
t_Log "Dovecot POP3 login test"
|
|
Steve Barnes |
464547 |
echo -e "user pop3test\npass pop3test\n" | nc localhost 110 | grep "+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 pop3test
|