First, edit config/config.inc.php and set:
$config['mail_domain'] = 'hostname.tld';
where hostname.tld is the domain name you want to set.
After that, the database needs to be updated:
UPDATE users SET mail_host='hostname.tld';
To prevent the users from changing the roundcube skin, add:
$config['dont_override'] = array('skin');
to config/config.inc.php.
Roundcube does not log IP addresses when it is set up to connect to Dovecot over loopback. The following guide will allow logging the remote browser IP via Dovecot ID whenever a user logs in using the Roundcube website.
plugins/,config/config.inc.php and add dovecot_ident to the list of plugins,/etc/dovecot.conf and set the login_trusted_networks configuration parameter to 127.0.0.1 ::1,