You can disable POP3/IMAP/SMTP services by setting value of SQL column in 'vmail.mailbox' to 0:
- mailbox.enablepop3 (and mailbox.enablepop3secured)
- mailbox.enableimap (and mailbox.enableimapsecured)
- mailbox.enablesmtp (and mailbox.enablesmtpsecured)
But since Roundcube perform user authentication via IMAP protocol directly, if you disable IMAP service for this user, he/she cannot login to Roundcube webmail anymore.
Possible solution is, update Dovecot SQL query in /etc/dovecot/dovecot-mysql.conf, reject all IMAP requests if remote IP address is not the server which hosts Roundcube webmail (e.g. 127.0.0.1): Sample SQL query:
# Original SQL query in dovecot-mysql.conf:
#user_query = SELECT ... FROM mailbox,domain WHERE ...# Modified one:
user_query = SELECT ... FROM mailbox,domain WHERE ... AND '%r' = '127.0.0.1'
Reference: http://wiki2.dovecot.org/Variables (Search "remote ip")