PDA

View Full Version : Easy RoundCube (Over SSL) And Webmin With fail2ban For ISPConfig 3 On Debian Squeeze


JohnnyBeGood
4th March 2011, 10:04
Hi,

I was happy to see there's how-to on roundcube for Debian Squeeze and ISPconfig 3 (http://www.howtoforge.com/easy-roundcube-over-ssl-and-webmin-with-fail2ban-for-ispconfig-3-on-debian-squeeze) because I couldn't get to work with squirrelmail http://www.howtoforge.com/forums/showthread.php?t=50797

After following tutorial to a T I get this error
when trying to access https://www.tld.com/webmail


Secure Connection Failed




An error occurred during a connection to www.tld.com.

SSL received a record that exceeded the maximum permissible length.

(Error code: ssl_error_rx_record_too_long)




* The page you are trying to view can not be shown because the authenticity of the received data could not be verified.

* Please contact the web site owners to inform them of this problem. Alternatively, use the command found in the help menu to report this broken site.



What am I missing?

Thanks in advance!

8omas
4th March 2011, 11:31
You have to type

http://www.tld.com/webmail
or
https://www.tld.com:8080/webmail

the same is for phpmyadmin or whatever else you set up following the guide

The ssl is setup for port 8080

JohnnyBeGood
4th March 2011, 16:06
You have to type

http://www.tld.com/webmail
or
https://www.tld.com:8080/webmail

the same is for phpmyadmin or whatever else you set up following the guide

The ssl is setup for port 8080

I get same error when trying to access either one.
Does ssl needs to be enabled somewhere?

8omas
4th March 2011, 20:17
In the beginning of the HowTo I mention :

If you want to access ISPConfig Panel and webmail through SSL I also assume that you followed the chapter 6.2 Enabling SSL For The ISPConfig Web Interface of The ISPConfig 3 manual (http://www.ispconfig.org/ispconfig-3/ispconfig-3-manual/) (this is only needed if you want to access the control panel AND the webmail interface through ssl on port 8080).

If you followed the above, then I finally assume that you read the workaround in this post (http://www.howtoforge.com/forums/showthread.php?t=51236).


You HAVE to do those things to have SSL over port 8080. After that you can follow anyone of the 2 links in my previous post.

8omas
4th March 2011, 20:29
If you don't have the manual, the following will help:
http://www.faqforge.com/linux/controlpanels/ispconfig3/enable-ssl-for-the-ispconfig-3-controlpanel/

This does NOT include instruction for enabling SuExec for ISPConfig, so you probably will not need the last referred link (http://www.howtoforge.com/forums/showthread.php?t=51236). As I understand it only resolves the removing of symlink to /var/www/ispconfig, which you (probably didn't remove)

JohnnyBeGood
5th March 2011, 12:57
In the beginning of the HowTo I mention :


You HAVE to do those things to have SSL over port 8080. After that you can follow anyone of the 2 links in my previous post.
Sorry, I missed that step. I did not enable ssl. Since I'm supporter of this site I do have ISPconfig manual.

No, I do not need SuExec.

After enabling ssl now I'm able to access roundcube
by typing http://www.tld.com/webmail which redirects me to https://www.tld.com:8080/webmail/ but I get the following error:

DATABASE ERROR: CONNECTION FAILED!

Unable to connect to the database!
Please contact your server-administrator.

If I remember correctly after I issued apt-get install roundcube command it asked if I wanted to auto configure DB, I selected no, I can't quote exact phrase but it was confusing and I thought it would mess up ISPconfig DB.

8omas
5th March 2011, 13:24
This step would simply create the necessary roundcube db. It would ask for a user and a pass.
Remove (purge) and reinstall round cube

8omas
5th March 2011, 14:17
Maybe I must include this to the guide.
When you run apt-get install roundcube, then you'll be asked about the database system to use (I use mysql). After that you'll be asked for the password of the db admin user (usually root). At the end you'll be asked for the password of roundcube database (the db-config system will create the roundcube database and the roundcube user)

If all the above do not help (and you cannot recreate or configure the db) then:

apt-get remove --purge roundcube roundcube-mysql
apt-get install roundcube roundcube-mysql
dpkg-reconfigure roundcube-core

The last one will ask you a lot of questions (assuming that you install on a single server installation, I 'll post some possible answers):
1) ... IMAP = leave blank or enter localhost or even your server's full hostname
2) language = whatever you want
3) Reinstall database? = Yes
4) Database type = mysql
5) Connection method = unix socket
6) Name of the database's administrative user root (almost always .. few people changes this)
7) root password = the administrative user's password (this is needed to create the roundcube db and user)
8) username for roundcube = roundcube (or whatever you want)
9) database name for roundcube = roundcube (or whatever you want)
10) Web server(s) to configure automatically = apache2 (possibly)

If you already created the db, then in the last step you'll get an error. Ignore it, remove the db (roundcube's db) and the roundcube user, with the phpmyadmin and rerun the dpkg-reconfigure roundcube-core.

JohnnyBeGood
5th March 2011, 22:35
Maybe I must include this to the guide.
When you run apt-get install roundcube, then you'll be asked about the database system to use (I use mysql). After that you'll be asked for the password of the db admin user (usually root). At the end you'll be asked for the password of roundcube database (the db-config system will create the roundcube database and the roundcube user)

If all the above do not help (and you cannot recreate or configure the db) then:

apt-get remove --purge roundcube roundcube-mysql
apt-get install roundcube roundcube-mysql
dpkg-reconfigure roundcube-core

The last one will ask you a lot of questions (assuming that you install on a single server installation, I 'll post some possible answers):
1) ... IMAP = leave blank or enter localhost or even your server's full hostname
2) language = whatever you want
3) Reinstall database? = Yes
4) Database type = mysql
5) Connection method = unix socket
6) Name of the database's administrative user root (almost always .. few people changes this)
7) root password = the administrative user's password (this is needed to create the roundcube db and user)
8) username for roundcube = roundcube (or whatever you want)
9) database name for roundcube = roundcube (or whatever you want)
10) Web server(s) to configure automatically = apache2 (possibly)

If you already created the db, then in the last step you'll get an error. Ignore it, remove the db (roundcube's db) and the roundcube user, with the phpmyadmin and rerun the dpkg-reconfigure roundcube-core.

Thank you!
I works now. Finally webmail works because I gave up on trying to get SquirrelMail to work with ISPconfig.
Attached is the step that I messed up and selected "No"
If you can please edit your tutorial and add above instructions it might help some newbie like me :D

8omas
6th March 2011, 00:35
You are right. After your previous post, I realized this and I already updated the guide.
Thanks for the suggestion

tazmon95
20th March 2011, 07:49
Hello,

I've followed the main tutorial on how to set this up and I've gone through the steps of this post twice now and am getting the same error. It looks like everything should work, but when I get to the Roundcube login page and put in my user information, I get a red box that momentarily popup saying:
Connection to IMAP server failed.
After doing more troubleshooting, I found that if I leave the
$rcmail_config['default_host'] = 'localhost';
in the /var/lib/roundcube/config/main.inc.php file blank like this
$rcmail_config['default_host'] = '';
I get a new box for server under the username and password on my login page. I've tried all the different server names I can think of which are setup in my ISPConfig3 panel, however I keep getting a red box saying:
Login Failed
Any help with this would be much appreciated.

Thanks,
~Taz

8omas
20th March 2011, 10:04
Did you set the variable:
auto_create_user = TRUE;
in /var/lib/roundcube/config/main.inc.php ?

Are you sure that you set up correctly the mail server?
The new box that appeared, gives you the ability to choose the mail server to login. If the mail server is local (as the manual assumes) then the localhost is correct.

Please verify that you set the auto_create_user to TRUE

tazmon95
20th March 2011, 11:33
I'm not 100% sure I setup the mail server correct, but everything else seems to be working ok.
$rcmail_config['auto_create_user'] = TRUE;
This line was already in my /var/lib/roundcube/config/main.inc.php file. Do I need to write it differently?

8omas
20th March 2011, 11:55
Do you have the port 143 open on localhost?

what is the output of:
netstat -taun | grep LISTEN

tazmon95
20th March 2011, 19:39
That's a new file for me and I'm not sure how to read it's output:
tcp 0 0 127.0.0.1:783 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 192.168.3.2:80 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:80 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN
tcp 0 0 192.168.3.2:53 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:58756 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:10024 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:10025 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
tcp6 0 0 :::110 :::* LISTEN
tcp6 0 0 :::143 :::* LISTEN
tcp6 0 0 :::81 :::* LISTEN
tcp6 0 0 :::8081 :::* LISTEN
tcp6 0 0 :::21 :::* LISTEN
tcp6 0 0 :::53 :::* LISTEN
tcp6 0 0 :::22 :::* LISTEN
tcp6 0 0 ::1:953 :::* LISTEN
tcp6 0 0 :::443 :::* LISTEN
tcp6 0 0 :::993 :::* LISTEN
tcp6 0 0 :::995 :::* LISTEN


I only see a tcp6 line with 143 on it.

8omas
20th March 2011, 21:28
Me too. So you probably must open the port 143 for tcp/ip v4. If you manage your firewall through ISPconfig then you must go to:
System -> Firewall and add the port 143 to you open ports.

8omas
20th March 2011, 22:31
I think that with ipv6 listening on port 143, the situation is the same. So in simple words, your server is listening.

Keep in mind that
1) You must have a working mail (e.g. the@maildomain.com -- create it through panel)
2) Your login name must be that one (the@maildomain.com --enter it in the user name field of roundcube)
3) The roundcube and courier must be correctly installed.

