Hi, I'm using RC 0.7.1 with virtual_query plugin. We normally use full email address as login username, but for one domain especially the user does not have to use the domain part and can use only the part before '@' as username. I'm logging in as "mybox" (so without the domain part of the address), sending email from
[email protected], it's sent to the destination and looks normaly - the From: is set to
[email protected] a replying works. Everything is fine. It works the same way when I'm logging in as
[email protected] (so including the domain part of mail address).
But when I'm sending an email, the log says that I'm sending mail from
[email protected]. Why?
The users record in SQL DB looks like this:
db=# select user_id, username, mail_host, alias, created, last_login, language from webmail.users where username like 'mybox';
user_id | username | mail_host | alias | created | last_login | language
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
338 | mybox | our.mailserver.net | [email protected] | 2012-02-03 12:35:54.386579+01 | 2012-02-03 12:43:09.398756+01 | en_US
(1 row)
The maillog:
Feb 3 12:43:56 web roundcube: User [email protected] [ip.add.re.ss]; Message for [email protected]; 250: 2.0.0 Ok: queued as 5CF1B10E
The line with SQL query from main.inc.php:
$rcmail_config['virtuser_query'] = "SELECT email FROM svc.mail_account WHERE CASE WHEN position('@' in '%u') = 0 THEN email = '%u' || '@virtual-address-domain.com' ELSE email='%u' END";
Why in the maillog is written, that the mail goes from
[email protected] and not from
[email protected]?
Best regards, Tomas