Thanks a dozen! Now working... I would like to share my config files for the next coming newbies.
Because of stunnel conflict with xinetd. I saw the error in /var/log/messages.
Dec 4 12:00:12 server stunnel[12928]: Error binding pop3s to 0.0.0.0:995
We should disable all SSL services that use in xinetd.
To avoid "Authentication failed for UNKNOWN USER" error,
we should disable all imap and pop services too except the cpimap.
( Well, all services in /etc/xinetd.d are disabled except the only one cpimap )
Code:
root@server [/etc/xinetd.d]# more cpimap imaps ipop2 ipop3 pop3s popa3d popa3ds
::::::::::::::
cpimap
::::::::::::::
# default: off
# description: imapd
service imap
{
disable = no
socket_type = stream
wait = no
user = root
server = /usr/local/cpanel/3rdparty/bin/imapd
}
::::::::::::::
imaps
::::::::::::::
# default: off
# description: The IMAPS service allows remote users to access their mail \
# using an IMAP client with SSL support such as Netscape \
# Communicator or fetchmail.
service imaps
{
disable = yes
socket_type = stream
wait = no
user = root
server = /usr/sbin/imapd
log_on_success += HOST DURATION
log_on_failure += HOST
}
::::::::::::::
ipop2
::::::::::::::
# default: off
# description: The POP2 service allows remote users to access their mail \
# using an POP2 client such as fetchmail. In most cases, clients \
# support POP3 instead of POP2, so enabling this service is rarely \
# necessary.
service pop2
{
disable = yes
socket_type = stream
wait = no
user = root
server = /usr/sbin/ipop2d
log_on_success += HOST DURATION
log_on_failure += HOST
}
::::::::::::::
ipop3
::::::::::::::
# default: off
# description: The POP3 service allows remote users to access their mail \
# using an POP3 client such as Netscape Communicator, mutt, \
# or fetchmail.
service pop3
{
disable = yes
socket_type = stream
wait = no
user = root
server = /usr/sbin/ipop3d
log_on_success += HOST DURATION
log_on_failure += HOST
}
::::::::::::::
pop3s
::::::::::::::
# default: off
# description: The POP3S service allows remote users to access their mail \
# using an POP3 client with SSL support such as fetchmail.
service pop3s
{
disable = yes
socket_type = stream
wait = no
user = root
server = /usr/sbin/ipop3d
log_on_success += HOST DURATION
log_on_failure += HOST
}
::::::::::::::
popa3d
::::::::::::::
# default: off
# description: The POP3 service allows remote users to access their mail \
# using an POP3 client such as Netscape Communicator, mutt, \
# or fetchmail.
service pop3
{
disable = yes
socket_type = stream
wait = no
user = root
server = /usr/sbin/popa3d
}
::::::::::::::
popa3ds
::::::::::::::
# default: off
# description: The POP3S service allows remote users to access their mail \
# using an POP3 client with SSL support such as fetchmail.
service pop3s
{
disable = yes
socket_type = stream
wait = no
user = root
server = /usr/sbin/stunnel
server_args = /etc/stunnel/stunnel.conf-pop3
}