If you are not sure about roundcube rerun
dpkg-reconfigure roundcube-core

For courier follow the perfect server

tazmon95
21st March 2011, 22:01
8omas, Thanks for helping. I was finally able to login. The main part I was missing was the @mydomain.com from the username.

Also, I can't use Localhost as my server. It still tells me it can't connect to the IMAP server, however if I use the domain name it works. Is there any reason this could be an issue and cause problems later on?

tazmon95
21st March 2011, 22:10
just figured it out. It was my /etc/hosts file. I needed to have localhosts separaate on the 127.0.0.1 line

127.0.0.1 localhost.localdomain localhost

like that.

T1mur
23rd June 2011, 09:34
Hi

i got instaled roundcube like in tutorial.

got small problem and have no idea how to resolve it...
after http://my.domain.org/webmail/ i got

CONFIGURATION ERROR
main.inc.php was not found.
Please read the INSTALL instructions!

what i did wrong after apt-get installation ?

is the owner of main.inc.php should be root ?

root@ns38685:/usr/share/roundcube# ls -l

drwxr-xr-x 2 root root 4096 Jun 22 13:12 bin
lrwxrwxrwx 1 root root 25 Jun 22 13:12 config -> /var/lib/roundcube/config
-rw-r--r-- 1 root root 9829 Oct 31 2009 index.php
lrwxrwxrwx 1 root root 23 Jun 22 13:12 logs -> /var/lib/roundcube/logs
-rw-r--r-- 1 root root 18294 Oct 18 2010 main.inc.php.dist
lrwxrwxrwx 1 root root 26 Jun 22 13:12 plugins -> /var/lib/roundcube/plugins
drwxr-xr-x 7 root root 4096 Jun 22 13:12 program
-rw-r--r-- 1 root root 26 Mar 22 2008 robots.txt
lrwxrwxrwx 1 root root 24 Jun 22 13:12 skins -> /var/lib/roundcube/skins
lrwxrwxrwx 1 root root 23 Jun 22 13:12 temp -> /var/lib/roundcube/temp

/usr/share/roundcube/config# ls -l

lrwxrwxrwx 1 root root 25 Jun 22 13:12 db.inc.php -> /etc/roundcube/db.inc.php
lrwxrwxrwx 1 root root 27 Jun 22 13:12 main.inc.php -> /etc/roundcube/main.inc.php
lrwxrwxrwx 1 root root 28 Jun 22 13:12 mimetypes.php -> /etc/roundcube/mimetypes.php

thxnks.

8omas
23rd June 2011, 13:40
Normally you should not change anything. The installation through package manager is very simple.

Anyway in my system in /etc/roundcube/ all files belong to root:root except debian-db.php and main.inc.php which belong to root:www-data

Do you have any main.inc.php in your /etc/roundcube/ directory?

T1mur
23rd June 2011, 14:18
thanks for replay

yes its look like this :
root@ns38685:/etc/roundcube# ls -l
total 60
-rw-r--r-- 1 root root 1115 Jun 23 12:16 apache.conf
-rw-r--r-- 1 root root 2260 Oct 18 2010 db.inc.php
-rw-rw---- 1 www-data www-data 552 Jun 23 12:28 debian-db.php
-rw-r--r-- 1 root root 567 Sep 27 2009 lighttpd.conf
-rw-r----- 1 root www-data 18307 Jun 23 12:23 main.inc.php
-rw-r----- 1 root www-data 18306 Jun 22 19:38 main.inc.php.ucf-old
-rw-r--r-- 1 root root 2392 Aug 7 2009 mimetypes.php

regards


EDIT

i made some progerss ...
chroot 664 main.inc.php

now i have :

DATABASE ERROR: CONNECTION FAILED!

Unable to connect to the database!
Please contact your server-administrator.

wrrrr... Any idea what else can be wrong ?
thanx

8omas
25th June 2011, 11:51
It seems that you didn't do the installation correct.
Please read the last posts of the first page of this thread.
It's a reinstall procedure of roundcube.

T1mur
25th June 2011, 17:13
well i did what u tell me and got this same error with main.inc.php but after chmod it works no more problems thx very much

regards.

Wisdown
5th September 2012, 11:03
Was following the guide

And i havent added those lines:

[CODE]
<IfModule mod_rewrite.c>
<IfModule mod_ssl.c>
<Location /webmail>
RewriteEngine on
RewriteCond %{HTTPS} !^on$ [NC]
RewriteRule . https://%{HTTP_HOST}:50443%{REQUEST_URI} [L]
</Location>
</IfModule>
</IfModule>

<IfModule mod_rewrite.c>
<IfModule mod_ssl.c>
<Location /roundcube>
RewriteEngine on
RewriteCond %{HTTPS} !^on$ [NC]
RewriteRule . https://%{HTTP_HOST}:50443%{REQUEST_URI} [L]
</Location>
</IfModule>
</IfModule>
[/QUOTE]

