Roundcube Community Forum

Release Support => Pending Issues => Topic started by: reseko on December 19, 2025, 09:11:49 AM

Title: Question about %z variable in mail_domain and conflict with imap_host (
Post by: reseko on December 19, 2025, 09:11:49 AM
Hi everyone,

I have a technical question regarding how replacement variables work in Roundcube's configuration.

I am trying to ensure that new users automatically get the correct domain in their identity. My IMAP server (Dovecot) correctly returns mail.example.com when running dovecot --hostdomain, so I expected that setting:

$config['mail_domain'] = '%z';

would allow Roundcube to extract "example.com". However, the result is an empty string (users see their email as user@ without a domain). I have verified that if I change the variable to %t, it works perfectly, but I would like to understand why %z is failing.

I suspect the issue lies in how my IMAP host is defined, as I include both the protocol and the port:

$config['imap_host'] = 'tls://mail.example.com:143';
My questions are:



Thanks in advance for your help!