ZhangHuangbin wrote:grep -Ev '^(//|/\*| *\*|#)' /usr/local/www/roundcube/config/main.inc.php | grep -v '^$'
# grep -Ev '^(//|/\*| *\*|#)' /usr/local/www/roundcube/config/main.inc.php | grep -v '^$'
<?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();
$rcmail_config['debug_level'] = 1;
$rcmail_config['log_driver'] = "syslog";
$rcmail_config['log_date_format'] = 'd-M-Y H:i:s O';
$rcmail_config['syslog_id'] = "roundcube";
$rcmail_config['syslog_facility'] = LOG_MAIL;
$rcmail_config['smtp_log'] = true;
$rcmail_config['log_logins'] = TRUE;
$rcmail_config['sql_debug'] = false;
$rcmail_config['imap_debug'] = false;
$rcmail_config['ldap_debug'] = false;
$rcmail_config['smtp_debug'] = false;
$rcmail_config['default_host'] = "127.0.0.1";
$rcmail_config['default_port'] = 143;
$rcmail_config['imap_auth_type'] = null;
$rcmail_config['imap_root'] = null;
$rcmail_config['imap_delimiter'] = null;
$rcmail_config['imap_force_caps'] = false;
$rcmail_config['smtp_server'] = "127.0.0.1";
$rcmail_config['smtp_port'] = 25;
$rcmail_config['smtp_user'] = "%u";
$rcmail_config['smtp_pass'] = "%p";
$rcmail_config['smtp_auth_type'] = '';
$rcmail_config['smtp_helo_host'] = '';
$rcmail_config['enable_installer'] = FALSE;
$rcmail_config['log_dir'] = 'logs/';
$rcmail_config['temp_dir'] = 'temp/';
$rcmail_config['enable_caching'] = false;
$rcmail_config['message_cache_lifetime'] = '10d';
$rcmail_config['force_https'] = false;
$rcmail_config['auto_create_user'] = TRUE;
$rcmail_config['skin_include_php'] = false;
$rcmail_config['session_lifetime'] = 10;
$rcmail_config['ip_check'] = false;
$rcmail_config['double_auth'] = false;
$rcmail_config['des_key'] = 'rcmail-!24ByteDESkey*Str';
$rcmail_config['username_domain'] = "filtrelisu.com";
$rcmail_config['mail_domain'] = '';
$rcmail_config['password_charset'] = 'ISO-8859-1';
$rcmail_config['sendmail_delay'] = 0;
$rcmail_config['max_recipients'] = 0;
$rcmail_config['max_group_members'] = 0;
$rcmail_config['useragent'] = "RoundCube WebMail";
$rcmail_config['product_name'] = 'RoundCube Webmail';
$rcmail_config['include_host_config'] = false;
$rcmail_config['generic_message_footer'] = '';
$rcmail_config['http_received_header'] = false;
$rcmail_config['http_received_header_encrypt'] = false;
$rcmail_config['mail_header_delimiter'] = NULL;
$rcmail_config['session_domain'] = '';
$rcmail_config['dont_override'] = array();
$rcmail_config['identities_level'] = 3;
$rcmail_config['mime_magic'] = '/usr/share/misc/magic';
$rcmail_config['email_dns_check'] = false;
$rcmail_config['plugins'] = array("password","managesieve",);
$rcmail_config['message_sort_col'] = '';
$rcmail_config['message_sort_order'] = 'DESC';
$rcmail_config['list_cols'] = array('subject', 'from', 'date', 'size', 'flag', 'attachment');
$rcmail_config['language'] = "en_US";
$rcmail_config['date_short'] = 'D H:i';
$rcmail_config['date_long'] = 'd.m.Y H:i';
$rcmail_config['date_today'] = 'H:i';
$rcmail_config['drafts_mbox'] = 'Drafts';
$rcmail_config['junk_mbox'] = 'Junk';
$rcmail_config['sent_mbox'] = 'Sent';
$rcmail_config['trash_mbox'] = 'Trash';
$rcmail_config['default_imap_folders'] = array('INBOX', 'Drafts', 'Sent', 'Junk', 'Trash');
$rcmail_config['create_default_folders'] = TRUE;
$rcmail_config['protect_default_folders'] = TRUE;
$rcmail_config['quota_zero_as_unlimited'] = TRUE;
$rcmail_config['mdn_requests'] = 0;
$rcmail_config['enable_spellcheck'] = FALSE;
$rcmail_config['spellcheck_engine'] = 'googie';
$rcmail_config['spellcheck_uri'] = '';
$rcmail_config['spellcheck_languages'] = "en_US";
$rcmail_config['max_pagesize'] = 200;
$rcmail_config['min_keep_alive'] = 60;
$rcmail_config['address_book_type'] = 'sql';
$rcmail_config['ldap_public'] = array();
$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
'sizelimit' => '0', // Enables you to limit the count of entries fetched. Setting this to 0 means no limit.
'timelimit' => '0', // Sets the number of seconds how long is spend on the search. Setting this to 0 means no limit.
);
$rcmail_config['autocomplete_addressbooks'] = array("sql", "filtrelisu.com");
$rcmail_config['default_charset'] = "UTF-8";
$rcmail_config['skin'] = 'default';
$rcmail_config['pagesize'] = 40;
$rcmail_config['timezone'] = 'auto';
$rcmail_config['dst_active'] = (bool)date('I');
$rcmail_config['prefer_html'] = true;
$rcmail_config['show_images'] = 1;
$rcmail_config['htmleditor'] = false;
$rcmail_config['prettydate'] = true;
$rcmail_config['draft_autosave'] = 300;
$rcmail_config['preview_pane'] = TRUE;
$rcmail_config['preview_pane_mark_read'] = TRUE;
$rcmail_config['focus_on_new_message'] = true;
$rcmail_config['logout_purge'] = false;
$rcmail_config['logout_expunge'] = false;
$rcmail_config['inline_images'] = true;
$rcmail_config['mime_param_folding'] = 1;
$rcmail_config['skip_deleted'] = false;
$rcmail_config['read_when_deleted'] = true;
$rcmail_config['flag_for_deletion'] = false;
$rcmail_config['keep_alive'] = 60;
$rcmail_config['check_all_folders'] = TRUE;
$rcmail_config['display_next'] = false;
$rcmail_config['autoexpand_threads'] = 0;
$rcmail_config['top_posting'] = false;
$rcmail_config['strip_existing_sig'] = true;
$rcmail_config['show_sig'] = 1;
$rcmail_config['sig_above'] = false;
$rcmail_config['force_7bit'] = false;
$rcmail_config['search_mods'] = null; // Example: array('*' => array('subject'=>1, 'from'=>1), 'Sent' => array('subject'=>1, 'to'=>1));
$rcmail_config['delete_always'] = TRUE;
$rcmail_config['ldap_public']["filtrelisu.com"] = array(
'name' => 'Global Address Book',
'hosts' => array("127.0.0.1"),
'port' => 389,
'use_tls' => false,
// ---- Used to search accounts only in the same domain. ----
'user_specific' => true, // If true the base_dn, bind_dn and bind_pass default to the user's IMAP login.
'base_dn' => "domainName=%d,o=domains,dc=filtrelisu,dc=com",
'bind_dn' => "mail=%u@%d,ou=Users,domainName=%d,o=domains,dc=filtrelisu,dc=com",
// ---- Uncomment below lines to search whole LDAP tree ----
//'base_dn' => "o=domains,dc=filtrelisu,dc=com",
//'bind_dn' => "cn=vmail,dc=filtrelisu,dc=com",
'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", "mailUser"), // 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', 'givenName', 'sn'), // 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' => 'givenName', // 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' => "(&(enabledService=mail)(enabledService=deliver)(enabledService=displayedInGlobalAddressBook)(|(&(objectClass=mailList)(hasMember=yes))(objectClass=mailAlias)(objectClass=mailUser)))", // Search mail users, lists, aliases.
'fuzzy_search' => true); // server allows wildcard search
?>
Meanwhile all needed services seem to work.
# netstat -na |grep LISTE
tcp4 0 0 127.0.0.1.10025 *.* LISTEN
tcp4 0 0 *.465 *.* LISTEN
tcp4 0 0 *.587 *.* LISTEN
tcp4 0 0 *.25 *.* LISTEN
tcp4 0 0 127.0.0.1.2000 *.* LISTEN
tcp4 0 0 *.995 *.* LISTEN
tcp4 0 0 *.110 *.* LISTEN
tcp4 0 0 *.993 *.* LISTEN
tcp4 0 0 *.143 *.* LISTEN
tcp4 0 0 *.22 *.* LISTEN
tcp6 0 0 *.22 *.* LISTEN
tcp46 0 0 *.443 *.* LISTEN
tcp46 0 0 *.80 *.* LISTEN
tcp4 0 0 127.0.0.1.7777 *.* LISTEN
tcp4 0 0 127.0.0.1.10031 *.* LISTEN
tcp4 0 0 127.0.0.1.10024 *.* LISTEN
tcp4 0 0 *.3306 *.* LISTEN