But the roundcube only works on (show login screen only):

https://maindomain.com:8080/webmail

Whats is missing on the guide?

Trying access from any other domain i get:

http://otherdomain.com/webmail
ERROR 500 - Internal Server Error!


And therenothing on /varlog/apache2/access.log or /varlog/apache2/error.log
Im on debian 6, fresh install once more time...

8omas
5th September 2012, 12:50
You wasn't Following the Easy Roundcube over SSL guide, but the Extending Perfect Server guide.

The first guide, assumes some things in the beggining. Did you follow them?
The second uses https and a different port (the lines that you haven't add)

Wisdown
5th September 2012, 13:09
What things you mean?

I have an multiserver enviroment working, one server for mail, other for web, other for database, other 2 for dns.

I just dindt added the squirrell mail, was choosing between horde and roundcube so i tried folow this tutorial:

http://www.howtoforge.com/virtual-multiserver-environment-with-dedicated-web-mysql-email-dns-servers-on-debian-squeeze-with-ispconfig-3-p4

To increase the security, and followed the setup for get roundcube working, but dindt worked...

8omas
5th September 2012, 13:29
What things you mean?

I have an multiserver enviroment working, one server for mail, other for web, other for database, other 2 for dns.

I just dindt added the squirrell mail, was choosing between horde and roundcube so i tried folow this tutorial:

http://www.howtoforge.com/virtual-multiserver-environment-with-dedicated-web-mysql-email-dns-servers-on-debian-squeeze-with-ispconfig-3-p4

To increase the security, and followed the setup for get roundcube working, but dindt worked...

To increase security you have to redirect to https.
Do you enabled ssl access (https) for ispconfig?
If yes, you should redirect roundcube.
If no, normally, you can access roundcube at
http://youdomain.xx/webmail
or
http://yourdomain.xx/roundcube

ALL THE ABOVE are correct for SINGLE server setup.

I assume that for multiserver setup, you have to install roundcube at the same server as the webserver and configure roundcube accordingly.
Or you have to install another apache at the same server as mail (VERY BAD CHOISE).

In every case if you want ssl you need the redirection. If you don't want ssl you sould be able to access the /webmail based on the config file at:
/etc/apache2/conf.d/roundcube.conf

8omas
5th September 2012, 13:37
I just see
7.2.6 Installing RoundCube
at
http://www.howtoforge.com/virtual-multiserver-environment-with-dedicated-web-mysql-email-dns-servers-on-debian-squeeze-with-ispconfig-3-p4

I wrote the above but at http://www.howtoforge.com/extending-perfect-server-debian-squeeze-ispconfig-3-p2 which is a SINGLE perfect server setup.

I assume that you have to make some modifications as the webserver is not at the same machine with the mail server.

Wisdown
5th September 2012, 13:40
I`m not willing enable https, since i only have one IP, and i`m behind NAT...
Because this i have ignored the 2 lines for https, there an note:

If you want SSL you should include the last two directives (IfModule mod_rewrite.c) to have apache ALWAYS redirect to your SSL installation of ISPConfig.

Like i sayed, i dont wanna SSL, so i have ignored those 2 steps from the guide...


ALL THE ABOVE are correct for SINGLE server setup.

I assume that for multiserver setup, you have to install roundcube at the same server as the webserver and configure roundcube accordingly.
Or you have to install another apache at the same server as mail (VERY BAD CHOISE).

In every case if you want ssl you need the redirection. If you don't want ssl you sould be able to access the /webmail based on the config file at:
/etc/apache2/conf.d/roundcube.conf

The title of post i was following says :

Multisever setup, because this i was following the guide:

http://www.howtoforge.com/virtual-multiserver-environment-with-dedicated-web-mysql-email-dns-servers-on-debian-squeeze-with-ispconfig-3-p4

The problem is exact it, i dont wanna the SSL, i dindt have setted anything to SSL, but the results is send me to SSL, only for see the login screen, since the authentication is failing, but this is an issue with my mailserver.
I think i need set on

/etc/apache2/conf.d/roundcube.conf

To use TLS, i see an example to add tls://mail.domain.com, i tried and failed too, i`m not sure if i will need set an account info to do the login, and if using this info on other fields of this file, other domains dont gonna get the right accounts on authentication.

Sorry but i`m learning how mail system works.

8omas
5th September 2012, 13:48
can you post the /etc/apache2/conf.d/roundcube.conf

8omas
5th September 2012, 13:52
One more thing.
You have to tell roundcube which is your mailserver at /etc/roundcube/main.inc.php

Wisdown
5th September 2012, 13:59
Sure here is:


# Those aliases do not work properly with several hosts on your apache server
# Uncomment them to use it or adapt them to your configuration
# Alias /roundcube/program/js/tiny_mce/ /usr/share/tinymce/www/
Alias /roundcube /var/lib/roundcube
Alias /webmail /var/lib/roundcube

# Access to tinymce files
<Directory "/usr/share/tinymce/www/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order allow,deny
allow from all
</Directory>

<Directory /var/lib/roundcube/>
Options +FollowSymLinks
# This is needed to parse /var/lib/roundcube/.htaccess. See its
# content before setting AllowOverride to None.
AllowOverride All
order allow,deny
allow from all
</Directory>

# Protecting basic directories:
<Directory /var/lib/roundcube/config>
Options -FollowSymLinks
AllowOverride None
</Directory>

<Directory /var/lib/roundcube/temp>
Options -FollowSymLinks
AllowOverride None
Order allow,deny
Deny from all
</Directory>

<Directory /var/lib/roundcube/logs>
Options -FollowSymLinks
AllowOverride None
Order allow,deny
Deny from all
</Directory>

Wisdown
5th September 2012, 14:06
My main.inc.php


<?php

/*
+-----------------------------------------------------------------------+
| Main configuration file |
| |
| This file is part of the RoundCube Webmail client |
| Copyright (C) 2005-2009, RoundCube Dev. - Switzerland |
| Licensed under the GNU GPL |
| |
+-----------------------------------------------------------------------+

*/

$rcmail_config = array();

// system error reporting: 1 = log; 2 = report (not implemented yet), 4 = show, 8 = trace
$rcmail_config['debug_level'] = 1;

// log driver: 'syslog' or 'file'.
$rcmail_config['log_driver'] = 'file';

// date format for log entries
// (read http://php.net/manual/en/function.date.php for all format characters)
$rcmail_config['log_date_format'] = 'd-M-Y H:i:s O';

// Syslog ident string to use, if using the 'syslog' log driver.
$rcmail_config['syslog_id'] = 'roundcube';

// Syslog facility to use, if using the 'syslog' log driver.
// For possible values see installer or http://php.net/manual/en/function.openlog.php
$rcmail_config['syslog_facility'] = LOG_USER;

// use this folder to store log files (must be writeable for apache user)
// This is used by the 'file' log driver.
$rcmail_config['log_dir'] = 'logs/';

// use this folder to store temp files (must be writeable for apache user)
$rcmail_config['temp_dir'] = 'temp/';

// List of active plugins (in plugins/ directory)
$rcmail_config['plugins'] = array('fail2ban');

// enable caching of messages and mailbox data in the local database.
// this is recommended if the IMAP server does not run on the same machine
$rcmail_config['enable_caching'] = FALSE;

// lifetime of message cache
// possible units: s, m, h, d, w
$rcmail_config['message_cache_lifetime'] = '10d';

// enforce connections over https
// with this option enabled, all non-secure connections will be redirected.
// set the port for the ssl connection as value of this option if it differs from the default 443
$rcmail_config['force_https'] = FALSE;

// automatically create a new RoundCube user when log-in the first time.
// a new user will be created once the IMAP login succeeds.
// set to false if only registered users can use this service
$rcmail_config['auto_create_user'] = TRUE;

// the mail host chosen to perform the log-in
// leave blank to show a textbox at login, give a list of hosts
// to display a pulldown menu or set one host as string.
// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
$rcmail_config['default_host'] = 'tls://mail.server.com';

// TCP port used for IMAP connections
$rcmail_config['default_port'] = 143;

// IMAP auth type. Can be "auth" (CRAM-MD5), "plain" (PLAIN) or "check" to auto detect.
// Optional, defaults to "check"
$rcmail_config['imap_auth_type'] = check;

// If you know your imap's root directory and its folder delimiter,
// you can specify them here. Otherwise they will be determined automatically.
$rcmail_config['imap_root'] = null;
$rcmail_config['imap_delimiter'] = null;

// Automatically add this domain to user names for login
// Only for IMAP servers that require full e-mail addresses for login
// Specify an array with 'host' => 'domain' values to support multiple hosts
$rcmail_config['username_domain'] = '';

// This domain will be used to form e-mail addresses of new users
// Specify an array with 'host' => 'domain' values to support multiple hosts
$rcmail_config['mail_domain'] = 'mail.server.com';

// Path to a virtuser table file to resolve user names and e-mail addresses
$rcmail_config['virtuser_file'] = '';

// Query to resolve user names and e-mail addresses from the database
// %u will be replaced with the current username for login.
// The query should select the user's e-mail address as first column
// and optional identity name as second column
$rcmail_config['virtuser_query'] = '';

// use this host for sending mails.
// to use SSL connection, set ssl://smtp.host.com
// if left blank, the PHP mail() function is used
// Use %h variable as replacement for user's IMAP hostname
$rcmail_config['smtp_server'] = 'mail.server.com';

// SMTP port (default is 25; 465 for SSL)
$rcmail_config['smtp_port'] = 25;

// SMTP username (if required) if you use %u as the username RoundCube
// will use the current username for login
$rcmail_config['smtp_user'] = '';

// SMTP password (if required) if you use %p as the password RoundCube
// will use the current user's password for login
$rcmail_config['smtp_pass'] = '';

// SMTP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or empty to use
// best server supported one)
$rcmail_config['smtp_auth_type'] = '';

// SMTP HELO host
// Hostname to give to the remote server for SMTP 'HELO' or 'EHLO' messages
// Leave this blank and you will get the server variable 'server_name' or
// localhost if that isn't defined.
$rcmail_config['smtp_helo_host'] = '';

// Log sent messages
$rcmail_config['smtp_log'] = TRUE;

// Log SQL queries to <log_dir>/sql or to syslog
$rcmail_config['sql_debug'] = false;

// Log IMAP conversation to <log_dir>/imap or to syslog
$rcmail_config['imap_debug'] = false;

// Log LDAP conversation to <log_dir>/ldap or to syslog
$rcmail_config['ldap_debug'] = false;

// Log SMTP conversation to <log_dir>/smtp or to syslog
$rcmail_config['smtp_debug'] = false;

// How many seconds must pass between emails sent by a user
$rcmail_config['sendmail_delay'] = 0;

// These cols are shown in the message list. Available cols are:
// subject, from, to, cc, replyto, date, size, flag, attachment
$rcmail_config['list_cols'] = array('subject', 'from', 'date', 'size', 'flag', 'attachment');

// Includes should be interpreted as PHP files
$rcmail_config['skin_include_php'] = FALSE;

// Session lifetime in minutes
// must be greater than 'keep_alive'/60
$rcmail_config['session_lifetime'] = 10;

// check client IP in session athorization
$rcmail_config['ip_check'] = false;

// Use an additional frequently changing cookie to athenticate user sessions.
// There have been problems reported with this feature.
$rcmail_config['double_auth'] = false;

// this key is used to encrypt the users imap password which is stored
// in the session record (and the client cookie if remember password is enabled).
// please provide a string of exactly 24 chars.
$rcmail_config['des_key'] = 'cClrkMhiwtuFtbYx7n][ntO3';

// the default locale setting (leave empty for auto-detection)
// RFC1766 formatted language name like en_US, de_DE, de_CH, fr_FR, pt_BR
$rcmail_config['language'] = 'pt_BR';

// use this format for short date display (date or strftime format)
$rcmail_config['date_short'] = 'D H:i';

// use this format for detailed date/time formatting (date or strftime format)
$rcmail_config['date_long'] = 'd.m.Y H:i';

// use this format for today's date display (date or strftime format)
$rcmail_config['date_today'] = 'H:i';

// add this user-agent to message headers when sending
$rcmail_config['useragent'] = 'RoundCube Webmail/'.RCMAIL_VERSION;

// use this name to compose page titles
$rcmail_config['product_name'] = 'RoundCube Webmail';

// store draft message is this mailbox
// leave blank if draft messages should not be stored
$rcmail_config['drafts_mbox'] = 'Drafts';

// store spam messages in this mailbox
$rcmail_config['junk_mbox'] = 'Junk';

// store sent message is this mailbox
// leave blank if sent messages should not be stored
$rcmail_config['sent_mbox'] = 'Sent';

// move messages to this folder when deleting them
// leave blank if they should be deleted directly
$rcmail_config['trash_mbox'] = 'Trash';

// display these folders separately in the mailbox list.
// these folders will also be displayed with localized names
$rcmail_config['default_imap_folders'] = array('INBOX', 'Drafts', 'Sent', 'Junk', 'Trash');

// automatically create the above listed default folders on login
$rcmail_config['create_default_folders'] = FALSE;

// protect the default folders from renames, deletes, and subscription changes
$rcmail_config['protect_default_folders'] = TRUE;

// if in your system 0 quota means no limit set this option to TRUE
$rcmail_config['quota_zero_as_unlimited'] = FALSE;

// Behavior if a received message requests a message delivery notification (read receipt)
// 0 = ask the user, 1 = send automatically, 2 = ignore (never send or ask)
$rcmail_config['mdn_requests'] = 0;

// Use this charset as fallback for message decoding
$rcmail_config['default_charset'] = 'UTF-8';

// Make use of the built-in spell checker. It is based on GoogieSpell.
// Since Google only accepts connections over https your PHP installatation
// requires to be compiled with Open SSL support
$rcmail_config['enable_spellcheck'] = TRUE;

// Set the spell checking engine. 'googie' is the default. 'pspell' is also available,
// but requires the Pspell extensions. When using Nox Spell Server, also set 'googie' here.
$rcmail_config['spellcheck_engine'] = 'pspell';

// For a locally installed Nox Spell Server, please specify the URI to call it.
// Get Nox Spell Server from http://orangoo.com/labs/?page_id=72
// Leave empty to use the Google spell checking service, what means
// that the message content will be sent to Google in order to check spelling
$rcmail_config['spellcheck_uri'] = '';

// These languages can be selected for spell checking.
// Configure as a PHP style hash array: array('en'=>'English', 'de'=>'Deutsch');
// Leave empty for default set of available language.
$rcmail_config['spellcheck_languages'] = 'pt_br';

// path to a text file which will be added to each sent message
// paths are relative to the RoundCube root folder
$rcmail_config['generic_message_footer'] = '';

// add a received header to outgoing mails containing the creators IP and hostname
$rcmail_config['http_received_header'] = false;

// Whether or not to encrypt the IP address and the host name
// these could, in some circles, be considered as sensitive information;
// however, for the administrator, these could be invaluable help
// when tracking down issues.
$rcmail_config['http_received_header_encrypt'] = false;

// this string is used as a delimiter for message headers when sending
// leave empty for auto-detection
$rcmail_config['mail_header_delimiter'] = NULL;

// session domain: .example.org
$rcmail_config['session_domain'] = '';

// This indicates which type of address book to use. Possible choises:
// 'sql' (default) and 'ldap'.
// If set to 'ldap' then it will look at using the first writable LDAP
// address book as the primary address book and it will not display the
// SQL address book in the 'Address Book' view.
$rcmail_config['address_book_type'] = 'sql';

// In order to enable public ldap search, configure an array like the Verisign
// example further below. if you would like to test, simply uncomment the example.
$rcmail_config['ldap_public'] = array();

//
// If you are going to use LDAP for individual address books, you will need to
// set 'user_specific' to true and use the variables to generate the appropriate DNs to access it.
//
// The recommended directory structure for LDAP is to store all the address book entries
// under the users main entry, e.g.:
//
// o=root
// ou=people
// uid=user@domain
// mail=contact@contactdomain
//
// So the base_dn would be uid=%fu,ou=people,o=root
// The bind_dn would be the same as based_dn or some super user login.
/*
* example config for Verisign directory
*
$rcmail_config['ldap_public']['Verisign'] = array(
'name' => 'Verisign.com',
'hosts' => array('directory.verisign.com'),
'port' => 389,
'use_tls' => false,
'user_specific' => false, // If true the base_dn, bind_dn and bind_pass default to the user's IMAP login.
// %fu - The full username provided, assumes the username is an email
// address, uses the username_domain value if not an email address.
// %u - The username prior to the '@'.
// %d - The domain name after the '@'.
'base_dn' => '',
'bind_dn' => '',
'bind_pass' => '',
'writable' => false, // Indicates if we can write to the LDAP directory or not.
// If writable is true then these fields need to be populated:
// LDAP_Object_Classes, required_fields, LDAP_rdn
'LDAP_Object_Classes' => array("top", "inetOrgPerson"), // To create a new contact these are the object classes to specify (or any other classes you wish to use).
'required_fields' => array("cn", "sn", "mail"), // The required fields needed to build a new contact as required by the object classes (can include additional fields not required by the object classes).
'LDAP_rdn' => 'mail', // The RDN field that is used for new entries, this field needs to be one of the search_fields, the base of base_dn is appended to the RDN to insert into the LDAP directory.
'ldap_version' => 3, // using LDAPv3
'search_fields' => array('mail', 'cn'), // fields to search in
'name_field' => 'cn', // this field represents the contact's name
'email_field' => 'mail', // this field represents the contact's e-mail
'surname_field' => 'sn', // this field represents the contact's last name
'firstname_field' => 'gn', // this field represents the contact's first name
'sort' => 'cn', // The field to sort the listing by.
'scope' => 'sub', // search mode: sub|base|list
'filter' => '', // used for basic listing (if not empty) and will be &'d with search queries. example: status=act
'fuzzy_search' => true); // server allows wildcard search
*/

// An ordered array of the ids of the addressbooks that should be searched
// when populating address autocomplete fields server-side. ex: array('sql','Verisign');
$rcmail_config['autocomplete_addressbooks'] = array('sql');

// don't allow these settings to be overriden by the user
$rcmail_config['dont_override'] = array();

// Set identities access level:
// 0 - many identities with possibility to edit all params
// 1 - many identities with possibility to edit all params but not email address
// 2 - one identity with possibility to edit all params
// 3 - one identity with possibility to edit all params but not email address
$rcmail_config['identities_level'] = 0;

// try to load host-specific configuration
// see http://trac.roundcube.net/wiki/Howto_Config for more details
$rcmail_config['include_host_config'] = false;

// don't let users set pagesize to more than this value if set
$rcmail_config['max_pagesize'] = 200;

// mime magic database
$rcmail_config['mime_magic'] = '/usr/share/file/magic';

// default sort col
$rcmail_config['message_sort_col'] = 'date';

// default sort order
$rcmail_config['message_sort_order'] = 'DESC';

// THIS OPTION WILL ALLOW THE INSTALLER TO RUN AND CAN EXPOSE SENSITIVE CONFIG DATA.
// ONLY ENABLE IT IF YOU'RE REALLY SURE WHAT YOU'RE DOING!
$rcmail_config['enable_installer'] = false;

// Log successful logins
$rcmail_config['log_logins'] = false;

/**
* 'Delete always'
* This setting reflects if mail should be always marked as deleted,
* even if moving to "Trash" fails. This is necessary in some setups
* because a) people may not have a Trash folder or b) they are over
* quota (and Trash is included in the quota).
*
* This is a failover setting for iil_C_Move when a message is moved
* to the Trash.
*/
$rcmail_config['delete_always'] = false;

// Minimal value of user's 'keep_alive' setting (in seconds)
// Must be less than 'session_lifetime'
$rcmail_config['min_keep_alive'] = 60;

// Enable DNS checking for e-mail address validation
$rcmail_config['email_dns_check'] = false;

/***** these settings can be overwritten by user's preferences *****/

// skin name: folder from skins/
$rcmail_config['skin'] = 'default';

// show up to X items in list view
$rcmail_config['pagesize'] = 40;

// use this timezone to display date/time
$rcmail_config['timezone'] = 'auto';

// is daylight saving On?
$rcmail_config['dst_active'] = (bool)date('I');

// prefer displaying HTML messages
$rcmail_config['prefer_html'] = TRUE;

// display remote inline images
// 0 - Never, always ask
// 1 - Ask if sender is not in address book
// 2 - Always show inline images
$rcmail_config['show_images'] = 0;

// compose html formatted messages by default
$rcmail_config['htmleditor'] = FALSE;

// show pretty dates as standard
$rcmail_config['prettydate'] = TRUE;

// save compose message every 300 seconds (5min)
$rcmail_config['draft_autosave'] = 60;

// default setting if preview pane is enabled
$rcmail_config['preview_pane'] = FALSE;

// focus new window if new message arrives
$rcmail_config['focus_on_new_message'] = true;

// Clear Trash on logout
$rcmail_config['logout_purge'] = FALSE;

// Compact INBOX on logout
$rcmail_config['logout_expunge'] = FALSE;

// Display attached images below the message body
$rcmail_config['inline_images'] = TRUE;

// Encoding of long/non-ascii attachment names:
// 0 - Full RFC 2231 compatible
// 1 - RFC 2047 for 'name' and RFC 2231 for 'filename' parameter (Thunderbird's default)
// 2 - Full 2047 compatible
$rcmail_config['mime_param_folding'] = 1;

// Set TRUE if deleted messages should not be displayed
// This will make the application run slower
$rcmail_config['skip_deleted'] = FALSE;

// Set true to Mark deleted messages as read as well as deleted
// False means that a message's read status is not affected by marking it as deleted
$rcmail_config['read_when_deleted'] = TRUE;

// Set to TRUE to newer delete messages immediately
// Use 'Purge' to remove messages marked as deleted
$rcmail_config['flag_for_deletion'] = FALSE;

// Default interval for keep-alive/check-recent requests (in seconds)
// Must be greater than or equal to 'min_keep_alive' and less than 'session_lifetime'
$rcmail_config['keep_alive'] = 60;

// If true all folders will be checked for recent messages
$rcmail_config['check_all_folders'] = FALSE;

// If true, after message delete/move, the next message will be displayed
$rcmail_config['display_next'] = FALSE;

// If true, messages list will be sorted by message index instead of message date
$rcmail_config['index_sort'] = TRUE;

// end of config file
?>



I have changed the domain name, but is like the example, mail.mydomain.com

Wisdown
6th September 2012, 01:26
Reading this guide:

http://www.howtoforge.com/how-to-install-roundcube-0.7-for-ispconfig-3-on-debian-squeeze

On comments i see an guy saying to add:


<IfModule mod_php5.c>
AddType application/x-httpd-php .php

php_flag magic_quotes_gpc Off
php_flag track_vars On
php_flag register_globals Off
php_value include_path .
</IfModule>


I did and now i dont gt more the error 500, only blank pages...

8omas
14th September 2012, 23:06
In /etc/roundcube/main.inc.php you have:
// the mail host chosen to perform the log-in
// leave blank to show a textbox at login, give a list of hosts
// to display a pulldown menu or set one host as string.
// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
$rcmail_config['default_host'] = 'tls://mail.server.com';

Is this your mail server?
You must edit this file to reflect your servers

Wisdown
23rd September 2012, 00:37
Sorry for the delay on asnwer, i`m on exams at university.

I changed the realname of my server before post here.

Instead use the previous guide, i did an manual instalation and worked fine, so i think for me the best way is keep roundcube in manual mode instead be able to use the previous guide allowing have automatic updates with:

apt-get -y install upgrade