I Just installed a new server and purchased the Roundcube app, the I'm able to login but the user email shows up wrong.
It shows user@com.br (Brazilian domain in this case). Note that it is missing even the dot before the "com". Basically it's missing the domain name before the .TLD
At first I thought it was just a matter of editing the users preferences, but I tested it on mail-tester.com and even then it showed up as user@com.br, missing part of the domain.
I then tested it with an email client (Thunderbird) and it was fine.
I guess it's a problem with Roundcube package.
Any thoughts?
It shows user@com.br (Brazilian domain in this case). Note that it is missing even the dot before the "com". Basically it's missing the domain name before the .TLD
At first I thought it was just a matter of editing the users preferences, but I tested it on mail-tester.com and even then it showed up as user@com.br, missing part of the domain.
I then tested it with an email client (Thunderbird) and it was fine.
I guess it's a problem with Roundcube package.
Any thoughts?
Share this post:
Responses (21)
-
Accepted Answer
The free and paid version are pretty much the same. I've had a look at the pad version bootstrapping and all it seems to do is initialise the Roundcube database to use the system-database and add sieve filtering and the global address book. I, therefore, assume setting up the fields you mention is down to Roundcube's installer. Unfortunately I have been running Roundcube for so long, even before the app was created, that I can't remember how I set it up. I remember I had to move it over to the ClearOS version at some point, so change the database over, but I remember no more than that. -
Accepted Answer
-
Accepted Answer
I has the same problem as Rodrigo with a brand new install of Roundcube on ClearOS 7 (7.9.1) which is based on CentOS 7 (7.9) which in turn is based on RHEL 7 (Red Hat Enterprise Linux 7.9).
I was accessing Roundcube using my server's internal IP instead of my domain name as that server wasn't live yet. When I logged into a user using Roundcube in the banner section up the top left it displayed my username and part of an internal IP address and the same thing was showing if I tried to compose an email so it was displaying username1@168.1.44. This was fixed by editing:
/usr/share/roundcubemail/config/config.inc.php
and changing this line:
$config['mail_domain'] = '%t';
to my domain name:
$config['mail_domain'] = 'subdomain.domain.tld';
and while your editing that file you may want to add these 2 lines below it:
// add a received header to outgoing mails containing the creators IP and hostname
$config['http_received_header'] = true;
When I logged back into Roundcube using the same user as above the banner was still displaying username1@168.1.44 but when I logged into a new user using Roundcube the banner now displayed username2@subdomain.domain.tld and the new user's email address when composing an email also displayed username2@subdomain.domain.tld so that was one thing fixed.
The next thing to solve was a little harder, why was the hostname set to an IP address? I got a tip off from an old Roundcube config file:
https://searchcode.com/codesearch/view/88688057/
71 // %n - http hostname ($_SERVER['SERVER_NAME'])
A little googling revealed it to be a PHP variable:
https://www.php.net/manual/en/reserved.variables.server.php
'SERVER_NAME'
The name of the server host under which the current script is executing. If the script is running on a virtual host, this will be the value defined for that virtual host.
Note: Under Apache 2, you must set UseCanonicalName = On and ServerName. Otherwise, this value reflects the hostname supplied by the client, which can be spoofed. It is not safe to rely on this value in security-dependent contexts.
Googling Apache came up with this:
https://httpd.apache.org/docs/2.4/mod/core.html#usecanonicalname
https://httpd.apache.org/docs/2.4/mod/core.html#servername
https://httpd.apache.org/docs/2.4/mod/core.html#serveralias
Next it was time to edit the Apache config file:
/etc/httpd/conf/httpd.conf
On line 95 was
ServerName subdomain.domain.tld
and I added the following line underneath
UseCanonicalName On
For testing purposes I changed:
/usr/share/roundcubemail/config/config.inc.php
and changing this line:
$config['mail_domain'] = 'subdomain.domain.tld';
back to:
$config['mail_domain'] = '%t';
Then I started Apache:
systemctl restart httpd
I then accessed Roundcube using my server's internal IP:
https://192.168.1.44/webmail/
and logged in with a third user and I could now see that the banner was no longer displaying an IP address, it was now:
username3@domain.tld
so that fixed the hostname being set to an IP address so then it was time to put back the Roundcube config back by editing
/usr/share/roundcubemail/config/config.inc.php
and changing this line:
$config['mail_domain'] = '%t';
to my domain name:
$config['mail_domain'] = 'subdomain.domain.tld';
Then I started Apache:
systemctl restart httpd
When logging back into Roundcube I still had 2 bad email addresses:
username1@168.1.44
username3@domain.tld
so it was time to fix the database:
mysql -u root -p
DROP DATABASE roundcubemail;
CREATE DATABASE roundcubemail;
exit
I reran the Roundcube installer to initialise the database
https://192.168.1.44/webmail/installer
Now everything was fixed as all the users had an email address in the form of:
username@subdomain.domain.tld -
Accepted Answer
-
Accepted Answer
Nick Howitt wrote:
Thanks for posting back. I am pretty certain this is a Roundcube issue. It looks like it is making assumptions when you first log in. Did you try the Roundcube support resources?
I have not yet contacted Roundcube support. Before I do so, would you mind testing on any server you have if you can reproduce the issue? Maybe just access Roundcube with a new user via the ddns name instead? At least that way I'll know I wasn't the only one seeing this and that I didn't make the same mistake, if there was one, all the time.
Thanks for the help and patience! -
Accepted Answer
-
Accepted Answer
I think I figured it out
It is related to the profile within roundcube. The issue is what happens at the moment of the first login, it seems to grab the address you are accessing the server with. I tested logging in with the ip address and the profile showed part of the ip address as the domain for the email, then I created another user account and this time I used the dynamic dns address to create the user profile and the email was created with the poweredbyclear.com domain.
Before I did not create a new profile, I had only edited the profile. Once the new profile was created, I selected it when sending a new test email and it worked. So I deleted the original profile and it worked again. Then I created a new user, logged in with the correct domain, created a new profile, deleted the old one and it worked. I tested with mail-tester.com
I had to reinstall a new server on a new host and change dns settings to test this because this time I used and ISO file to install instead of a script to convert centos to clearos 7. With the script I was getting an error about the mailcap package durring install and I thought that had something to do with the issue.
Sorry for the delays in getting back to this issue, still going through the aftermath of the health emergency.
I still have both servers, I might be able to get info from them before deleting anything.
Thanks -
Accepted Answer
-
Accepted Answer
Nick Howitt wrote:
I'm afraid I still think it is not a Roundcube issue, but to look at its configs, they are in /usr/share/roundcubemail/config but there is nothing there with your domain name. If you want to look at the database, the best thing to do is install the MariaDB app as this comes preconfigured to be able to access system-mariadb (choose the System database). User name is "roundcube" and the password is embedded in the $config['db_dsnw'] string in /usr/share/roundcubemail/config/config.inc.php between the ":" and the "@", or you can find it in /var/clearos/system_database/roundcubemail.
The main reason I don't think it is Roundcube is that it only sets itself up with new users when they log in, so it must be deriving the e-mail address from somewhere or reading it from LDAP. It may be worth asking Roundcube support where they get the e-mail address from.
I can give you access to the server in the name of debugging and learning. Its a new server without any data on it, -
Accepted Answer
I'm afraid I still think it is not a Roundcube issue, but to look at its configs, they are in /usr/share/roundcubemail/config but there is nothing there with your domain name. If you want to look at the database, the best thing to do is install the MariaDB app as this comes preconfigured to be able to access system-mariadb (choose the System database). User name is "roundcube" and the password is embedded in the $config['db_dsnw'] string in /usr/share/roundcubemail/config/config.inc.php between the ":" and the "@", or you can find it in /var/clearos/system_database/roundcubemail.
The main reason I don't think it is Roundcube is that it only sets itself up with new users when they log in, so it must be deriving the e-mail address from somewhere or reading it from LDAP. It may be worth asking Roundcube support where they get the e-mail address from. -
Accepted Answer
Nick Howitt wrote:
I have no idea where it is picking its entries up from. Perhaps the Base Domain in the Directory Server settings. I don't know. It reads this when a new user logs in and gets set up in the Identities in Roundcube. I know mine is working correctly as I tested earlier today. Since then I have upgraded to the contribs-testing version of Roundcube.
I'm sorry for the long wait time. I had a serious family health emergency to deal with.
I have just uninstalled and reinstalled the app, still does not work. and it's using the updated version (released today)
I wonder if i can manage to look at the config files and database to fix the issue. Mailing from thunderbird works. -
Accepted Answer
I have no idea where it is picking its entries up from. Perhaps the Base Domain in the Directory Server settings. I don't know. It reads this when a new user logs in and gets set up in the Identities in Roundcube. I know mine is working correctly as I tested earlier today. Since then I have upgraded to the contribs-testing version of Roundcube. -
Accepted Answer
Nick Howitt wrote:
If you just install yum i don't think you get the integration with system-mariadb.
Have you checked the user's email address as it shows in the Users webconfig?
I have checked. It's a new server and I've double checked everything in the webconfig. all users have the correct email -
Accepted Answer
-
Accepted Answer
Nick Howitt wrote:
On my set up, my domain does not appear in any roundcube configs, unless they are hidden in a system-mysql database. Also, within Roundcube I log in with a username only. My e-mail address is in the Users webconfig, so check and see what yours says. Otherwise, I'd expect it to pick up from the Mail Domain in the SMTP Server or Mail Settings screens (they are the same data).
I've just tried it with a new user who has never used Roundcube before and it automatically used her e-mail address from Users.
I just checked, even created a new user for that, same issue.
Perhaps i should try to create a vm locally and test the centos to clearos script and see if that creates the same issue. but idk if installing the rpm via yum instead of market place will do any difference -
Accepted Answer
On my set up, my domain does not appear in any roundcube configs, unless they are hidden in a system-mysql database. Also, within Roundcube I log in with a username only. My e-mail address is in the Users webconfig, so check and see what yours says. Otherwise, I'd expect it to pick up from the Mail Domain in the SMTP Server or Mail Settings screens (they are the same data).
I've just tried it with a new user who has never used Roundcube before and it automatically used her e-mail address from Users. -
Accepted Answer
Nick Howitt wrote:
Can you check your Mail Settings and SMTP Srever settings for the correct domain information? I don't think this is any part of Roundcubemail.
I did and it looks fine. I guess if it was the smtp settings sending emails with a desktop client would fail as well. I could be wrong -
Accepted Answer
-
Accepted Answer
Nick Howitt wrote:
I thought settings like that were done manually in the Roundcube interface in Settings > Identities and each user and to set them up themselves.
If that was the case it would be fine, but the fact that it sends out emails without the domain is a big problem. It's not just a preferences setting. I have updated the missign information manually and it still sends out the wrong email address..
On the message header itself there is no domain. -
Accepted Answer
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »