Apparently the smtp user and password were missing from the config.inc.php file in Roundcube 1.3.4, resulting in a

Relay access denied

when trying to send mail from Roundcube.

Adding

$config['smtp_user'] = '%u';
$config['smtp_pass'] = '%p';

to config/config.inc.php solved the problem.