v0.9 Settings

 

 


V 0.9.5 Setting

 

Log:

// 1 = log; 4 = show, 8 = trace            <-- How to avoid or hide php imap login error message => "0"
$config['debug_level'] = 1;

// Log session authentication errors
$config['log_session'] = true;

$config['smtp_log'] = true;

$config['log_driver'] = "file";        <--- /usr/share/roundcubemail/logs

IMAP server configuration:

// 當沒有填時, 那會在 web page 就可以填入 Server

$config['default_host'] = "127.0.0.1";        

$rcmail_config['default_port'] = 143;

// Default: 0 (當 0 時, 會食 default_socket_timeout, default: 60s)

$config['imap_timeout'] = 300;

# Cache Setting

$config['imap_cache'] = 'db';
$config['messages_cache'] = true;
// Lifetime of IMAP indexes cache.
$config['imap_cache_ttl'] = '3d';
// Lifetime of messages cache.
$config['messages_cache_ttl'] = '3d';
// Maximum cached message size in kilobytes.
$config['messages_cache_threshold'] = 50;

SMTP:

// If left blank, the PHP mail() function is used
$config['smtp_server'] = 'localhost';
$config['smtp_port'] = 587;
$config['smtp_user'] = '%u';
$config['smtp_pass'] = '%p';
$config['smtp_timeout'] = 120;

Troubleshoot:

postfix/sendmail[3297]: fatal: open /etc/postfix/main.cf

解決:

$rcmail_config['smtp_server'] = '127.0.0.1';
$rcmail_config['smtp_port'] = 25;

 

Auto create user (roundcube user)

 //'auto_create_user' property in main.inc.php.

// user_id    username    mail_host    created    last_login    language    preferences

# False, the login only succeeds if there's a matching user-record in the local RoundCube database.

 

HTTP:

$rcmail_config['force_https'] = false;

$rcmail_config['use_https'] = false; <-- when you're running Roundcube behind a https proxy

 

Security:

// 0 - disabled (default), 1 - username and host only, 2 - username, host, password

$rcmail_config['login_autocomplete'] = 1;

// default: false

$rcmail_config['ip_check'] = true;

// Maximum number of recipients per message. Default: 0 (no limit)

$rcmail_config['max_recipients'] = 0;

// all non-secure connections will be redirected.

$config['force_https'] = false;

UI:

//

$config['language'] = "zh_TW";

//

$config['default_charset'] = 'UTF-8';

// 那 Editor 係 tinymce 來 (位於: ./program/js/tinymce/tinymce.min.js)

$config['htmleditor'] = 1;

//

$config['list_cols'] = array('subject', 'status', 'from', 'date', 'size', 'flag', 'attachment');

// checking for new messages

$config['refresh_interval'] = 60;

//

$config['draft_autosave'] = 300;

// 0  - place cursor below the original message (Default: 0)

$config['reply_mode'] = 1;

// preview pane

$config['preview_pane'] = true;

// 更改自己寄件人的 e-mail

$config['identities_level'] = 4;

Login

// Automatically add this domain to user names for login

$rcmail_config['username_domain'] = "mail.test.local";

// compose page titles

$rcmail_config['product_name'] = 'My Webmail';

local user domain

New Roundcube identities get a '@localhost' domain part for their Email address.

$config['mail_domain'] = 'my.domain';

Timeout

// default: 10

rcmail_config['session_lifetime'] = 30;             // 單位 minute

Default_folders(Auto creation of imap folders):

// protect the default folders from renames, deletes, and subscription changes

$rcmail_config['protect_default_folders'] = true;

// 定義要 auto create 的 folder 名

$config['drafts_mbox'] = 'Drafts';
$config['junk_mbox'] = 'Junk';
$config['sent_mbox'] = 'Sent';
$config['trash_mbox'] = 'Trash';

// # automatically create folders(Drafts, Junk, Sent, Trash) on first login

$rcmail_config['create_default_folders'] = true;

 


memcache

 

yum install php-pecl-memcache memcached

/etc/sysconfig/memcached

#PORT="11211"
OPTIONS="-a 666 -s /tmp/memcached.sock"

用 unix 比 tcp 高效能

roundcube config

Cache generic IMAP metadata, such as lists of mailboxes, and the last known status of each mailbox in that list.

$config['imap_cache'] = 'memcache';
$config['memcache_hosts'] = /tmp/memcached.sock
$config['imap_cache_ttl'] = '10d';

Remark

memcache_hosts 的 Value 是個 array 來, default null

e.g. array( 'localhost:11211', '192.168.1.12:11211', 'unix:///var/tmp/memcached.sock' );

 


Deleted messages(Compact)

 

RoundCube by default move messages to the Trash folder when hitting the delete button.

$rcmail_config['trash_mbox'] = '';
$rcmail_config['flag_for_deletion'] = true;
$rcmail_config['skip_deleted'] = false;

Messages will now be marked as deleted which can be reverted again.

To finally remove them, the user needs to click "Compact" below the folder list.

 


Database Setup

 

在 db.inc.php 內要填上 db 的 username 及 password

在 /usr/share/roundcubemail/SQL 內有建立及升級 DB 的 sql script

 

Creative Commons license icon Creative Commons license icon