* Sun Sep 01 2024 Jean-Philippe Pialasse <jpp@koozali.org> 1.6-1.sme

- initial version for SME11 [SME: ]
This commit is contained in:
2024-09-02 00:01:36 -04:00
parent dc13554e0b
commit c0a6540f34
50 changed files with 1822 additions and 25 deletions

View File

@@ -0,0 +1,38 @@
{
# This snippet sets the managesieve_port config option of the plugin if Sieve service is enabled
# otherwise, the default value of "null" is kept for this config option.
use esmith::ConfigDB;
my $cdb = esmith::ConfigDB->open_ro || die "Couldn't open ConfigDB\n";
my $sievestatus = $cdb->get_prop('sieve','status') || 'disabled';
my $sieveport = $cdb->get_prop('sieve','TCPPort') || 'null';
$OUT .= "// managesieve server port. When empty the port will be determined automatically\n";
$OUT .= "// using getservbyname() function, with 4190 as a fallback.\n";
if ($sievestatus eq 'enabled') {
$OUT .= "\$config['managesieve_port'] = $sieveport; \n";
}
else {
$OUT .= "\$config['managesieve_port'] = null; \n";
}
$OUT .= "// managesieve server address (and optional port), default is localhost.\n";
$OUT .= "// Replacement variables supported in host name:\n";
$OUT .= "// %h - user's IMAP hostname\n";
$OUT .= "// %n - http hostname ($_SERVER['SERVER_NAME'])\n";
$OUT .= "// %d - domain (http hostname without the first part)\n";
$OUT .= "// For example %n = mail.domain.tld, %d = domain.tld\n";
$OUT .= "// If port is omitted it will be determined automatically using getservbyname()\n";
$OUT .= "// function, with 2000 or 4190 as a fallback (depending on current version).\n";
$OUT .= "// Note: Add tls:// prefix to enable explicit STARTTLS\n";
$OUT .= "// or add ssl:// prefix to enable implicit SSL.\n";
if ($sievestatus eq 'enabled') {
$OUT .= "\$config['managesieve_host'] = 'localhost:$sieveport'; \n";
}
else {
$OUT .= "\$config['managesieve_host'] = null; \n";
}
}

View File

@@ -0,0 +1,58 @@
// 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;
// default contents of filters script (eg. default spam filter)
$config['managesieve_default'] = '/etc/dovecot/sieve/global';
// 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'] = array();
// 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'] = array();
// List of domains limiting destination emails in redirect action
// If not empty, user will need to select domain from a list
$config['managesieve_domains'] = array();
// Supported methods of notify extension. Default: 'mailto'
$config['managesieve_notify_methods'] = array('mailto');

View File

@@ -0,0 +1,7 @@
// Enables separate management interface for vacation responses (out-of-office)
// 0 - no separate section (roundcube default),
// 1 - add Vacation section (new SME default),
// 2 - add Vacation section, but hide Filters section
$config['managesieve_vacation'] = 1;
?>

View File

@@ -0,0 +1,14 @@
{
$OUT = <<HERE;
<?php
/*
HERE
$OUT .=
Text::Template::_load_text("/etc/e-smith/templates-default/template-begin");
$OUT .= <<HERE;
*/
HERE
}

View File

@@ -0,0 +1,5 @@
// Full URL to the Nextcloud server
// e.g. https://example.com/nextcloud if in sub-path
// or https://cloud.example.com if in root
$config["nextcloud_attachment_server"] = "https://{$roundcube{'nextcloudURI'}||$nextcloud{'Virtualhost'}||$DomainName."/nextcloud"}";

View File

@@ -0,0 +1,11 @@
// Username resolving strategy from internal Roundcube
// username which usually is the email address e.g. user@example.com or IMAP User
// Placeholders are replaced as following
// %s => verbatim RC username as reported by rcmail->get_user_name(). Depending on config loginuser@domain or login
// %i => username used to login to imap. usually equal to %s
// %e => user email
// %l, %u => email localpart (%u is for backward compatibility)
// %d => email domain
// %h => IMAP Host
$config["nextcloud_attachment_username"] = "%u";

