RoundCube: resolve user names and e-mail addresses @Edge, I think you're on the right track Edge! I have something more nice for you: Within RoundCube's main.inc.php file there is a line like: // Path to a virtuser table file to resolve user names and e-mail addresses $rcmail_config['virtuser_file'] = ''; If you change it to: // Path to a virtuser table file to resolve user names and e-mail addresses $rcmail_config['virtuser_file'] = '/etc/postfix/virtusertable'; /etc/postfix/virtusertable Then your users are able to login with their loginname AND emailaddress as well! (This is not within my howto yet). @Hagforce, I do not know if choosing the characterset for one single language is possible (yet). I also use IlohaMail, this emailclient uses the same default folders as RoundCube (compatible) and has that functionality. It has a callendar as well, which is on your wishlist.
Thanks for the info Hans. re: Then your users are able to login with their loginname AND emailaddress as well! I did that some time ago allready whe I was playing with RoundCube (http://www.howtoforge.com/forums/showpost.php?p=21886&postcount=9) Only problem now is the @www.domain.tld email change
I tried to edit main.inc Code: // language has special charset configured if (isset($rcube_charsets[$lang])) $charset = $rcube_charsets[$lang]; else $charset = 'UTF-8'; But that didn`t work. I want to use iso-8859-1 If I can`t set charset per language, where can I set it for the whole installation? If you log in with username and if you log in with e-mail different users are created, any way around this? And the identity added is [email protected], how do you get [email protected]?
http://www.howtoforge.com/forums/showpost.php?p=34694&postcount=51 If the user is allready created in the Roundcube database, you will need to delete it 1st to make it work! (i'm talking about the Roundcube database)
I appended $rcmail_config['charset'] = '8859-1'; to my main.inc.php, but then I get a blanck page.... How do you change the charset in this program?
@Hagforce At the moment i do not have a solution for that. I've done some tests like adding: $rcmail_config['charset'] = '8859-1'; to the main.inc.php And even adding lines like these: $labels['defaulteconding'] = 'windows-1251'; or $labels['defaulteconding'] = '8859-1'; or $labels['defaulteconding'] = 'iso-8859-1'; to the language labels.inc file within your RoundCube localization folder, but i did not succeed right now. @Edge, Thanks for your feedback! Doing so, we can make things better. Today i've updated my RoundCube howto, which is published here: http://www.howtoforge.com/roundcube_webmail_ispconfig The following content has been added: To login with usernames AND email addresses change the line: // Path to a virtuser table file to resolve user names and e-mail addresses $rcmail_config['virtuser_file'] = ''; /etc/postfix/virtusertable into: // Path to a virtuser table file to resolve user names and e-mail addresses $rcmail_config['virtuser_file'] = '/etc/postfix/virtusertable'; /etc/postfix/virtusertable When a user login with the email address for the first time, within RoundCubes the identities section, the e-mail address will be displayed like: [email protected]. As we want the email address to be displayed like [email protected] do the following: Change the line 637 within /program/incluse/main.inc file from: 637 $line = trim($line); to: 637 $line = trim(str_replace("www.", "", $line));
I made this changes to my installation, so the users don`t spoof addresses. I "$a_save_cols" in the save_identity.inc file I remove e-mail. From identities.html and editidentity.html in skins I remove the add and delete button. But my installation don`t lock good without the right charset, I really hope there is a solution for this.
An other problem is that when a user logs in the 1st time the virtual webname is used as display name (like web1_info) The code hack below will remove the web1_ part, leaving only the "info" part as display name. This is what you need to change. Find in Roundcube's main.inc (it's in /program/included arround line 588): PHP: // also create new identity records $DB->query("INSERT INTO ".get_table_name('identities')." (user_id, del, standard, name, email) VALUES (?, 0, 1, ?, ?)", $user_id, $user_name, $user_email); Replace it with: PHP: // also create new identity records $DB->query("INSERT INTO ".get_table_name('identities')." (user_id, del, standard, name, email) VALUES (?, 0, 1, ?, ?)", $user_id, $user_name = preg_replace("/\\w[^\\]]*\\_/", "", $user_name), $user_email); Three more things. 1) Please note that PHP is not my preferred coding language, and that for sure the "code hack" can be done better! 2) This will only work on a standard ISPconfig. If you have changed the username to look different (not like web[nr]_name) you will need to change the preg_replace code) 3) If the user has already logged in once before, the name will stay as is!
Thank you guys! This install is begining to take form. I managed to use UTF-8 after rebuilding the database and doing some changes, so now everything is ok. Just one question though, what permissions do you use on the files and folders? Now I use apache as owner and 700 on all folders and files, but is this safe?
To keep everything nice in one place instead of doing the above hack you could also do this: Find in /program/included/main.inc (arround line 588): PHP: // also create new identity records $DB->query("INSERT INTO ".get_table_name('identities')." (user_id, del, standard, name, email) VALUES (?, 0, 1, ?, ?)", $user_id, $user_name, $user_email); Replace it with: PHP: // also create new identity records $DB->query("INSERT INTO ".get_table_name('identities')." (user_id, del, standard, name, email) VALUES (?, 0, 1, ?, ?)", $user_id, $user_name = preg_replace("/\\w[^\\]]*\\_/", "", $user_name), $user_email = str_replace("www.", "", $user_email)); The: Code: $user_name = preg_replace("/\\w[^\\]]*\\_/", "", $user_name) will rename "web1_info" to "info" The: Code: $user_email = str_replace("www.", "", $user_email) will rename "www.domain.tld" to "domain.tld" Putting this all together will endup like "[email protected]" instead of [email protected]