Initial
This commit is contained in:
40
install/common/roundcube/apache.conf
Normal file
40
install/common/roundcube/apache.conf
Normal file
@@ -0,0 +1,40 @@
|
||||
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>
|
||||
32
install/common/roundcube/config.inc.php
Normal file
32
install/common/roundcube/config.inc.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
// Password Plugin options
|
||||
// -----------------------
|
||||
// A driver to use for password change. Default: "sql".
|
||||
// See README file for list of supported driver names.
|
||||
$config["password_driver"] = "hestia";
|
||||
|
||||
// Require the new password to be a certain length.
|
||||
// set to blank to allow passwords of any length
|
||||
$config["password_minimum_length"] = 8;
|
||||
|
||||
// Require the new password to contain a letter and punctuation character
|
||||
// Change to false to remove this check.
|
||||
$config["password_require_nonalpha"] = false;
|
||||
|
||||
// Enables logging of password changes into logs/password
|
||||
$config["password_log"] = false;
|
||||
|
||||
// Comma-separated list of login exceptions for which password change
|
||||
// will be not available (no Password tab in Settings)
|
||||
$config["password_login_exceptions"] = null;
|
||||
|
||||
// By default domains in variables are using unicode.
|
||||
// Enable this option to use punycoded names
|
||||
$config["password_idn_ascii"] = false;
|
||||
|
||||
// Hestia Driver options
|
||||
// -----------------------
|
||||
// Control Panel host
|
||||
$config["password_hestia_host"] = "localhost";
|
||||
$config["password_hestia_port"] = "8083";
|
||||
57
install/common/roundcube/hestia.php
Normal file
57
install/common/roundcube/hestia.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Hestia Control Panel Password Driver
|
||||
*
|
||||
* @version 1.0
|
||||
* @author HestiaCP <info@hestiacp.com>
|
||||
*/
|
||||
class rcube_hestia_password {
|
||||
public function save($curpass, $passwd) {
|
||||
$rcmail = rcmail::get_instance();
|
||||
$hestia_host = $rcmail->config->get("password_hestia_host");
|
||||
|
||||
if (empty($hestia_host)) {
|
||||
$hestia_host = "localhost";
|
||||
}
|
||||
|
||||
$hestia_port = $rcmail->config->get("password_hestia_port");
|
||||
if (empty($hestia_port)) {
|
||||
$hestia_port = "8083";
|
||||
}
|
||||
|
||||
$postvars = [
|
||||
"email" => $_SESSION["username"],
|
||||
"password" => $curpass,
|
||||
"new" => $passwd,
|
||||
];
|
||||
$url = "https://{$hestia_host}:{$hestia_port}/reset/mail/";
|
||||
$ch = curl_init();
|
||||
if (
|
||||
false ===
|
||||
curl_setopt_array($ch, [
|
||||
CURLOPT_URL => $url,
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_HEADER => true,
|
||||
CURLOPT_POST => true,
|
||||
CURLOPT_POSTFIELDS => http_build_query($postvars),
|
||||
CURLOPT_USERAGENT => "Hestia Control Panel Password Driver",
|
||||
CURLOPT_SSL_VERIFYPEER => false,
|
||||
CURLOPT_SSL_VERIFYHOST => false,
|
||||
])
|
||||
) {
|
||||
// should never happen
|
||||
throw new Exception("curl_setopt_array() failed: " . curl_error($ch));
|
||||
}
|
||||
$result = curl_exec($ch);
|
||||
if (curl_errno($ch) !== CURLE_OK) {
|
||||
throw new Exception("curl_exec() failed: " . curl_error($ch));
|
||||
}
|
||||
curl_close($ch);
|
||||
if (strpos($result, "ok") && !strpos($result, "error")) {
|
||||
return PASSWORD_SUCCESS;
|
||||
} else {
|
||||
return PASSWORD_ERROR;
|
||||
}
|
||||
}
|
||||
}
|
||||
104
install/common/roundcube/main.inc.php
Normal file
104
install/common/roundcube/main.inc.php
Normal file
@@ -0,0 +1,104 @@
|
||||
<?php
|
||||
/* Local configuration for Roundcube Webmail */
|
||||
|
||||
//rewrite below this line
|
||||
$config["db_dsnw"] = "mysql://roundcube:%password%@localhost/roundcube";
|
||||
|
||||
// Log sent messages to <log_dir>/sendmail or to syslog
|
||||
$config["smtp_log"] = false;
|
||||
|
||||
// Log IMAP conversation to <log_dir>/imap or to syslog
|
||||
$config["imap_debug"] = true;
|
||||
|
||||
// Log SMTP conversation to <log_dir>/smtp.log or to syslog
|
||||
$config["smtp_debug"] = true;
|
||||
|
||||
// ----------------------------------
|
||||
// IMAP
|
||||
// ----------------------------------
|
||||
// The IMAP 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.
|
||||
// Enter hostname with prefix ssl:// to use Implicit TLS, or use
|
||||
// prefix tls:// to use STARTTLS.
|
||||
// Supported replacement variables:
|
||||
// %n - hostname ($_SERVER['SERVER_NAME'])
|
||||
// %t - hostname without the first part
|
||||
// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
|
||||
// %s - domain name after the '@' from e-mail address provided at login screen
|
||||
// For example %n = mail.domain.tld, %t = domain.tld
|
||||
// WARNING: After hostname change update of mail_host column in users table is
|
||||
// required to match old user data records with the new host.
|
||||
$config["imap_host"] = "localhost:143";
|
||||
|
||||
// IMAP socket context options
|
||||
// See http://php.net/manual/en/context.ssl.php
|
||||
// The example below enables server certificate validation
|
||||
//$config['imap_conn_options'] = array(
|
||||
// 'ssl' => array(
|
||||
// 'verify_peer' => true,
|
||||
// 'verify_depth' => 3,
|
||||
// 'cafile' => '/etc/openssl/certs/ca.crt',
|
||||
// ),
|
||||
// );
|
||||
// Note: These can be also specified as an array of options indexed by hostname
|
||||
$config["imap_conn_options"] = [
|
||||
"ssl" => [
|
||||
"verify_peer" => false,
|
||||
"verify_peer_name" => false,
|
||||
"verify_depth" => 3,
|
||||
"cafile" => "/etc/ssl/certs/ca-certificates.crt",
|
||||
],
|
||||
];
|
||||
|
||||
// SMTP socket context options
|
||||
// See http://php.net/manual/en/context.ssl.php
|
||||
// The example below enables server certificate validation, and
|
||||
// requires 'smtp_timeout' to be non zero.
|
||||
// $config['smtp_conn_options'] = array(
|
||||
// 'ssl' => array(
|
||||
// 'verify_peer' => true,
|
||||
// 'verify_depth' => 3,
|
||||
// 'cafile' => '/etc/openssl/certs/ca.crt',
|
||||
// ),
|
||||
// );
|
||||
// Note: These can be also specified as an array of options indexed by hostname
|
||||
$config["smtp_conn_options"] = [
|
||||
"ssl" => [
|
||||
"verify_peer" => false,
|
||||
"verify_peer_name" => false,
|
||||
"verify_depth" => 3,
|
||||
"cafile" => "/etc/ssl/certs/ca-certificates.crt",
|
||||
],
|
||||
];
|
||||
|
||||
// provide an URL where a user can get support for this Roundcube installation
|
||||
// PLEASE DO NOT LINK TO THE ROUNDCUBE.NET WEBSITE HERE!
|
||||
$config["support_url"] = "";
|
||||
|
||||
// use this folder to store log files
|
||||
// must be writeable for the user who runs PHP process (Apache user if mod_php is being used)
|
||||
// This is used by the 'file' log driver.
|
||||
$config["log_dir"] = "/var/log/roundcube/";
|
||||
|
||||
// This key is used for encrypting purposes, like storing of imap password
|
||||
// in the session. For historical reasons it's called DES_key, but it's used
|
||||
// with any configured cipher_method (see below).
|
||||
// For the default cipher_method a required key length is 24 characters.
|
||||
$config["des_key"] = "%des_key%";
|
||||
|
||||
// Maximum number of recipients per message (including To, Cc, Bcc).
|
||||
// Default: 0 (no limit)
|
||||
$config["max_recipients"] = 100;
|
||||
|
||||
// List of active plugins (in plugins/ directory)
|
||||
$config["plugins"] = ["password", "newmail_notifier", "zipdownload", "archive"];
|
||||
|
||||
$config["default_user"] = "%u";
|
||||
|
||||
$config["default_pass"] = "%p";
|
||||
|
||||
$config["smtp_host"] = "localhost:587";
|
||||
|
||||
// Log session authentication errors to <log_dir>/session or to syslog
|
||||
$config["log_session"] = true;
|
||||
56
install/common/roundcube/mimetypes.php
Normal file
56
install/common/roundcube/mimetypes.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Local mapping file to specify mime-types based on common file-name extensions
|
||||
*
|
||||
* Please note that this mapping takes precedence over the content-based mime-type detection
|
||||
* and should only contain mappings which cannot be detected properly from the file contents.
|
||||
*/
|
||||
|
||||
return [
|
||||
"xls" => "application/vnd.ms-excel",
|
||||
"xlm" => "application/vnd.ms-excel",
|
||||
"xla" => "application/vnd.ms-excel",
|
||||
"xlc" => "application/vnd.ms-excel",
|
||||
"xlt" => "application/vnd.ms-excel",
|
||||
"xlw" => "application/vnd.ms-excel",
|
||||
"pdf" => "application/pdf",
|
||||
"ppt" => "application/vnd.ms-powerpoint",
|
||||
"pps" => "application/vnd.ms-powerpoint",
|
||||
"pot" => "application/vnd.ms-powerpoint",
|
||||
"doc" => "application/msword",
|
||||
"dot" => "application/msword",
|
||||
"odc" => "application/vnd.oasis.opendocument.chart",
|
||||
"otc" => "application/vnd.oasis.opendocument.chart-template",
|
||||
"odf" => "application/vnd.oasis.opendocument.formula",
|
||||
"otf" => "application/vnd.oasis.opendocument.formula-template",
|
||||
"odg" => "application/vnd.oasis.opendocument.graphics",
|
||||
"otg" => "application/vnd.oasis.opendocument.graphics-template",
|
||||
"odi" => "application/vnd.oasis.opendocument.image",
|
||||
"oti" => "application/vnd.oasis.opendocument.image-template",
|
||||
"odp" => "application/vnd.oasis.opendocument.presentation",
|
||||
"otp" => "application/vnd.oasis.opendocument.presentation-template",
|
||||
"ods" => "application/vnd.oasis.opendocument.spreadsheet",
|
||||
"ots" => "application/vnd.oasis.opendocument.spreadsheet-template",
|
||||
"odt" => "application/vnd.oasis.opendocument.text",
|
||||
"otm" => "application/vnd.oasis.opendocument.text-master",
|
||||
"ott" => "application/vnd.oasis.opendocument.text-template",
|
||||
"oth" => "application/vnd.oasis.opendocument.text-web",
|
||||
"docm" => "application/vnd.ms-word.document.macroEnabled.12",
|
||||
"docx" => "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
||||
"dotm" => "application/vnd.ms-word.template.macroEnabled.12",
|
||||
"dotx" => "application/vnd.openxmlformats-officedocument.wordprocessingml.template",
|
||||
"ppsm" => "application/vnd.ms-powerpoint.slideshow.macroEnabled.12",
|
||||
"ppsx" => "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
|
||||
"pptm" => "application/vnd.ms-powerpoint.presentation.macroEnabled.12",
|
||||
"pptx" => "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
||||
"xlsb" => "application/vnd.ms-excel.sheet.binary.macroEnabled.12",
|
||||
"xlsm" => "application/vnd.ms-excel.sheet.macroEnabled.12",
|
||||
"xlsx" => "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||||
"xps" => "application/vnd.ms-xpsdocument",
|
||||
"rar" => "application/x-rar-compressed",
|
||||
"7z" => "application/x-7z-compressed",
|
||||
"s7z" => "application/x-7z-compressed",
|
||||
"vcf" => "text/vcard",
|
||||
"ics" => "text/calendar",
|
||||
];
|
||||
126
install/common/roundcube/plugins/config_managesieve.inc.php
Normal file
126
install/common/roundcube/plugins/config_managesieve.inc.php
Normal file
@@ -0,0 +1,126 @@
|
||||
<?php
|
||||
|
||||
// managesieve server address, default is localhost.
|
||||
// Replacement variables supported in host name:
|
||||
// %h - user's IMAP hostname
|
||||
// %n - http hostname ($_SERVER['SERVER_NAME'])
|
||||
// %d - domain (http hostname without the first part)
|
||||
// For example %n = mail.domain.tld, %d = domain.tld
|
||||
$config["managesieve_host"] = "localhost:4190";
|
||||
|
||||
// authentication method. Can be CRAM-MD5, DIGEST-MD5, PLAIN, LOGIN, EXTERNAL
|
||||
// or none. Optional, defaults to best method supported by server.
|
||||
$config["managesieve_auth_type"] = null;
|
||||
|
||||
// Optional managesieve authentication identifier to be used as authorization proxy.
|
||||
// Authenticate as a different user but act on behalf of the logged in user.
|
||||
// Works with PLAIN and DIGEST-MD5 auth.
|
||||
$config["managesieve_auth_cid"] = null;
|
||||
|
||||
// Optional managesieve authentication password to be used for imap_auth_cid
|
||||
$config["managesieve_auth_pw"] = null;
|
||||
|
||||
// use or not TLS for managesieve server connection
|
||||
// Note: tls:// prefix in managesieve_host is also supported
|
||||
$config["managesieve_usetls"] = false;
|
||||
|
||||
// Connection scket context options
|
||||
// See http://php.net/manual/en/context.ssl.php
|
||||
// The example below enables server certificate validation
|
||||
//$config['managesieve_conn_options'] = array(
|
||||
// 'ssl' => array(
|
||||
// 'verify_peer' => true,
|
||||
// 'verify_depth' => 3,
|
||||
// 'cafile' => '/etc/openssl/certs/ca.crt',
|
||||
// ),
|
||||
// );
|
||||
// Note: These can be also specified as an array of options indexed by hostname
|
||||
$config["managesieve_conn_options"] = null;
|
||||
|
||||
// A file with default script content (eg. spam filter)
|
||||
//$config['managesieve_default'] = '/etc/dovecot/sieve/global';
|
||||
$config["managesieve_default"] = "/etc/dovecot/sieve/default";
|
||||
|
||||
// The name of the script which will be used when there's no user script
|
||||
$config["managesieve_script_name"] = "managesieve";
|
||||
|
||||
// Sieve RFC says that we should use UTF-8 endcoding for mailbox names,
|
||||
// but some implementations does not covert UTF-8 to modified UTF-7.
|
||||
// Defaults to UTF7-IMAP
|
||||
$config["managesieve_mbox_encoding"] = "UTF-8";
|
||||
|
||||
// I need this because my dovecot (with listescape plugin) uses
|
||||
// ':' delimiter, but creates folders with dot delimiter
|
||||
$config["managesieve_replace_delimiter"] = "";
|
||||
|
||||
// disabled sieve extensions (body, copy, date, editheader, encoded-character,
|
||||
// envelope, environment, ereject, fileinto, ihave, imap4flags, index,
|
||||
// mailbox, mboxmetadata, regex, reject, relational, servermetadata,
|
||||
// spamtest, spamtestplus, subaddress, vacation, variables, virustest, etc.
|
||||
// Note: not all extensions are implemented
|
||||
$config["managesieve_disabled_extensions"] = [];
|
||||
|
||||
// Enables debugging of conversation with sieve server. Logs it into <log_dir>/sieve
|
||||
$config["managesieve_debug"] = false;
|
||||
|
||||
// Enables features described in http://wiki.kolab.org/KEP:14
|
||||
$config["managesieve_kolab_master"] = false;
|
||||
|
||||
// Script name extension used for scripts including. Dovecot uses '.sieve',
|
||||
// Cyrus uses '.siv'. Doesn't matter if you have managesieve_kolab_master disabled.
|
||||
$config["managesieve_filename_extension"] = ".sieve";
|
||||
|
||||
// List of reserved script names (without extension).
|
||||
// Scripts listed here will be not presented to the user.
|
||||
$config["managesieve_filename_exceptions"] = [];
|
||||
|
||||
// List of domains limiting destination emails in redirect action
|
||||
// If not empty, user will need to select domain from a list
|
||||
$config["managesieve_domains"] = [];
|
||||
|
||||
// Default list of entries in header selector
|
||||
$config["managesieve_default_headers"] = ["Subject", "From", "To"];
|
||||
|
||||
// Enables separate management interface for vacation responses (out-of-office)
|
||||
// 0 - no separate section (default),
|
||||
// 1 - add Vacation section,
|
||||
// 2 - add Vacation section, but hide Filters section
|
||||
$config["managesieve_vacation"] = 0;
|
||||
|
||||
// Enables separate management interface for setting forwards (redirect to and copy to)
|
||||
// 0 - no separate section (default),
|
||||
// 1 - add Forward section,
|
||||
// 2 - add Forward section, but hide Filters section
|
||||
$config["managesieve_forward"] = 0;
|
||||
|
||||
// Default vacation interval (in days).
|
||||
// Note: If server supports vacation-seconds extension it is possible
|
||||
// to define interval in seconds here (as a string), e.g. "3600s".
|
||||
$config["managesieve_vacation_interval"] = 0;
|
||||
|
||||
// Some servers require vacation :addresses to be filled with all
|
||||
// user addresses (aliases). This option enables automatic filling
|
||||
// of these on initial vacation form creation.
|
||||
$config["managesieve_vacation_addresses_init"] = false;
|
||||
|
||||
// Sometimes you want to always reply with mail email address
|
||||
// This option enables automatic filling of :from field on initial vacation form creation.
|
||||
$config["managesieve_vacation_from_init"] = false;
|
||||
|
||||
// Supported methods of notify extension. Default: 'mailto'
|
||||
$config["managesieve_notify_methods"] = ["mailto"];
|
||||
|
||||
// Enables scripts RAW editor feature
|
||||
$config["managesieve_raw_editor"] = true;
|
||||
|
||||
// Disabled actions
|
||||
// Prevent user from performing specific actions:
|
||||
// list_sets, enable_disable_set, delete_set, new_set, download_set, new_rule, delete_rule
|
||||
// Note: disabling list_sets removes the Filter sets widget from the UI and means
|
||||
// the set defined in managesieve_script_name will always be used (and activated)
|
||||
$config["managesieve_disabled_actions"] = [];
|
||||
|
||||
// List of hosts that support managesieve.
|
||||
// Activate managesieve for selected hosts only. If this is not set all hosts are allowed.
|
||||
// Example: $config['managesieve_allowed_hosts'] = array('host1.mydomain.com','host2.mydomain.com');
|
||||
$config["managesieve_allowed_hosts"] = null;
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
// Enables basic notification
|
||||
$config["newmail_notifier_basic"] = true;
|
||||
|
||||
// Enables sound notification
|
||||
$config["newmail_notifier_sound"] = false;
|
||||
|
||||
// Enables desktop notification
|
||||
$config["newmail_notifier_desktop"] = false;
|
||||
|
||||
// Desktop notification close timeout in seconds
|
||||
$config["newmail_notifier_desktop_timeout"] = 5;
|
||||
|
||||
?>
|
||||
21
install/common/roundcube/plugins/config_zipdownload.inc.php
Normal file
21
install/common/roundcube/plugins/config_zipdownload.inc.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* ZipDownload configuration file
|
||||
*/
|
||||
|
||||
// Zip attachments
|
||||
// Only show the link when there are more than this many attachments
|
||||
// -1 to prevent downloading of attachments as zip
|
||||
$config["zipdownload_attachments"] = 1;
|
||||
|
||||
// Zip selection of mail messages
|
||||
// This option enables downloading of multiple messages as one zip archive.
|
||||
// The number or string value specifies maximum total size of all messages
|
||||
// in the archive (not the size of the archive itself).
|
||||
$config["zipdownload_selection"] = "100MB";
|
||||
|
||||
// Charset to use for filenames inside the zip
|
||||
$config["zipdownload_charset"] = "ISO-8859-1";
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user