View File

@@ -0,0 +1,4 @@
// Don't try the email password at all, because we know it won't work
// Defaults to false, i.e. try the password
$config["nextcloud_attachment_dont_try_mail_password"] = false;

View File

@@ -0,0 +1,12 @@
// Name for the sub-folder to upload to
// Defaults to "Mail Attachments"
// Can't be sub-folder of sub-folder link folder/sub
$config["nextcloud_attachment_folder"] = "{$roundcube{'nextcloudFolder'}||'Mail Attachments'}";
// Translate the folder name according to the users configured locale
// When activating this $config["nextcloud_attachment_folder"] has to be an array
// of locale => name, e.g.
// $config["nextcloud_attachment_folder"] = ["en_US" => "Mail Attachments", "de_DE" => "E-Mail Anhänge"]
// If locale doesn't exist, en_US or first will be used
// Defaults to false
$config["nextcloud_attachment_folder_translate_name"] = false;

View File

@@ -0,0 +1,5 @@
// Limit to show a warning at for large attachments.
// has to be smaller then $config['max_message_size']
// set to null to disable
$config["nextcloud_attachment_softlimit"] = "{$roundcube{'NCsoftlimit'}||$qmail{'MaxMessageSize'}||'25M'}";

View File

@@ -0,0 +1,6 @@
// Behavior if $config['max_message_size'] is hit.
// "prompt" to show dialog a la outlook or apple
// "upload" to automatically upload without asking a la google
// Defaults to "prompt"
$config["nextcloud_attachment_behavior"] = "{$roundcube{'nextcloudBehavior'}||'prompt'}";

View File

@@ -0,0 +1,57 @@
// List of users to exclude
// They won't be able to interact with the plugin at all
// No prompts, no automatic uploading, no settings.
// List by RC username or resolved username e.g. ["user@demo.com", "user"]
$config["nextcloud_attachment_exclude_users"] = [];
// Exclude users listed by uid (you need add the mapping to the address book) or email in any of the following
// address books. This allows you to configure a hidden LDAP address book containing the users
// to exclude.
//
// Hide an addressbook by setting
// $config['ldap_public'][*] = [
// ...
// 'hidden' => true,
// ...
// ];
// in the global config.
//
// Add the uid mapping via
// $config['ldap_public'][*] = [
// ...
// 'fieldmap' => [
// ...
// //internal => ldapattr
// 'uid' => 'uid',
// ...
// ],
// ...
// ]
// in the global config. Replace mapped attribute with appropriate value for your directory e.g. cn
// And replace "*" with the appropriate address book name
$config["nextcloud_attachment_exclude_users_in_addr_books"] = [];
// Exclude users that have a mapped value in an address book
// format [ [ 'address_book', 'mapped_attribute', 'matched_value' ], ... ]
//
// Resulting in every user listed in the address book "address_book"
// to be excluded if they have a "mapped_attribute", matching "matched_value".
//
// E.g. ['public', 'memberOf', 'cn=no_cloud,ou=groups,dc=example,dc=com']
//
// multiple attributes and multiple address books are supported
$config["nextcloud_attachment_exclude_users_with_addr_book_value"] = [];
// Exclude user that that are in a given group in an address book
// format [ [ 'address_book', 'group' ], ... ]
//
// Resulting in every user listed in the address book "address_book" that is
// is in group "group" to be excluded. You have to correctly configure the group
// mapping for the LDAP entry
//
// E.g. ['public', 'nocloud']
//
// multiple groups and multiple address books are supported
$config["nextcloud_attachment_exclude_users_in_addr_book_group"] = [];

View File

@@ -0,0 +1,4 @@
// Enable/Disable certificate validation for https on WebDAV and API requests
// Defaults to true (enabled)
$config["nextcloud_attachment_verify_https"] = {$roundcube{'nextcloudVerifyCerts'}||'true'};

View File

@@ -0,0 +1,14 @@
{
$OUT = <<HERE;
<?php
/*
HERE
$OUT .=
Text::Template::_load_text("/etc/e-smith/templates-default/template-begin");
$OUT .= <<HERE;
*/
HERE
}