I have an interesting problem where I have installed Roundcube webmail on the server (I have Virtualmin Pro) - when I set up an account roundcube is picking up email addresses as user.domain@domain.com instead of user@domain.com
This obviously is a big problem because the reply-to addresses are incorrect and mail is being bounced - currently I have to manually change these settings, but I need to know how to have it set up on the server so that when I create a new email address I don’t have to go and manually change the settings.
This requires some support from Round Cube in order to figure out the correct mapping. I’m not sure whether such a plugin exists–SquirrelMail has a virtual hosting plugin for this purpose. Usermin has built-in support for Postfix virtual maps and Sendmail generics tables.
For me the adress works but how can I get roundcube to use the Real Name in front of the mail adress instead of the login? Where does virtualmin save that "Real Name"? Would there be a way to use that instead or to integrate it in /etc/postfix/virtual?
In Usermin it works perfect.
make sure you set ‘virtuser_file’ to /etc/postfix/virtual in the roundcube config file (main.inc.php)
apply this change to <roundcube-path>/program/include/rcube_user.php, around line 385 or so (using roundcube 0.2 stable)
[code:1]
// replaced this original code
// $user_name = $user != $user_email ? $user : ‘’;
//
// with call to awk (linux utility for text/pattern manipulation)
// that compares the #1 column of /etc/passwd with $user and returns value of #5 column (full name)
// if no usable return value, the original code is used
// it seems exec() returns 0 even if the search string was not found, so $awk_return_value is not used
// NEW FROM HERE
exec(“awk -F: ‘($1==U){print $5}’ U=$user /etc/passwd”, $awk_output, $awk_return_value);
Step 1) above will map the correct email address to the login account used to log into roundcube
Step 2) attempts to find the Full Name from the /etc/passwd file (you enter this for every account and email user you create) by looking for the login name used to get into roundcube — it effectively instructs awk to search in column 1 (the login names) for the login name used and return the value of column 5 (the Full Name); IF awk doesn’t find anything, the original line of code from the roundcube release is used instead.
Result: 1) makes email addresses in From: appear correctly; 2) makes the user’s first and last name show up in Personal Settings in roundcube without the end user having to set it up manually.