IMAP 
  # bash -c 'echo "tag login user@localdomain.tld userpasswd"; while read x; do echo "$x"; done' |  openssl s_client -crlf -connect 127.0.0.1:993  

  On success you will see 'Logged in' after the IMAP connection parameters

 SMTP (submission)
  # cd /usr/local/bin
  # wget http://www.jetmore.org/john/code/swaks/latest/swaks
  # chown root.root swaks
  # chmod +x swaks
  # swaks --to user@remotedomain.tld --from user@localdomain.tld --server 127.0.0.1 --port 587 --ehlo test -tls --auth login --auth-user user@localdomain.tld --auth-password userpasswd

  On success you will see the remote host accept your email

 Check passwords
  # vpopmailpasswd=`cat filepasswd`  
  # echo "select pw_passwd from localdomain_tld where pw_name='user'" | mysql -u root -p$vpopmailpasswd vpopmail | grep -v pw_passwd | sed 's/\$1\$//' | cut -f1 -d"$" > saltfile
  # usersalt=`cat saltfile`
  # userpasswd=`cat fileuserpasswd` /* Put your user's password in this file */
  # userhash0=`openssl passwd -1 -salt $usersalt $userpasswd`
  # userhash1=`echo "select pw_passwd from localdomain_tld where pw_name='user'" | mysql -u root -p$vpopmailpasswd vpopmail | grep -v pw_passwd`
  # [ "$userhash0" = "$userhash1" ] && echo "Matched passwords" || echo "Unmatched passwords"