To allow you and your users to access their email from anywhere you can install this webmail client Roundcube. It’s a very user friendly and usable web based mail program, it’s got some ajax goodness and will allow for instance drag and drop mails into their IMAP folders. Please note that to fully benefit from a webmail client your users should use the IMAP capabilities of your server. Which means that all their email is stored on the server and stays accessible.
You need to download the latest code from the Roundcube site.
Extract the archive into the Document root of your Apache installation, in our case /Library/WebServer/Documents.
To be able to install new versions and to migrate easily we setup a symbolic link to the current roundcube directory which we can change when a new vrsion arrives.
Step into the newly created directory and change the permissions on the temp and logs directory so that the webserver can write into these directories with the following commands:
chown -R www:www logs
Next we need to create a database for Roundcube to use. Start up MySQL on the command line and issue the following commands in MySQL:
GRANT ALL PRIVILEGES ON roundcubemail.* TO roundcube@localhost
IDENTIFIED BY 'PASSWORD';
FLUSH PRIVILEGES;
quit
Note: Change the PASSWORD into any password you would like to use, remember it as you need to put it in the configuration file later.
Next we need to create the database structure (tables and such), luckily a script to create all this has been included in the archive. You need to execute the following command to import the script into the database:
or use the next if you have MySQL 5.x. installed:
Next step is modifying the configuration of Roundcube to reflect your situation. Step into the directory config and we will first edit the database connection. Edit the file db.inc.php and change the password in the following line with the password you used earlier:
Next file to edit is the main.inc.php and change the following lines:
Define the host as localhost
But if you use IMAP over SSL as I do you need to use:
If you’ve changed these lines your done with the configuration of Roundcube.
I like to use a subdomains to divide up the specific tasks my webserver does. I use http://webmail.richard5.net to allow users to access their mail. How you can set this up as well is documented here.
If you’ve done that or just used a local directory to use, point your browser to http://webmail.yourdomain.tld or http://yourdomain.tld/roudcube and you should see a login screen appear.
For errors you could check the logfiles to explain what went wrong. For Roundcube errors check the /logs/errors file and for general mail errors check the /var/log/mail.log file.
Next step: Adding a spam filter



11:40 am
Hi all.
I’ve just installed RoundCube following the instructions.
But when I try to login with username and pwd created in postfixadmin the mail.log gives me something like this:
Jun 16 12:38:57 zapytaj-gugla imapd[70]: Connection, ip=[::1]
Jun 16 12:38:57 zapytaj-gugla authdaemond[61]: received auth request, service=imap, authtype=login
Jun 16 12:38:57 zapytaj-gugla authdaemond[61]: authmysql: trying this module
Jun 16 12:38:57 zapytaj-gugla authdaemond[61]: authmysqllib: connected. Versions: header 50038, client 50038, server 50051
Jun 16 12:38:57 zapytaj-gugla authdaemond[61]: SQL query: SELECT username, crypt, password, ‘102′, ‘27′, ‘/usr/local/virtual’, maildir, “”, name, “” FROM mailbox WHERE username = ‘doc@zapytaj-gugla.com.pl’
Jun 16 12:38:57 zapytaj-gugla authdaemond[61]: mysql_query failed, reconnecting: Unknown column ‘crypt’ in ‘field list’
Jun 16 12:38:57 zapytaj-gugla authdaemond[61]: authmysqllib: connected. Versions: header 50038, client 50038, server 50051
Jun 16 12:38:57 zapytaj-gugla imapd[70]: LOGIN FAILED, user=doc@zapytaj-gugla.com.pl, ip=[::1]
Jun 16 12:38:57 zapytaj-gugla imapd[70]: authentication error: Input/output error
Jun 16 12:38:57 zapytaj-gugla authdaemond[61]: mysql_query failed second time, giving up: Unknown column ‘crypt’ in ‘field list’
Jun 16 12:38:57 zapytaj-gugla authdaemond[61]: authmysql: TEMPFAIL - no more modules will be tried
Can anybody help me with this one?
Best Regards,
zetbee
12:16 pm
There is an error in your query, please check your courier-auth config files!