I wouldn't use Roundcube for that, I would set up such restrictions on the server's local firewall instead.