first commit
This commit is contained in:
commit
36930ed080
9
README.md
Normal file
9
README.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
# vmail-webmail
|
||||
|
||||
## Install
|
||||
```
|
||||
cd /usr/local/src
|
||||
git clone https://git.stack-source.com/msb/letsencrypt-tools.git
|
||||
cd letsencrypt-tools
|
||||
bash install.sh
|
||||
```
|
91
config/config.inc.php
Normal file
91
config/config.inc.php
Normal file
|
@ -0,0 +1,91 @@
|
|||
<?php
|
||||
|
||||
/* Local configuration for Roundcube Webmail */
|
||||
|
||||
// Database connection string (DSN) for read+write operations
|
||||
// Format (compatible with PEAR MDB2): db_provider://user:password@host/database
|
||||
// Currently supported db_providers: mysql, pgsql, sqlite, mssql, sqlsrv, oracle
|
||||
// For examples see http://pear.php.net/manual/en/package.database.mdb2.intro-dsn.php
|
||||
// NOTE: for SQLite use absolute path (Linux): 'sqlite:////full/path/to/sqlite.db?mode=0646'
|
||||
// or (Windows): 'sqlite:///C:/full/path/to/sqlite.db'
|
||||
$config['db_dsnw'] = 'mysql://vmail:password@localhost/vmail';
|
||||
|
||||
// you can define specific table (and sequence) names prefix
|
||||
$config['db_prefix'] = 'rc_';
|
||||
|
||||
// ----------------------------------
|
||||
// LOGGING/DEBUGGING
|
||||
// ----------------------------------
|
||||
// log driver: 'syslog', 'stdout' or 'file'.
|
||||
$config['log_driver'] = 'syslog';
|
||||
|
||||
// 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.
|
||||
// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
|
||||
// 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
|
||||
$config['default_host'] = 'tls://%n';
|
||||
|
||||
// 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 temp files
|
||||
// must be writeable for the user who runs PHP process (Apache user if mod_php is being used)
|
||||
$config['temp_dir'] = '/var/tmp/roundcube/';
|
||||
|
||||
// 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.
|
||||
// YOUR KEY MUST BE DIFFERENT THAN THE SAMPLE VALUE FOR SECURITY REASONS
|
||||
$config['des_key'] = 'rcmail-!24ByteDESkey*Str';
|
||||
|
||||
// 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
|
||||
// Supported replacement variables:
|
||||
// %h - user's IMAP hostname
|
||||
// %n - hostname ($_SERVER['SERVER_NAME'])
|
||||
// %t - hostname without the first part
|
||||
// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
|
||||
// %z - IMAP domain (IMAP hostname without the first part)
|
||||
// For example %n = mail.domain.tld, %t = domain.tld
|
||||
$config['username_domain'] = '%d';
|
||||
|
||||
// Name your service. This is displayed on the login screen and in the window title
|
||||
$config['product_name'] = '';
|
||||
|
||||
// List of active plugins (in plugins/ directory)
|
||||
$config['plugins'] = array('archive', 'password', 'sauserprefs', 'zipdownload');
|
||||
|
||||
// automatically create the above listed default folders on user login
|
||||
$config['create_default_folders'] = true;
|
||||
|
||||
// Disable localization of the default folder names listed above
|
||||
$config['show_real_foldernames'] = true;
|
||||
|
||||
// Set the spell checking engine. Possible values:
|
||||
// - 'googie' - the default (also used for connecting to Nox Spell Server, see 'spellcheck_uri' setting)
|
||||
// - 'pspell' - requires the PHP Pspell module and aspell installed
|
||||
// - 'enchant' - requires the PHP Enchant module
|
||||
// - 'atd' - install your own After the Deadline server or check with the people at http://www.afterthedeadline.com before using their API
|
||||
// Since Google shut down their public spell checking service, the default settings
|
||||
// connect to http://spell.roundcube.net which is a hosted service provided by Roundcube.
|
||||
// You can connect to any other googie-compliant service by setting 'spellcheck_uri' accordingly.
|
||||
$config['spellcheck_engine'] = 'pspell';
|
||||
|
||||
// When replying:
|
||||
// -1 - don't cite the original message
|
||||
// 0 - place cursor below the original message
|
||||
// 1 - place cursor above original message (top posting)
|
||||
// 2 - place cursor above original message (top posting), but do not indent the quote
|
||||
$config['reply_mode'] = 1;
|
||||
|
||||
$config['archive_mbox'] = 'Archives';
|
||||
|
||||
$config['archive_type'] = 'year';
|
71
install.sh
Normal file
71
install.sh
Normal file
|
@ -0,0 +1,71 @@
|
|||
#!/bin/bash
|
||||
|
||||
# must be root
|
||||
if [ "$USER" != "root" ]; then
|
||||
echo "You must be root to run this installer."
|
||||
exit
|
||||
fi
|
||||
|
||||
# Check for vmail-stack & vhost-stack installs & required configs
|
||||
if [ -f "/usr/local/bin/vhost.sh" ] && [ -d "/srv/www/html" ] && [ -f "/usr/local/bin/vmail.sh" ] && [ -f "/var/vmail/.my.cnf" ]; then
|
||||
# check for existing roundcube webmail install
|
||||
if [ -d "/srv/www/html/roundcube" ]; then
|
||||
echo "Roundcube webmail app is already installed."
|
||||
exit
|
||||
fi
|
||||
else
|
||||
echo "Missing required installs/configurations."
|
||||
echo "You must install vhost-stack & vmail-stack first."
|
||||
exit
|
||||
fi
|
||||
|
||||
# get current working dir, so we can come back here later
|
||||
installer_dir=$(dirname $(readlink -f $0))
|
||||
|
||||
cd /usr/local/src/
|
||||
wget https://github.com/roundcube/roundcubemail/releases/download/1.4.11/roundcubemail-1.4.11-complete.tar.gz
|
||||
tar zxf roundcubemail-1.4.11-complete.tar.gz
|
||||
mv roundcubemail-1.4.11 /srv/www/html/roundcube
|
||||
|
||||
cd /usr/local/src/
|
||||
wget https://github.com/johndoh/roundcube-sauserprefs/archive/refs/tags/1.18.4.tar.gz -O roundcube-sauserprefs-1.18.4.tar.gz
|
||||
tar zxf roundcube-sauserprefs-1.18.4.tar.gz
|
||||
mv roundcube-sauserprefs-1.18.4 /srv/www/html/roundcube/plugins/sauserprefs
|
||||
|
||||
cd $installer_dir
|
||||
|
||||
cp config/config.inc.php /srv/www/html/roundcube/config/config.inc.php
|
||||
# get vmail db settings and set db connection info
|
||||
dbhost=`grep -m 1 host /var/vmail/.my.cnf |cut -d = -f 2|cut -d ' ' -f 2`
|
||||
dbdatabase=`grep -m 1 database /var/vmail/.my.cnf |cut -d = -f 2|cut -d ' ' -f 2`
|
||||
dbuser=`grep -m 1 user /var/vmail/.my.cnf |cut -d = -f 2|cut -d ' ' -f 2`
|
||||
dbpass=`grep -m 1 password /var/vmail/.my.cnf |cut -d = -f 2|cut -d ' ' -f 2`
|
||||
sed -i "s|.*db_dsnw.*|\$config['db_dsnw'] = 'mysql://$dbuser:$vmail_password@$dbhost/$dbdatabase';|g" /srv/www/html/roundcube/config/config.inc.php
|
||||
|
||||
# make sure pwgen is installed
|
||||
apt-get -qq -y install pwgen
|
||||
|
||||
# create random key
|
||||
des_key=`pwgen -1 24`
|
||||
sed -i "s|.*des_key.*|\$config['des_key'] = '$des_key';|g" /srv/www/html/roundcube/config/config.inc.php
|
||||
|
||||
# install plugins / configs
|
||||
cp -a plugins/* /srv/www/html/roundcube/plugins/
|
||||
sed -i "s|.*sauserprefs_db_dsnw*|\$config['sauserprefs_db_dsnw'] = 'mysql://$dbuser:$vmail_password@$dbhost/$dbdatabase';|g" /srv/www/html/roundcube/plugins/sauserprefs/config.inc.php
|
||||
|
||||
# create tmp files storage dir
|
||||
install --owner=www-data --group=www-data --mode=750 --directory /var/tmp/roundcube
|
||||
|
||||
# set permissions
|
||||
# # USER=$(stat -c '%U' /srv/www/html)
|
||||
# # GROUP=$(stat -c '%G' /srv/www/html)
|
||||
# # chown -R $USER:$GROUP /srv/www/html/roundcube
|
||||
find /srv/www/html/roundcube -type d -exec chmod 755 {} +
|
||||
find /srv/www/html/roundcube -type f -exec chmod 644 {} +
|
||||
chmod 755 /srv/www/html/roundcube/bin/*.sh
|
||||
|
||||
# load roundcube database tables
|
||||
mysql vmail < rc.sql
|
||||
|
||||
echo "Roundcube webmail installed."
|
||||
echo "You can optionally set the vars 'product_name' & 'support_url' in /srv/www/html/roundcube/config/config.inc.php"
|
496
plugins/password/config.inc.php
Normal file
496
plugins/password/config.inc.php
Normal file
|
@ -0,0 +1,496 @@
|
|||
<?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'] = 'sql';
|
||||
|
||||
// A driver to use for checking password strength. Default: null.
|
||||
// Set password_check_strength to true to enable
|
||||
// See README file for list of supported driver names.
|
||||
$config['password_strength_driver'] = null;
|
||||
|
||||
// Determine whether current password is required to change password.
|
||||
// Default: false.
|
||||
$config['password_confirm_current'] = false;
|
||||
|
||||
// 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 have at least the specified strength score.
|
||||
// Note: Password strength is scored from 1 (week) to 5 (strong).
|
||||
$config['password_minimum_score'] = 0;
|
||||
|
||||
// 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;
|
||||
|
||||
// Array of hosts that support password changing.
|
||||
// Listed hosts will feature a Password option in Settings; others will not.
|
||||
// Example: array('mail.example.com', 'mail2.example.org');
|
||||
// Default is NULL (all hosts supported).
|
||||
$config['password_hosts'] = null;
|
||||
|
||||
// Enables saving the new password even if it matches the old password. Useful
|
||||
// for upgrading the stored passwords after the encryption scheme has changed.
|
||||
$config['password_force_save'] = false;
|
||||
|
||||
// Enables forcing new users to change their password at their first login.
|
||||
$config['password_force_new_user'] = false;
|
||||
|
||||
// Default password hashing/crypting algorithm.
|
||||
// Possible options: des-crypt, ext-des-crypt, md5-crypt, blowfish-crypt,
|
||||
// sha256-crypt, sha512-crypt, md5, sha, smd5, ssha, samba, ad, dovecot, clear.
|
||||
// For details see password::hash_password() method.
|
||||
$config['password_algorithm'] = 'sha512-crypt';
|
||||
|
||||
// Password prefix (e.g. {CRYPT}, {SHA}) for passwords generated
|
||||
// using password_algorithm above. Default: empty.
|
||||
$config['password_algorithm_prefix'] = '';
|
||||
|
||||
// Path for dovecotpw/doveadm-pw (if not in the $PATH).
|
||||
// Used for password_algorithm = 'dovecot'.
|
||||
// $config['password_dovecotpw'] = '/usr/local/sbin/doveadm pw'; // for dovecot-2.x
|
||||
$config['password_dovecotpw'] = '/usr/bin/doveadm pw';
|
||||
|
||||
// Dovecot password scheme.
|
||||
// Used for password_algorithm = 'dovecot'.
|
||||
$config['password_dovecotpw_method'] = 'SHA512-CRYPT';
|
||||
|
||||
// Enables use of password with method prefix, e.g. {MD5}$1$LUiMYWqx$fEkg/ggr/L6Mb2X7be4i1/
|
||||
// when using password_algorithm=dovecot
|
||||
$config['password_dovecotpw_with_method'] = false;
|
||||
|
||||
// Iteration count parameter for Blowfish-based hashing algo.
|
||||
// It must be between 4 and 31. Default: 12.
|
||||
// Be aware, the higher the value, the longer it takes to generate the password hashes.
|
||||
$config['password_blowfish_cost'] = 12;
|
||||
|
||||
// Number of rounds for the sha256 and sha512 crypt hashing algorithms.
|
||||
// Must be at least 1000. If not set, then the number of rounds is left up
|
||||
// to the crypt() implementation. On glibc this defaults to 5000.
|
||||
// Be aware, the higher the value, the longer it takes to generate the password hashes.
|
||||
//$config['password_crypt_rounds'] = 50000;
|
||||
|
||||
// This option temporarily disables the password change functionality.
|
||||
// Use it when the users database server is in maintenance mode or sth like that.
|
||||
// You can set it to TRUE/FALSE or a text describing the reason
|
||||
// which will replace the default.
|
||||
$config['password_disabled'] = false;
|
||||
|
||||
// Various drivers/setups use different format of the username.
|
||||
// This option allows you to force specified format use. Default: '%u'.
|
||||
// Supported variables:
|
||||
// %u - full username,
|
||||
// %l - the local part of the username (in case the username is an email address)
|
||||
// %d - the domain part of the username (in case the username is an email address)
|
||||
// Note: This may no apply to some drivers implementing their own rules, e.g. sql.
|
||||
$config['password_username_format'] = '%u';
|
||||
|
||||
|
||||
// SQL Driver options
|
||||
// ------------------
|
||||
// PEAR database DSN for performing the query. By default
|
||||
// Roundcube DB settings are used.
|
||||
// Supported replacement variables:
|
||||
// %h - user's IMAP hostname
|
||||
// %n - hostname ($_SERVER['SERVER_NAME'])
|
||||
// %t - hostname without the first part
|
||||
// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
|
||||
// %z - IMAP domain (IMAP hostname without the first part)
|
||||
//$config['password_db_dsn'] = 'mysql://vmail:wiejai3aGain@localhost/vmail';
|
||||
//'mysql://vmail:t99jqzOsqQLUUAa3@localhost/vmail';
|
||||
|
||||
// The SQL query used to change the password.
|
||||
// The query can contain the following macros that will be expanded as follows:
|
||||
// %p is replaced with the plaintext new password
|
||||
// %P is replaced with the crypted/hashed new password
|
||||
// according to configured password_method
|
||||
// %o is replaced with the old (current) password
|
||||
// %O is replaced with the crypted/hashed old (current) password
|
||||
// according to configured password_method
|
||||
// %h is replaced with the imap host (from the session info)
|
||||
// %u is replaced with the username (from the session info)
|
||||
// %l is replaced with the local part of the username
|
||||
// (in case the username is an email address)
|
||||
// %d is replaced with the domain part of the username
|
||||
// (in case the username is an email address)
|
||||
// Deprecated macros:
|
||||
// %c is replaced with the crypt version of the new password, MD5 if available
|
||||
// otherwise DES. More hash function can be enabled using the password_crypt_hash
|
||||
// configuration parameter.
|
||||
// %D is replaced with the dovecotpw-crypted version of the new password
|
||||
// %n is replaced with the hashed version of the new password
|
||||
// %q is replaced with the hashed password before the change
|
||||
// Escaping of macros is handled by this module.
|
||||
// Default: "SELECT update_passwd(%c, %u)"
|
||||
$config['password_query'] = 'UPDATE vm_mboxes, vm_domains SET vm_mboxes.passwd=%P WHERE vm_mboxes.mbox = %l AND vm_mboxes.domain_id = vm_domains.id AND vm_domains.domain = %d';
|
||||
|
||||
// By default the crypt() function which is used to create the %c
|
||||
// parameter uses the md5 algorithm (deprecated, use %P).
|
||||
// You can choose between: des, md5, blowfish, sha256, sha512.
|
||||
$config['password_crypt_hash'] = 'md5';
|
||||
|
||||
// By default domains in variables are using unicode.
|
||||
// Enable this option to use punycoded names
|
||||
$config['password_idn_ascii'] = false;
|
||||
|
||||
// Using a password hash for %n and %q variables (deprecated, use %P).
|
||||
// Determine which hashing algorithm should be used to generate
|
||||
// the hashed new and current password for using them within the
|
||||
// SQL query. Requires PHP's 'hash' extension.
|
||||
$config['password_hash_algorithm'] = 'sha1';
|
||||
|
||||
// You can also decide whether the hash should be provided
|
||||
// as hex string or in base64 encoded format.
|
||||
$config['password_hash_base64'] = false;
|
||||
|
||||
|
||||
// Poppassd Driver options
|
||||
// -----------------------
|
||||
// The host which changes the password (default: localhost)
|
||||
// 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)
|
||||
// %h - IMAP host
|
||||
// %z - IMAP domain without first part
|
||||
// %s - domain name after the '@' from e-mail address provided at login screen
|
||||
$config['password_pop_host'] = 'localhost';
|
||||
|
||||
// TCP port used for poppassd connections (default: 106)
|
||||
$config['password_pop_port'] = 106;
|
||||
|
||||
|
||||
// SASL Driver options
|
||||
// -------------------
|
||||
// Additional arguments for the saslpasswd2 call
|
||||
$config['password_saslpasswd_args'] = '';
|
||||
|
||||
|
||||
// LDAP and LDAP_SIMPLE Driver options
|
||||
// -----------------------------------
|
||||
// LDAP server name to connect to.
|
||||
// You can provide one or several hosts in an array in which case the hosts are tried from left to right.
|
||||
// Exemple: array('ldap1.exemple.com', 'ldap2.exemple.com');
|
||||
// Default: 'localhost'
|
||||
$config['password_ldap_host'] = 'localhost';
|
||||
|
||||
// LDAP server port to connect to
|
||||
// Default: '389'
|
||||
$config['password_ldap_port'] = '389';
|
||||
|
||||
// TLS is started after connecting
|
||||
// Using TLS for password modification is recommended.
|
||||
// Default: false
|
||||
$config['password_ldap_starttls'] = false;
|
||||
|
||||
// LDAP version
|
||||
// Default: '3'
|
||||
$config['password_ldap_version'] = '3';
|
||||
|
||||
// LDAP base name (root directory)
|
||||
// Exemple: 'dc=exemple,dc=com'
|
||||
$config['password_ldap_basedn'] = 'dc=exemple,dc=com';
|
||||
|
||||
// LDAP connection method
|
||||
// There are two connection methods for changing a user's LDAP password.
|
||||
// 'user': use user credential (recommended, require password_confirm_current=true)
|
||||
// 'admin': use admin credential (this mode require password_ldap_adminDN and password_ldap_adminPW)
|
||||
// Default: 'user'
|
||||
$config['password_ldap_method'] = 'user';
|
||||
|
||||
// LDAP Admin DN
|
||||
// Used only in admin connection mode
|
||||
// Default: null
|
||||
$config['password_ldap_adminDN'] = null;
|
||||
|
||||
// LDAP Admin Password
|
||||
// Used only in admin connection mode
|
||||
// Default: null
|
||||
$config['password_ldap_adminPW'] = null;
|
||||
|
||||
// LDAP user DN mask
|
||||
// The user's DN is mandatory and as we only have his login,
|
||||
// we need to re-create his DN using a mask
|
||||
// '%login' will be replaced by the current roundcube user's login
|
||||
// '%name' will be replaced by the current roundcube user's name part
|
||||
// '%domain' will be replaced by the current roundcube user's domain part
|
||||
// '%dc' will be replaced by domain name hierarchal string e.g. "dc=test,dc=domain,dc=com"
|
||||
// Exemple: 'uid=%login,ou=people,dc=exemple,dc=com'
|
||||
$config['password_ldap_userDN_mask'] = 'uid=%login,ou=people,dc=exemple,dc=com';
|
||||
|
||||
// LDAP search DN
|
||||
// The DN roundcube should bind with to find out user's DN
|
||||
// based on his login. Note that you should comment out the default
|
||||
// password_ldap_userDN_mask setting for this to take effect.
|
||||
// Use this if you cannot specify a general template for user DN with
|
||||
// password_ldap_userDN_mask. You need to perform a search based on
|
||||
// users login to find his DN instead. A common reason might be that
|
||||
// your users are placed under different ou's like engineering or
|
||||
// sales which cannot be derived from their login only.
|
||||
$config['password_ldap_searchDN'] = 'cn=roundcube,ou=services,dc=example,dc=com';
|
||||
|
||||
// LDAP search password
|
||||
// If password_ldap_searchDN is set, the password to use for
|
||||
// binding to search for user's DN. Note that you should comment out the default
|
||||
// password_ldap_userDN_mask setting for this to take effect.
|
||||
// Warning: Be sure to set approperiate permissions on this file so this password
|
||||
// is only accesible to roundcube and don't forget to restrict roundcube's access to
|
||||
// your directory as much as possible using ACLs. Should this password be compromised
|
||||
// you want to minimize the damage.
|
||||
$config['password_ldap_searchPW'] = 'secret';
|
||||
|
||||
// LDAP search base
|
||||
// If password_ldap_searchDN is set, the base to search in using the filter below.
|
||||
// Note that you should comment out the default password_ldap_userDN_mask setting
|
||||
// for this to take effect.
|
||||
$config['password_ldap_search_base'] = 'ou=people,dc=example,dc=com';
|
||||
|
||||
// LDAP search filter
|
||||
// If password_ldap_searchDN is set, the filter to use when
|
||||
// searching for user's DN. Note that you should comment out the default
|
||||
// password_ldap_userDN_mask setting for this to take effect.
|
||||
// '%login' will be replaced by the current roundcube user's login
|
||||
// '%name' will be replaced by the current roundcube user's name part
|
||||
// '%domain' will be replaced by the current roundcube user's domain part
|
||||
// '%dc' will be replaced by domain name hierarchal string e.g. "dc=test,dc=domain,dc=com"
|
||||
// Example: '(uid=%login)'
|
||||
// Example: '(&(objectClass=posixAccount)(uid=%login))'
|
||||
$config['password_ldap_search_filter'] = '(uid=%login)';
|
||||
|
||||
// LDAP password hash type
|
||||
// Standard LDAP encryption type which must be one of: crypt,
|
||||
// ext_des, md5crypt, blowfish, md5, sha, smd5, ssha, ad, cram-md5 (dovecot style) or clear.
|
||||
// Set to 'default' if you want to use method specified in password_algorithm option above.
|
||||
// Multiple password Values can be generated by concatenating encodings with a +. E.g. 'cram-md5+crypt'
|
||||
// Default: 'crypt'.
|
||||
$config['password_ldap_encodage'] = 'crypt';
|
||||
|
||||
// LDAP password attribute
|
||||
// Name of the ldap's attribute used for storing user password
|
||||
// Default: 'userPassword'
|
||||
$config['password_ldap_pwattr'] = 'userPassword';
|
||||
|
||||
// LDAP password force replace
|
||||
// Force LDAP replace in cases where ACL allows only replace not read
|
||||
// See http://pear.php.net/package/Net_LDAP2/docs/latest/Net_LDAP2/Net_LDAP2_Entry.html#methodreplace
|
||||
// Default: true
|
||||
$config['password_ldap_force_replace'] = true;
|
||||
|
||||
// LDAP Password Last Change Date
|
||||
// Some places use an attribute to store the date of the last password change
|
||||
// The date is meassured in "days since epoch" (an integer value)
|
||||
// Whenever the password is changed, the attribute will be updated if set (e.g. shadowLastChange)
|
||||
$config['password_ldap_lchattr'] = '';
|
||||
|
||||
// LDAP Samba password attribute, e.g. sambaNTPassword
|
||||
// Name of the LDAP's Samba attribute used for storing user password
|
||||
$config['password_ldap_samba_pwattr'] = '';
|
||||
|
||||
// LDAP Samba Password Last Change Date attribute, e.g. sambaPwdLastSet
|
||||
// Some places use an attribute to store the date of the last password change
|
||||
// The date is meassured in "seconds since epoch" (an integer value)
|
||||
// Whenever the password is changed, the attribute will be updated if set
|
||||
$config['password_ldap_samba_lchattr'] = '';
|
||||
|
||||
// LDAP PPolicy Driver options
|
||||
// -----------------------------------
|
||||
|
||||
// LDAP Change password command - filename of the perl script
|
||||
// Example: 'change_ldap_pass.pl'
|
||||
$config['password_ldap_ppolicy_cmd'] = 'change_ldap_pass.pl';
|
||||
|
||||
// LDAP URI
|
||||
// Example: 'ldap://ldap.example.com/ ldaps://ldap2.example.com:636/'
|
||||
$config['password_ldap_ppolicy_uri'] = 'ldap://localhost/';
|
||||
|
||||
// LDAP base name (root directory)
|
||||
// Exemple: 'dc=exemple,dc=com'
|
||||
$config['password_ldap_ppolicy_basedn'] = 'dc=example,dc=com';
|
||||
|
||||
$config['password_ldap_ppolicy_searchDN'] = 'cn=someuser,dc=example,dc=com';
|
||||
|
||||
$config['password_ldap_ppolicy_searchPW'] = 'secret';
|
||||
|
||||
// LDAP search filter
|
||||
// Example: '(uid=%login)'
|
||||
// Example: '(&(objectClass=posixAccount)(uid=%login))'
|
||||
$config['password_ldap_ppolicy_search_filter'] = '(uid=%login)';
|
||||
|
||||
// CA Certificate file if in URI is LDAPS connection
|
||||
$config['password_ldap_ppolicy_cafile'] = '/etc/ssl/cacert.crt';
|
||||
|
||||
|
||||
|
||||
// DirectAdmin Driver options
|
||||
// --------------------------
|
||||
// The host which changes the password
|
||||
// Use 'ssl://host' instead of 'tcp://host' when running DirectAdmin over SSL.
|
||||
// The host can contain the following macros that will be expanded as follows:
|
||||
// %h is replaced with the imap host (from the session info)
|
||||
// %d is replaced with the domain part of the username (if the username is an email)
|
||||
$config['password_directadmin_host'] = 'tcp://localhost';
|
||||
|
||||
// TCP port used for DirectAdmin connections
|
||||
$config['password_directadmin_port'] = 2222;
|
||||
|
||||
|
||||
// vpopmaild Driver options
|
||||
// -----------------------
|
||||
// The host which changes the password
|
||||
$config['password_vpopmaild_host'] = 'localhost';
|
||||
|
||||
// TCP port used for vpopmaild connections
|
||||
$config['password_vpopmaild_port'] = 89;
|
||||
|
||||
// Timeout used for the connection to vpopmaild (in seconds)
|
||||
$config['password_vpopmaild_timeout'] = 10;
|
||||
|
||||
|
||||
// cPanel Driver options
|
||||
// --------------------------
|
||||
// The cPanel Host name
|
||||
$config['password_cpanel_host'] = 'host.domain.com';
|
||||
|
||||
// The cPanel admin username
|
||||
$config['password_cpanel_username'] = 'username';
|
||||
|
||||
// The cPanel admin password
|
||||
$config['password_cpanel_password'] = 'password';
|
||||
|
||||
// The cPanel admin hash
|
||||
// If you prefer to use a hash (Remote Access Key) instead of plain password, enter it below.
|
||||
// Hash takes precedence over password auth.
|
||||
// You can generate a Remote Access Key in WHM -> Clusters -> Remote Access Key
|
||||
$config['password_cpanel_hash'] = '';
|
||||
|
||||
// The cPanel port to use
|
||||
$config['password_cpanel_port'] = 2087;
|
||||
|
||||
|
||||
// cPanel Webmail Driver options
|
||||
// -----------------------------
|
||||
// The cPanel Host name
|
||||
$config['password_cpanel_webmail_host'] = 'host.domain.com';
|
||||
|
||||
// The cPanel port to use
|
||||
$config['password_cpanel_webmail_port'] = 2096;
|
||||
|
||||
|
||||
// XIMSS (Communigate server) Driver options
|
||||
// -----------------------------------------
|
||||
// Host name of the Communigate server
|
||||
$config['password_ximss_host'] = 'mail.example.com';
|
||||
|
||||
// XIMSS port on Communigate server
|
||||
$config['password_ximss_port'] = 11024;
|
||||
|
||||
|
||||
// chpasswd Driver options
|
||||
// ---------------------
|
||||
// Command to use (see "Sudo setup" in README)
|
||||
$config['password_chpasswd_cmd'] = 'sudo /usr/sbin/chpasswd 2> /dev/null';
|
||||
|
||||
|
||||
// XMail Driver options
|
||||
// ---------------------
|
||||
$config['xmail_host'] = 'localhost';
|
||||
$config['xmail_user'] = 'YourXmailControlUser';
|
||||
$config['xmail_pass'] = 'YourXmailControlPass';
|
||||
$config['xmail_port'] = 6017;
|
||||
|
||||
|
||||
// hMail Driver options
|
||||
// -----------------------
|
||||
// Remote hMailServer configuration
|
||||
// true: HMailserver is on a remote box (php.ini: com.allow_dcom = true)
|
||||
// false: Hmailserver is on same box as PHP
|
||||
$config['hmailserver_remote_dcom'] = false;
|
||||
// Windows credentials
|
||||
$config['hmailserver_server'] = array(
|
||||
'Server' => 'localhost', // hostname or ip address
|
||||
'Username' => 'administrator', // windows username
|
||||
'Password' => 'password' // windows user password
|
||||
);
|
||||
|
||||
|
||||
// pw_usermod Driver options
|
||||
// --------------------------
|
||||
// Use comma delimited exlist to disable password change for users.
|
||||
// See "Sudo setup" in README file.
|
||||
$config['password_pw_usermod_cmd'] = 'sudo /usr/sbin/pw usermod -h 0 -n';
|
||||
|
||||
|
||||
// DBMail Driver options
|
||||
// -------------------
|
||||
// Additional arguments for the dbmail-users call
|
||||
$config['password_dbmail_args'] = '-p sha512';
|
||||
|
||||
|
||||
// Expect Driver options
|
||||
// ---------------------
|
||||
// Location of expect binary
|
||||
$config['password_expect_bin'] = '/usr/bin/expect';
|
||||
|
||||
// Location of expect script (see helpers/passwd-expect)
|
||||
$config['password_expect_script'] = '';
|
||||
|
||||
// Arguments for the expect script. See the helpers/passwd-expect file for details.
|
||||
// This is probably a good starting default:
|
||||
// -telent -host localhost -output /tmp/passwd.log -log /tmp/passwd.log
|
||||
$config['password_expect_params'] = '';
|
||||
|
||||
|
||||
// smb Driver options
|
||||
// ---------------------
|
||||
// Samba host (default: localhost)
|
||||
// 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)
|
||||
$config['password_smb_host'] = 'localhost';
|
||||
// Location of smbpasswd binary (default: /usr/bin/smbpasswd)
|
||||
$config['password_smb_cmd'] = '/usr/bin/smbpasswd';
|
||||
|
||||
// gearman driver options
|
||||
// ---------------------
|
||||
// Gearman host (default: localhost)
|
||||
$config['password_gearman_host'] = 'localhost';
|
||||
|
||||
|
||||
// Plesk/PPA Driver options
|
||||
// --------------------
|
||||
// You need to allow RCP for IP of roundcube-server in Plesk/PPA Panel
|
||||
|
||||
// Plesk RCP Host
|
||||
$config['password_plesk_host'] = '10.0.0.5';
|
||||
|
||||
// Plesk RPC Username
|
||||
$config['password_plesk_user'] = 'admin';
|
||||
|
||||
// Plesk RPC Password
|
||||
$config['password_plesk_pass'] = 'password';
|
||||
|
||||
// Plesk RPC Port
|
||||
$config['password_plesk_rpc_port'] = '8443';
|
||||
|
||||
// Plesk RPC Path
|
||||
$config['password_plesk_rpc_path'] = 'enterprise/control/agent.php';
|
||||
|
||||
|
||||
// kasswd Driver options
|
||||
// ---------------------
|
||||
// Command to use
|
||||
$config['password_kpasswd_cmd'] = '/usr/bin/kpasswd';
|
||||
|
||||
|
||||
// Modoboa Driver options
|
||||
// ---------------------
|
||||
// put token number from Modoboa server
|
||||
$config['password_modoboa_api_token'] = '';
|
126
plugins/sauserprefs/config.inc.php
Normal file
126
plugins/sauserprefs/config.inc.php
Normal file
|
@ -0,0 +1,126 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* SAUserPrefs configuration file
|
||||
*/
|
||||
|
||||
// spamassassin database settings
|
||||
$config['sauserprefs_db_dsnw'] = 'mysql://vmail:password@localhost/vmail';
|
||||
|
||||
// PEAR database DSN for read only operations (if empty write database will be used)
|
||||
// useful for database replication
|
||||
$config['sauserprefs_db_dsnr'] = '';
|
||||
|
||||
// use persistent db-connections
|
||||
// beware this will not "always" work as expected
|
||||
// see: http://www.php.net/manual/en/features.persistent-connections.php
|
||||
$config['sauserprefs_db_persistent'] = false;
|
||||
|
||||
// table that holds user prefs
|
||||
$config['sauserprefs_sql_table_name'] = 'sa_userpref';
|
||||
|
||||
// name of the username field in the user prefs table
|
||||
$config['sauserprefs_sql_username_field'] = 'username';
|
||||
|
||||
// name of the preference field in the user prefs table, holds the name of the preference
|
||||
$config['sauserprefs_sql_preference_field'] = 'preference';
|
||||
|
||||
// name of the value field in the user prefs table, holds the value of the preference
|
||||
$config['sauserprefs_sql_value_field'] = 'value';
|
||||
|
||||
// username of the current user in the database, normaly %u (username from the session info)
|
||||
// %u is replaced with the username (from the session info)
|
||||
// %l is replaced with the local part of the username (if the username is an email address)
|
||||
// %d is replaced with the domain part of the username (if the username is an email address or default mail domain if not)
|
||||
// %i is replaced with the email address from the user's default identity
|
||||
$config['sauserprefs_userid'] = '%i';
|
||||
|
||||
// username of the global or default settings user in the database, normaly $GLOBAL or @GLOBAL
|
||||
$config['sauserprefs_global_userid'] = '\$GLOBAL';
|
||||
|
||||
// enable address whitelist synchronisation with address book(s)
|
||||
// possible values:
|
||||
// false - synchronisation disabled
|
||||
// true - synchronise with default address book
|
||||
// array - an array of address book ids to synchronise with e.g. array('0', 'global'); '0' = the default address book
|
||||
$config['sauserprefs_abook_sync'] = false;
|
||||
|
||||
// set to false to disable address book import
|
||||
// possible values:
|
||||
// false - address import disabled
|
||||
// true - import addresses from default address book
|
||||
// array - an array of address book ids to import e.g. array('0', 'global'); '0' = the default address book
|
||||
$config['sauserprefs_abook_import'] = false;
|
||||
|
||||
// don't allow these settings to be overriden by the user
|
||||
// eg. $config['sauserprefs_dont_override'] = array('required_score','rewrite_header Subject');
|
||||
// to disable entire sections enter the secion name surrounded by braces. Sections are: general,tests,bayes,headers,report,addresses
|
||||
// eg. $config['sauserprefs_dont_override'] = array('{tests}');
|
||||
$config['sauserprefs_dont_override'] = array('{general}', '{}', '{tests}', '{bayes}', '{headers}', '{report}', 'use_auto_whitelist', 'score USER_IN_WHITELIST', 'score USER_IN_BLACKLIST');
|
||||
|
||||
// activate SAUserPrefs for selected mail hosts only. If this is not set all mail hosts are allowed.
|
||||
// example: $config['sauserprefs_allowed_hosts'] = array('mail1.domain.tld', 'mail2.domain.tld');
|
||||
$config['sauserprefs_allowed_hosts'] = null;
|
||||
|
||||
// load specific config for different mail hosts
|
||||
// example: $config['sauserprefs_host_config'] = array(
|
||||
// 'mail1.domain.tld' => 'mail1_config.inc.php',
|
||||
// 'mail2.domain.tld' => 'mail2_config.inc.php',
|
||||
// );
|
||||
$config['sauserprefs_host_config'] = null;
|
||||
|
||||
// default settings
|
||||
// these are overridden by $GLOBAL and user settings from the database
|
||||
$config['sauserprefs_default_prefs'] = array(
|
||||
// 'required_score' => 5,
|
||||
// 'rewrite_header Subject' => '',
|
||||
// 'ok_languages' => 'all',
|
||||
// 'ok_locales' => 'all',
|
||||
// 'fold_headers' => 1,
|
||||
// 'add_header all Level' => '_STARS(*)_',
|
||||
// 'use_razor1' => 0,
|
||||
// 'use_razor2' => 1,
|
||||
// 'use_pyzor' => 1,
|
||||
// 'use_dcc' => 1,
|
||||
// 'use_bayes' => 1,
|
||||
// 'skip_rbl_checks' => 0,
|
||||
// 'report_safe' => 1,
|
||||
// 'bayes_auto_learn' => 1,
|
||||
// 'bayes_auto_learn_threshold_nonspam' => 0.1,
|
||||
// 'bayes_auto_learn_threshold_spam' => 12.0,
|
||||
// 'use_bayes_rules' => 1,
|
||||
// 'use_auto_whitelist' => 0,
|
||||
// 'score USER_IN_BLACKLIST' => 10,
|
||||
// 'score USER_IN_WHITELIST' => -10
|
||||
);
|
||||
|
||||
// score options
|
||||
// define the ranges for the various score select boxes
|
||||
// '[field name]' => array('min' => [min], 'max' => [max], 'increment' => [increment], 'extra' => array())
|
||||
// note: the 'extra' key is optional and should contain further arrays with min, max and increment keys
|
||||
$config['sauserprefs_score_options'] = array(
|
||||
// '*' => array('min' => 1, 'max' => 10, 'increment' => 1),
|
||||
// '_bayesnonspam' => array('min' => -1, 'max' => 1, 'increment' => 0.1),
|
||||
// '_bayesspam' => array('min' => 1, 'max' => 20, 'increment' => 1),
|
||||
'_score_user_blacklist' => array('min' => 0, 'max' => 100, 'increment' => 10, 'extra' => array(array('min' => 1, 'max' => 10, 'increment' => 1))),
|
||||
'_score_user_whitelist' => array('min' => -100, 'max' => -1, 'increment' => 10, 'extra' => array(array('min' => -10, 'max' => -1, 'increment' => 1)))
|
||||
);
|
||||
|
||||
// delete user bayesian data stored in database
|
||||
// the query can contain the following macros that will be expanded as follows:
|
||||
// %u is replaced with the username from the sauserprefs_userid setting above
|
||||
// use an array to run multiple queries
|
||||
// set to null to disable this option
|
||||
// eg. $config['sauserprefs_bayes_delete_query'] = array(
|
||||
// 'DELETE FROM bayes_seen WHERE id IN (SELECT id FROM bayes_vars WHERE username = %u);',
|
||||
// 'DELETE FROM bayes_token WHERE id IN (SELECT id FROM bayes_vars WHERE username = %u);',
|
||||
// 'DELETE FROM bayes_vars WHERE username = %u;'
|
||||
// );
|
||||
$config['sauserprefs_bayes_delete_query'] = null;
|
||||
|
||||
// allowed languages
|
||||
// set to array of language codes to limit the language list available for the ok_languages option
|
||||
// eg array('en', 'es', 'ru', 'zh');
|
||||
// see the README for a full list of supported languages
|
||||
// set to null for all possible languages
|
||||
$config['sauserprefs_langs_allowed'] = null;
|
792
rc.sql
Normal file
792
rc.sql
Normal file
|
@ -0,0 +1,792 @@
|
|||
-- Host: localhost
|
||||
|
||||
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
||||
START TRANSACTION;
|
||||
SET time_zone = "+00:00";
|
||||
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8mb4 */;
|
||||
|
||||
--
|
||||
-- Database: `vmail`
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `rc_cache`
|
||||
--
|
||||
|
||||
CREATE TABLE `rc_cache` (
|
||||
`user_id` int(10) UNSIGNED NOT NULL,
|
||||
`cache_key` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
|
||||
`expires` datetime DEFAULT NULL,
|
||||
`data` longtext NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
-- RELATIONSHIPS FOR TABLE `rc_cache`:
|
||||
-- `user_id`
|
||||
-- `rc_users` -> `user_id`
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `rc_cache_index`
|
||||
--
|
||||
|
||||
CREATE TABLE `rc_cache_index` (
|
||||
`user_id` int(10) UNSIGNED NOT NULL,
|
||||
`mailbox` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
|
||||
`expires` datetime DEFAULT NULL,
|
||||
`valid` tinyint(1) NOT NULL DEFAULT 0,
|
||||
`data` longtext NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
-- RELATIONSHIPS FOR TABLE `rc_cache_index`:
|
||||
-- `user_id`
|
||||
-- `rc_users` -> `user_id`
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `rc_cache_messages`
|
||||
--
|
||||
|
||||
CREATE TABLE `rc_cache_messages` (
|
||||
`user_id` int(10) UNSIGNED NOT NULL,
|
||||
`mailbox` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
|
||||
`uid` int(11) UNSIGNED NOT NULL DEFAULT 0,
|
||||
`expires` datetime DEFAULT NULL,
|
||||
`data` longtext NOT NULL,
|
||||
`flags` int(11) NOT NULL DEFAULT 0
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
-- RELATIONSHIPS FOR TABLE `rc_cache_messages`:
|
||||
-- `user_id`
|
||||
-- `rc_users` -> `user_id`
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `rc_cache_shared`
|
||||
--
|
||||
|
||||
CREATE TABLE `rc_cache_shared` (
|
||||
`cache_key` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
|
||||
`expires` datetime DEFAULT NULL,
|
||||
`data` longtext NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
-- RELATIONSHIPS FOR TABLE `rc_cache_shared`:
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `rc_cache_thread`
|
||||
--
|
||||
|
||||
CREATE TABLE `rc_cache_thread` (
|
||||
`user_id` int(10) UNSIGNED NOT NULL,
|
||||
`mailbox` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
|
||||
`expires` datetime DEFAULT NULL,
|
||||
`data` longtext NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
-- RELATIONSHIPS FOR TABLE `rc_cache_thread`:
|
||||
-- `user_id`
|
||||
-- `rc_users` -> `user_id`
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `rc_carddav_addressbooks`
|
||||
--
|
||||
|
||||
CREATE TABLE `rc_carddav_addressbooks` (
|
||||
`id` int(10) UNSIGNED NOT NULL,
|
||||
`name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`username` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`password` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`url` varchar(4095) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`active` tinyint(3) UNSIGNED NOT NULL DEFAULT 1,
|
||||
`user_id` int(10) UNSIGNED NOT NULL,
|
||||
`last_updated` timestamp NOT NULL DEFAULT '2000-01-01 08:00:01',
|
||||
`refresh_time` time NOT NULL DEFAULT '01:00:00',
|
||||
`sync_token` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`presetname` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`use_categories` int(11) NOT NULL DEFAULT 0
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- RELATIONSHIPS FOR TABLE `rc_carddav_addressbooks`:
|
||||
-- `user_id`
|
||||
-- `rc_users` -> `user_id`
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `rc_carddav_contacts`
|
||||
--
|
||||
|
||||
CREATE TABLE `rc_carddav_contacts` (
|
||||
`id` int(10) UNSIGNED NOT NULL,
|
||||
`abook_id` int(10) UNSIGNED NOT NULL,
|
||||
`name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`email` varchar(4095) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`firstname` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`surname` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`organization` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`showas` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`vcard` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`etag` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`uri` varchar(700) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`cuid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- RELATIONSHIPS FOR TABLE `rc_carddav_contacts`:
|
||||
-- `abook_id`
|
||||
-- `rc_carddav_addressbooks` -> `id`
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `rc_carddav_groups`
|
||||
--
|
||||
|
||||
CREATE TABLE `rc_carddav_groups` (
|
||||
`id` int(10) UNSIGNED NOT NULL,
|
||||
`abook_id` int(10) UNSIGNED NOT NULL,
|
||||
`name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`vcard` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`etag` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`uri` varchar(700) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`cuid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- RELATIONSHIPS FOR TABLE `rc_carddav_groups`:
|
||||
-- `abook_id`
|
||||
-- `rc_carddav_addressbooks` -> `id`
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `rc_carddav_group_user`
|
||||
--
|
||||
|
||||
CREATE TABLE `rc_carddav_group_user` (
|
||||
`group_id` int(10) UNSIGNED NOT NULL,
|
||||
`contact_id` int(10) UNSIGNED NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- RELATIONSHIPS FOR TABLE `rc_carddav_group_user`:
|
||||
-- `group_id`
|
||||
-- `rc_carddav_groups` -> `id`
|
||||
-- `contact_id`
|
||||
-- `rc_carddav_contacts` -> `id`
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `rc_carddav_migrations`
|
||||
--
|
||||
|
||||
CREATE TABLE `rc_carddav_migrations` (
|
||||
`ID` bigint(20) UNSIGNED NOT NULL,
|
||||
`filename` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`processed_at` timestamp NOT NULL DEFAULT current_timestamp()
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- RELATIONSHIPS FOR TABLE `rc_carddav_migrations`:
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `rc_carddav_xsubtypes`
|
||||
--
|
||||
|
||||
CREATE TABLE `rc_carddav_xsubtypes` (
|
||||
`id` int(10) UNSIGNED NOT NULL,
|
||||
`typename` varchar(128) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`subtype` varchar(128) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`abook_id` int(10) UNSIGNED NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- RELATIONSHIPS FOR TABLE `rc_carddav_xsubtypes`:
|
||||
-- `abook_id`
|
||||
-- `rc_carddav_addressbooks` -> `id`
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `rc_contactgroupmembers`
|
||||
--
|
||||
|
||||
CREATE TABLE `rc_contactgroupmembers` (
|
||||
`contactgroup_id` int(10) UNSIGNED NOT NULL,
|
||||
`contact_id` int(10) UNSIGNED NOT NULL,
|
||||
`created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
--
|
||||
-- RELATIONSHIPS FOR TABLE `rc_contactgroupmembers`:
|
||||
-- `contact_id`
|
||||
-- `rc_contacts` -> `contact_id`
|
||||
-- `contactgroup_id`
|
||||
-- `rc_contactgroups` -> `contactgroup_id`
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `rc_contactgroups`
|
||||
--
|
||||
|
||||
CREATE TABLE `rc_contactgroups` (
|
||||
`contactgroup_id` int(10) UNSIGNED NOT NULL,
|
||||
`user_id` int(10) UNSIGNED NOT NULL,
|
||||
`changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
|
||||
`del` tinyint(1) NOT NULL DEFAULT 0,
|
||||
`name` varchar(128) NOT NULL DEFAULT ''
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
-- RELATIONSHIPS FOR TABLE `rc_contactgroups`:
|
||||
-- `user_id`
|
||||
-- `rc_users` -> `user_id`
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `rc_contacts`
|
||||
--
|
||||
|
||||
CREATE TABLE `rc_contacts` (
|
||||
`contact_id` int(10) UNSIGNED NOT NULL,
|
||||
`changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
|
||||
`del` tinyint(1) NOT NULL DEFAULT 0,
|
||||
`name` varchar(128) NOT NULL DEFAULT '',
|
||||
`email` text NOT NULL,
|
||||
`firstname` varchar(128) NOT NULL DEFAULT '',
|
||||
`surname` varchar(128) NOT NULL DEFAULT '',
|
||||
`vcard` longtext DEFAULT NULL,
|
||||
`words` text DEFAULT NULL,
|
||||
`user_id` int(10) UNSIGNED NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
-- RELATIONSHIPS FOR TABLE `rc_contacts`:
|
||||
-- `user_id`
|
||||
-- `rc_users` -> `user_id`
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `rc_dictionary`
|
||||
--
|
||||
|
||||
CREATE TABLE `rc_dictionary` (
|
||||
`id` int(10) UNSIGNED NOT NULL,
|
||||
`user_id` int(10) UNSIGNED DEFAULT NULL,
|
||||
`language` varchar(5) NOT NULL,
|
||||
`data` longtext NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
-- RELATIONSHIPS FOR TABLE `rc_dictionary`:
|
||||
-- `user_id`
|
||||
-- `rc_users` -> `user_id`
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `rc_filestore`
|
||||
--
|
||||
|
||||
CREATE TABLE `rc_filestore` (
|
||||
`file_id` int(10) UNSIGNED NOT NULL,
|
||||
`user_id` int(10) UNSIGNED NOT NULL,
|
||||
`context` varchar(32) NOT NULL,
|
||||
`filename` varchar(128) NOT NULL,
|
||||
`mtime` int(10) NOT NULL,
|
||||
`data` longtext NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
-- RELATIONSHIPS FOR TABLE `rc_filestore`:
|
||||
-- `user_id`
|
||||
-- `rc_users` -> `user_id`
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `rc_identities`
|
||||
--
|
||||
|
||||
CREATE TABLE `rc_identities` (
|
||||
`identity_id` int(10) UNSIGNED NOT NULL,
|
||||
`user_id` int(10) UNSIGNED NOT NULL,
|
||||
`changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
|
||||
`del` tinyint(1) NOT NULL DEFAULT 0,
|
||||
`standard` tinyint(1) NOT NULL DEFAULT 0,
|
||||
`name` varchar(128) NOT NULL,
|
||||
`organization` varchar(128) NOT NULL DEFAULT '',
|
||||
`email` varchar(128) NOT NULL,
|
||||
`reply-to` varchar(128) NOT NULL DEFAULT '',
|
||||
`bcc` varchar(128) NOT NULL DEFAULT '',
|
||||
`signature` longtext DEFAULT NULL,
|
||||
`html_signature` tinyint(1) NOT NULL DEFAULT 0
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
-- RELATIONSHIPS FOR TABLE `rc_identities`:
|
||||
-- `user_id`
|
||||
-- `rc_users` -> `user_id`
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `rc_searches`
|
||||
--
|
||||
|
||||
CREATE TABLE `rc_searches` (
|
||||
`search_id` int(10) UNSIGNED NOT NULL,
|
||||
`user_id` int(10) UNSIGNED NOT NULL,
|
||||
`type` int(3) NOT NULL DEFAULT 0,
|
||||
`name` varchar(128) NOT NULL,
|
||||
`data` text DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
-- RELATIONSHIPS FOR TABLE `rc_searches`:
|
||||
-- `user_id`
|
||||
-- `rc_users` -> `user_id`
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `rc_session`
|
||||
--
|
||||
|
||||
CREATE TABLE `rc_session` (
|
||||
`sess_id` varchar(128) NOT NULL,
|
||||
`changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
|
||||
`ip` varchar(40) NOT NULL,
|
||||
`vars` mediumtext NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
-- RELATIONSHIPS FOR TABLE `rc_session`:
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `rc_system`
|
||||
--
|
||||
|
||||
CREATE TABLE `rc_system` (
|
||||
`name` varchar(64) NOT NULL,
|
||||
`value` mediumtext DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
-- RELATIONSHIPS FOR TABLE `rc_system`:
|
||||
--
|
||||
|
||||
--
|
||||
-- Dumping data for table `rc_system`
|
||||
--
|
||||
|
||||
INSERT INTO `rc_system` (`name`, `value`) VALUES
|
||||
('roundcube-version', '2019092900');
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `rc_users`
|
||||
--
|
||||
|
||||
CREATE TABLE `rc_users` (
|
||||
`user_id` int(10) UNSIGNED NOT NULL,
|
||||
`username` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
|
||||
`mail_host` varchar(128) NOT NULL,
|
||||
`created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
|
||||
`last_login` datetime DEFAULT NULL,
|
||||
`failed_login` datetime DEFAULT NULL,
|
||||
`failed_login_counter` int(10) UNSIGNED DEFAULT NULL,
|
||||
`language` varchar(5) DEFAULT NULL,
|
||||
`preferences` longtext DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
-- RELATIONSHIPS FOR TABLE `rc_users`:
|
||||
--
|
||||
|
||||
--
|
||||
-- Indexes for dumped tables
|
||||
--
|
||||
|
||||
--
|
||||
-- Indexes for table `rc_cache`
|
||||
--
|
||||
ALTER TABLE `rc_cache`
|
||||
ADD PRIMARY KEY (`user_id`,`cache_key`),
|
||||
ADD KEY `expires_index` (`expires`);
|
||||
|
||||
--
|
||||
-- Indexes for table `rc_cache_index`
|
||||
--
|
||||
ALTER TABLE `rc_cache_index`
|
||||
ADD PRIMARY KEY (`user_id`,`mailbox`),
|
||||
ADD KEY `expires_index` (`expires`);
|
||||
|
||||
--
|
||||
-- Indexes for table `rc_cache_messages`
|
||||
--
|
||||
ALTER TABLE `rc_cache_messages`
|
||||
ADD PRIMARY KEY (`user_id`,`mailbox`,`uid`),
|
||||
ADD KEY `expires_index` (`expires`);
|
||||
|
||||
--
|
||||
-- Indexes for table `rc_cache_shared`
|
||||
--
|
||||
ALTER TABLE `rc_cache_shared`
|
||||
ADD PRIMARY KEY (`cache_key`),
|
||||
ADD KEY `expires_index` (`expires`);
|
||||
|
||||
--
|
||||
-- Indexes for table `rc_cache_thread`
|
||||
--
|
||||
ALTER TABLE `rc_cache_thread`
|
||||
ADD PRIMARY KEY (`user_id`,`mailbox`),
|
||||
ADD KEY `expires_index` (`expires`);
|
||||
|
||||
--
|
||||
-- Indexes for table `rc_carddav_addressbooks`
|
||||
--
|
||||
ALTER TABLE `rc_carddav_addressbooks`
|
||||
ADD PRIMARY KEY (`id`),
|
||||
ADD KEY `user_id` (`user_id`) USING BTREE;
|
||||
|
||||
--
|
||||
-- Indexes for table `rc_carddav_contacts`
|
||||
--
|
||||
ALTER TABLE `rc_carddav_contacts`
|
||||
ADD PRIMARY KEY (`id`),
|
||||
ADD UNIQUE KEY `cuid` (`cuid`(191),`abook_id`) USING BTREE,
|
||||
ADD UNIQUE KEY `uri` (`uri`(191),`abook_id`) USING BTREE,
|
||||
ADD KEY `abook_id` (`abook_id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `rc_carddav_groups`
|
||||
--
|
||||
ALTER TABLE `rc_carddav_groups`
|
||||
ADD PRIMARY KEY (`id`),
|
||||
ADD UNIQUE KEY `cuid` (`cuid`(191),`abook_id`) USING BTREE,
|
||||
ADD UNIQUE KEY `uri` (`uri`(191),`abook_id`) USING BTREE,
|
||||
ADD KEY `abook_id` (`abook_id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `rc_carddav_group_user`
|
||||
--
|
||||
ALTER TABLE `rc_carddav_group_user`
|
||||
ADD PRIMARY KEY (`group_id`,`contact_id`),
|
||||
ADD KEY `contact_id` (`contact_id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `rc_carddav_migrations`
|
||||
--
|
||||
ALTER TABLE `rc_carddav_migrations`
|
||||
ADD PRIMARY KEY (`ID`),
|
||||
ADD UNIQUE KEY `filename` (`filename`);
|
||||
|
||||
--
|
||||
-- Indexes for table `rc_carddav_xsubtypes`
|
||||
--
|
||||
ALTER TABLE `rc_carddav_xsubtypes`
|
||||
ADD PRIMARY KEY (`id`),
|
||||
ADD UNIQUE KEY `typename` (`typename`,`subtype`,`abook_id`),
|
||||
ADD KEY `abook_id` (`abook_id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `rc_contactgroupmembers`
|
||||
--
|
||||
ALTER TABLE `rc_contactgroupmembers`
|
||||
ADD PRIMARY KEY (`contactgroup_id`,`contact_id`),
|
||||
ADD KEY `contactgroupmembers_contact_index` (`contact_id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `rc_contactgroups`
|
||||
--
|
||||
ALTER TABLE `rc_contactgroups`
|
||||
ADD PRIMARY KEY (`contactgroup_id`),
|
||||
ADD KEY `contactgroups_user_index` (`user_id`,`del`);
|
||||
|
||||
--
|
||||
-- Indexes for table `rc_contacts`
|
||||
--
|
||||
ALTER TABLE `rc_contacts`
|
||||
ADD PRIMARY KEY (`contact_id`),
|
||||
ADD KEY `user_contacts_index` (`user_id`,`del`);
|
||||
|
||||
--
|
||||
-- Indexes for table `rc_dictionary`
|
||||
--
|
||||
ALTER TABLE `rc_dictionary`
|
||||
ADD PRIMARY KEY (`id`),
|
||||
ADD UNIQUE KEY `uniqueness` (`user_id`,`language`);
|
||||
|
||||
--
|
||||
-- Indexes for table `rc_filestore`
|
||||
--
|
||||
ALTER TABLE `rc_filestore`
|
||||
ADD PRIMARY KEY (`file_id`),
|
||||
ADD UNIQUE KEY `uniqueness` (`user_id`,`context`,`filename`);
|
||||
|
||||
--
|
||||
-- Indexes for table `rc_identities`
|
||||
--
|
||||
ALTER TABLE `rc_identities`
|
||||
ADD PRIMARY KEY (`identity_id`),
|
||||
ADD KEY `user_identities_index` (`user_id`,`del`),
|
||||
ADD KEY `email_identities_index` (`email`,`del`);
|
||||
|
||||
--
|
||||
-- Indexes for table `rc_searches`
|
||||
--
|
||||
ALTER TABLE `rc_searches`
|
||||
ADD PRIMARY KEY (`search_id`),
|
||||
ADD UNIQUE KEY `uniqueness` (`user_id`,`type`,`name`);
|
||||
|
||||
--
|
||||
-- Indexes for table `rc_session`
|
||||
--
|
||||
ALTER TABLE `rc_session`
|
||||
ADD PRIMARY KEY (`sess_id`),
|
||||
ADD KEY `changed_index` (`changed`);
|
||||
|
||||
--
|
||||
-- Indexes for table `rc_system`
|
||||
--
|
||||
ALTER TABLE `rc_system`
|
||||
ADD PRIMARY KEY (`name`);
|
||||
|
||||
--
|
||||
-- Indexes for table `rc_users`
|
||||
--
|
||||
ALTER TABLE `rc_users`
|
||||
ADD PRIMARY KEY (`user_id`),
|
||||
ADD UNIQUE KEY `username` (`username`,`mail_host`);
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for dumped tables
|
||||
--
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `rc_carddav_addressbooks`
|
||||
--
|
||||
ALTER TABLE `rc_carddav_addressbooks`
|
||||
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `rc_carddav_contacts`
|
||||
--
|
||||
ALTER TABLE `rc_carddav_contacts`
|
||||
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `rc_carddav_groups`
|
||||
--
|
||||
ALTER TABLE `rc_carddav_groups`
|
||||
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `rc_carddav_migrations`
|
||||
--
|
||||
ALTER TABLE `rc_carddav_migrations`
|
||||
MODIFY `ID` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `rc_carddav_xsubtypes`
|
||||
--
|
||||
ALTER TABLE `rc_carddav_xsubtypes`
|
||||
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `rc_contactgroups`
|
||||
--
|
||||
ALTER TABLE `rc_contactgroups`
|
||||
MODIFY `contactgroup_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `rc_contacts`
|
||||
--
|
||||
ALTER TABLE `rc_contacts`
|
||||
MODIFY `contact_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `rc_dictionary`
|
||||
--
|
||||
ALTER TABLE `rc_dictionary`
|
||||
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `rc_filestore`
|
||||
--
|
||||
ALTER TABLE `rc_filestore`
|
||||
MODIFY `file_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `rc_identities`
|
||||
--
|
||||
ALTER TABLE `rc_identities`
|
||||
MODIFY `identity_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `rc_searches`
|
||||
--
|
||||
ALTER TABLE `rc_searches`
|
||||
MODIFY `search_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `rc_users`
|
||||
--
|
||||
ALTER TABLE `rc_users`
|
||||
MODIFY `user_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
|
||||
|
||||
--
|
||||
-- Constraints for dumped tables
|
||||
--
|
||||
|
||||
--
|
||||
-- Constraints for table `rc_cache`
|
||||
--
|
||||
ALTER TABLE `rc_cache`
|
||||
ADD CONSTRAINT `user_id_fk_cache` FOREIGN KEY (`user_id`) REFERENCES `rc_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
--
|
||||
-- Constraints for table `rc_cache_index`
|
||||
--
|
||||
ALTER TABLE `rc_cache_index`
|
||||
ADD CONSTRAINT `user_id_fk_cache_index` FOREIGN KEY (`user_id`) REFERENCES `rc_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
--
|
||||
-- Constraints for table `rc_cache_messages`
|
||||
--
|
||||
ALTER TABLE `rc_cache_messages`
|
||||
ADD CONSTRAINT `user_id_fk_cache_messages` FOREIGN KEY (`user_id`) REFERENCES `rc_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
--
|
||||
-- Constraints for table `rc_cache_thread`
|
||||
--
|
||||
ALTER TABLE `rc_cache_thread`
|
||||
ADD CONSTRAINT `user_id_fk_cache_thread` FOREIGN KEY (`user_id`) REFERENCES `rc_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
--
|
||||
-- Constraints for table `rc_carddav_addressbooks`
|
||||
--
|
||||
ALTER TABLE `rc_carddav_addressbooks`
|
||||
ADD CONSTRAINT `rc_carddav_addressbooks_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `rc_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
--
|
||||
-- Constraints for table `rc_carddav_contacts`
|
||||
--
|
||||
ALTER TABLE `rc_carddav_contacts`
|
||||
ADD CONSTRAINT `rc_carddav_contacts_ibfk_1` FOREIGN KEY (`abook_id`) REFERENCES `rc_carddav_addressbooks` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
--
|
||||
-- Constraints for table `rc_carddav_groups`
|
||||
--
|
||||
ALTER TABLE `rc_carddav_groups`
|
||||
ADD CONSTRAINT `rc_carddav_groups_ibfk_1` FOREIGN KEY (`abook_id`) REFERENCES `rc_carddav_addressbooks` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
--
|
||||
-- Constraints for table `rc_carddav_group_user`
|
||||
--
|
||||
ALTER TABLE `rc_carddav_group_user`
|
||||
ADD CONSTRAINT `rc_carddav_group_user_ibfk_1` FOREIGN KEY (`group_id`) REFERENCES `rc_carddav_groups` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
ADD CONSTRAINT `rc_carddav_group_user_ibfk_2` FOREIGN KEY (`contact_id`) REFERENCES `rc_carddav_contacts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
--
|
||||
-- Constraints for table `rc_carddav_xsubtypes`
|
||||
--
|
||||
ALTER TABLE `rc_carddav_xsubtypes`
|
||||
ADD CONSTRAINT `rc_carddav_xsubtypes_ibfk_1` FOREIGN KEY (`abook_id`) REFERENCES `rc_carddav_addressbooks` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
--
|
||||
-- Constraints for table `rc_contactgroupmembers`
|
||||
--
|
||||
ALTER TABLE `rc_contactgroupmembers`
|
||||
ADD CONSTRAINT `contact_id_fk_contacts` FOREIGN KEY (`contact_id`) REFERENCES `rc_contacts` (`contact_id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
ADD CONSTRAINT `contactgroup_id_fk_contactgroups` FOREIGN KEY (`contactgroup_id`) REFERENCES `rc_contactgroups` (`contactgroup_id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
--
|
||||
-- Constraints for table `rc_contactgroups`
|
||||
--
|
||||
ALTER TABLE `rc_contactgroups`
|
||||
ADD CONSTRAINT `user_id_fk_contactgroups` FOREIGN KEY (`user_id`) REFERENCES `rc_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
--
|
||||
-- Constraints for table `rc_contacts`
|
||||
--
|
||||
ALTER TABLE `rc_contacts`
|
||||
ADD CONSTRAINT `user_id_fk_contacts` FOREIGN KEY (`user_id`) REFERENCES `rc_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
--
|
||||
-- Constraints for table `rc_dictionary`
|
||||
--
|
||||
ALTER TABLE `rc_dictionary`
|
||||
ADD CONSTRAINT `user_id_fk_dictionary` FOREIGN KEY (`user_id`) REFERENCES `rc_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
--
|
||||
-- Constraints for table `rc_filestore`
|
||||
--
|
||||
ALTER TABLE `rc_filestore`
|
||||
ADD CONSTRAINT `user_id_fk_filestore` FOREIGN KEY (`user_id`) REFERENCES `rc_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
--
|
||||
-- Constraints for table `rc_identities`
|
||||
--
|
||||
ALTER TABLE `rc_identities`
|
||||
ADD CONSTRAINT `user_id_fk_identities` FOREIGN KEY (`user_id`) REFERENCES `rc_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
--
|
||||
-- Constraints for table `rc_searches`
|
||||
--
|
||||
ALTER TABLE `rc_searches`
|
||||
ADD CONSTRAINT `user_id_fk_searches` FOREIGN KEY (`user_id`) REFERENCES `rc_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
COMMIT;
|
||||
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
6
sbin/rc-cron.sh
Normal file
6
sbin/rc-cron.sh
Normal file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
/usr/bin/php /srv/www/html/roundcube/bin/cleandb.sh > /dev/null
|
||||
/usr/bin/php /srv/www/html/roundcube/bin/deluser.sh --age=365 --dry-run > /dev/null
|
||||
/usr/bin/php /srv/www/html/roundcube/bin/gc.sh
|
||||
/usr/bin/php /srv/www/html/roundcube/bin/indexcontacts.sh > /dev/null
|
13
systemd/rc-cron.service
Normal file
13
systemd/rc-cron.service
Normal file
|
@ -0,0 +1,13 @@
|
|||
# vmail-webmail
|
||||
# https://git.stack-source.com/msb/vmail-webmail
|
||||
# MIT License Copyright (c) 2021 Matthew Saunders Brown
|
||||
#
|
||||
[Unit]
|
||||
Description=Roundcube cron
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/local/sbin/rc-cron.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
14
systemd/rc-cron.timer
Normal file
14
systemd/rc-cron.timer
Normal file
|
@ -0,0 +1,14 @@
|
|||
# vmail-webmail
|
||||
# https://git.stack-source.com/msb/vmail-webmail
|
||||
# MIT License Copyright (c) 2021 Matthew Saunders Brown
|
||||
#
|
||||
[Unit]
|
||||
Description=Roundcubemail cron once per day
|
||||
|
||||
[Timer]
|
||||
OnCalendar=daily
|
||||
Unit=rc-cron.service
|
||||
AccuracySec=6h
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in New Issue
Block a user