Roundcube: Difference between revisions

From Edgar BV Wiki
Jump to navigation Jump to search
Line 88: Line 88:
If a user has multiple @domain.ext set in the file, then it makes multiple entries you can choose from as your from address.
If a user has multiple @domain.ext set in the file, then it makes multiple entries you can choose from as your from address.


Find in /etc/roundcube/main.inc.php
Find in /etc/roundcube/config.inc.php
<pre>
<pre>
$rcmail_config['plugins'] = array('virtuser_file');
$rcmail_config['plugins'] = array('virtuser_file');

Revision as of 06:52, 17 September 2024

Installation

Download the files and unzip to /usr/share/roundcube

Chown www-data:www-data the temp and logs directories

link from /var/lib/roundcube to /usr/share/roundcube

ln -s /var/log/roundcube /usr/share/roundcube/logs
ln -s /etc/roundcube/ /var/lib/config
ln -s /usr/share/roundcube/robots.txt /var/lib/roundcube/robots.txt
ln -s /etc/roundcube/htaccess /var/lib/roundcube/.htaccess
ln -s /usr/share/roundcube/program /var/lib/roundcube/program

edit a conffile in /etc/apache2/conf-enabled

Alias /roundcube /usr/share/roundcube
<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>

run the installer

change the following in /etc/roundcube/config.inc.php

$config['default_host'] = 'localhost';
$config['product_name'] = 'Edgar BV Webmail';

Installation obsolete

There is no jessie roundcube :(

We're going to get the backport version as it's much much better

so in /etc/apt/sources.list add

deb http://backports.debian.org/debian-backports squeeze-backports main

and to install

apt-get -t squeeze-backports install roundcube roundcube-mysql roundcube-plugins roundcube-plugins-extra

You will need mysql-server, apache2 and php5 as well.

then in /etc/roundcube/apache.conf

uncomment:
    Alias /roundcube/program/js/tiny_mce/ /usr/share/tinymce/www/
    Alias /roundcube /var/lib/roundcube

in /etc/roundcube/main.inc.php change

$rcmail_config['htmleditor'] = 0; to 1
$rcmail_config['preview_pane'] = 0; to 1
$rcmail_config['default_host'] = '127.0.0.1';
$rcmail_config['language'] = 'nl_NL';

Settings that need looking at and haven't been enabled yet!

$rcmail_config['smtp_server'] = 'localhost';
$rcmail_config['smtp_user'] = '%u';
$rcmail_config['smtp_pass'] = '%p';

in /usr/local/etc/php.ini

upload_max_filesize = 5M

Plugins

virtuser_file

This comes with the roundcube-plugins package and makes roundcube read the identities (@domain.ext) from a file in the format:

email@domain.ext user

email2@domain2.ext user2


If a user has multiple @domain.ext set in the file, then it makes multiple entries you can choose from as your from address.

Find in /etc/roundcube/config.inc.php

$rcmail_config['plugins'] = array('virtuser_file');

To enable it. and then all the way at the bottom set

$rcmail_config['virtuser_file'] = '/etc/postfix/virtual';

NB: This only reads the identities the first time a user logs in!

DragnDrop Attachments

You can find that here

download, then unzip and mv to /var/lib/roundcube/plugins/dragndrop_attachments/

In main.inc.php

$rcmail_config['plugins'] = array('virtuser_file','vcard_attachments','show_additional_headers','emoticons','jqueryui','dragndrop_attachments', 'vacation');

NB dragndrop_attachments.js has a hardcoded max message size in it!

Google Contacts

Syncs your Google account with the adress book. Find it here

Download, then unzip and mv to /var/lib/roundcube/plugins/google_contacts/

Add the SQL in the file, move the config/config.inc.php.dist to config.inc.php (might want to change $rcmail_config['google_contacts_max_results'] = 1000; to a higher number)

Download the Zend GData API's. In that file there is a subdirectory somewhere called Zend, which you copy to /var/lib/roundcube/program/lib/Zend/

In main.inc.php

$rcmail_config['plugins'] = array('virtuser_file','vcard_attachments','show_additional_headers','emoticons','jqueryui','dragndrop_attachments', 'vacation','google_contacts');

If you get a bad authentication error, you need to ensure that in Personal Settings -> Address Book the account has been filled in with everything after the @ as well. If you still get the error, gmail may have sent you a message saying that you need to authenticate the new device. There should be a link to allow this in that mail.

This also creates a log in /var/log/roundcube/google_contacts

If /var/log/roundcube/errors starts giving memory exhausted errors you need to edit the memory_limit in /var/lib/roundcube/.htaccess

404 error with photo's can be solved by commenting out everything before 'start photo' and 'end photo'. This is because roundcube 7.2 (debian wheezy) doesn't support photo's.

404 error with photos

May have to look at 503 error

Automatic Addressbook

Automatically adds people you send a mail to to an address book. Get it here

Vacation autoresponder

Download it from here

unzip it to /var/lib/roundcube/plugins/vacation/

The config.ini should look like this:

[default]
driver = "ftp"
subject = "Afwezig"
body = "default.txt"

[dotforward]
binary = "/usr/bin/vacation"
flags = ""
message = ".vacation.msg"
database = ".vacation.db"
alias_identities = true
set_envelop_sender = false
always_keep_message = true

in Roundcube 0.5 the page layout has changed and the plugin displays incorrectly. To fix this, edit

plugins/vacation/skins/default/vacation.css

and add in some padding:

#pagecontent {
width: 800px;
padding-top:70px;
}

Also edit plugins/vacation/default.txt

Note that it won't save the autoresponder message and subject if you don't tick the checkbox on the top of the page (which we've moved down a bit above)

Finally, add 'vacation' to the $rcmail_config['plugins'] in roundcube main.inc.php

You can find the auto reply in the settings

Changing max attachment filesize

Make sure the following settings are correct:

php

/etc/php5/apache2/php.ini:post_max_size = 100M
/etc/php5/apache2/php.ini:upload_max_filesize = 100M

postfix

/etc/postfix/main.cf:mailbox_size_limit = 0
/etc/postfix/main.cf:message_size_limit = 104857600

roundcube

/usr/share/roundcube/.htaccess:php_value    upload_max_filesize     100M
/usr/share/roundcube/.htaccess:php_value    post_max_size           100M
NB
maybe also /etc/roundcube/htaccess

drag 'n drop attachments

/var/lib/roundcube/plugins/dragndrop_attachments/dragndrop_attachments.js: if(total_size > 100000000
/var/lib/roundcube/plugins/dragndrop_attachments/localization/en_US.inc:$labels['files_to_upload_bigger_than_allowed'] = 'The size of the files exceeds the maximum allowed size (100 Mb)';
/var/lib/roundcube/plugins/dragndrop_attachments/localization/en_GB.inc:$labels['files_to_upload_bigger_than_allowed'] = 'The size of the files exceeds the maximum allowed size (100 Mb)';

Important when testing!

NB. when testing, you may need to delete the users from the roundcube mysql database to check if certain settings are being set before logging in (the identities and users table)

Also there is a

/var/log/roundcube/error.log

you can consult