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:
- What exactly does %z check? Does it extract information directly from the imap_host string, or does it query the system/server?
- Does the tls:// prefix or the :143 port break the parsing logic for the %z variable?
- Is %t the recommended workaround in these cases, or is there a way to make %z ignore the protocol and port?
Thanks in advance for your help!