Primary email user (account name email) has "@localhost" instead of the real domain

switch

Verified User
Joined
Jan 23, 2008
Messages
102
Primary email user (account name email) has "@localhost" instead of the real domain

When a "normal" email user logs into webmail, they use their full email address and password. However when the "primary" email user (the one with just their username, with no @ and their domain after it) logs in, I see "@localhost" after their user. This is true across all primary users.

When they send an email, it works, however replies fail since the recipient sees the reply-to address as USER@localhost which of course doesn't route correctly.

<gripe>
Actually the whole idea of having a special primary email user that doesn't have their domain in the username is a huge support nightmare for me, it confuses the hell out of users: "Yes sir, your username is your full email address and password... except for... wait... um... yes I see here that is your account username, so in your case it's just your username, but for all your other users they have to use their domain...". I wish it was consistent, or I wish there wasn't a primary email user AT ALL (this would simplify things a lot... I wonder if there's an option hidden somewhere to do this).
</gripe>

So, does this appear to you guys like it's a configuration issue (does everyone else have this same issue)? Or is this something I just need to get used to?
 
Last edited:
In what program does the user send mail as @localhost for you?

Jeff
 
In roundcube. I haven't tested the other webmail programs because I only use roundcube :) I take it this is not normal behavior?

EDIT:

Yup, you set me on the right track. I just tried out squirrelmail, and it does NOT have the localhost problem... the correct domain appears as expected. Looks like this is a roundcube settings issue, as the problem is isolated just to roundcube.

Roundcube came installed with DirectAdmin, I didn't install it or touch it since I got this box (fairly recently, as you know). I guess I'll take a look at the settings, but at least I know what to blame now.
 
Last edited:
Looks like at least one person had exactly this same problem:

http://www.directadmin.com/forum/showthread.php?p=116044&highlight=localhost#post116024

The suggestion is to edit /var/www/html/roundcube/config/main.inc.php and change:


$rcmail_config['default_host'] = 'localhost';

to

$rcmail_config['default_host'] = '';

Even though this post: http://www.directadmin.com/forum/showthread.php?t=10037 says exactly the opposite, but then it's a 3 year old post.

Going to test, I'll report back here.

EDIT:

Nope, leaving $rcmail_config['default_host'] = '' is a really bad idea. What this does is add a field to the roundcube login page that asks the user to enter in their server. My users can barely turn on their computers, much less figure out what to put in that field to log in (not to mention the fact that this feels insecure, but I haven't tested enough to know this for sure).

I'm going back to setting $rcmail_config['default_host'] = 'localhost'. At this point I'm stuck.
 
Last edited:
I know that there was a special fix made to Squirrelmail so it would handle this correctly; hopefully someone can find something similar for RoundCube.

Jeff
 
Back
Top