Roundcube Community Forum
News and Announcements => General Discussion => Topic started by: sottwell on February 02, 2007, 01:23:24 PM
-
I am on a server that "mangles" the username, making it "hostname-username".
This means that instead of new mail's return address being "username@hostname.com" it becomes "hostname-username@hostname.com".
The actual email address for the user is "username@domain.com"; it's only the login username that is mangled.
I've been trying to figure out the configuration options as I suspect there may be some way of mapping the actual email address to the return address, instead of using the login username.
I can hack the code to remove the prefix, but I'd prefer to use a configuration setting if there is one that will solve this problem.
-
Ok, if anybody else has this issue, perhaps this will help them.
In program/include/main.inc, after the comment at line 588, add these two lines:
$user_name = substr($user_name, strpos($user_name, "-")+1);
$user_email = substr($user_email, strpos($user_email, "-")+1);
This will work, as long as the "prefix" added by your system does not have a hyphen in the prefix. My system uses the domain's account name, and it does not allow a prefix in the account name, so it's fine for my situation.