2 commits - bin/kolab_smtp_access_policy.py conf/kolab.conf share/templates

Jeroen van Meeuwen vanmeeuwen at kolabsys.com
Mon Nov 25 17:31:31 CET 2013


 bin/kolab_smtp_access_policy.py                  |   13 ++++++++++---
 conf/kolab.conf                                  |   10 ++++++++++
 share/templates/roundcubemail/config.inc.php.tpl |   19 ++++++++++++-------
 3 files changed, 32 insertions(+), 10 deletions(-)

New commits:
commit 98a10773fecb7db035158fdb3ec3690362eb4a16
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Mon Nov 25 17:30:11 2013 +0100

    Add an option to disable adding Sender: and X-Sender: headers

diff --git a/bin/kolab_smtp_access_policy.py b/bin/kolab_smtp_access_policy.py
index ed588c2..304ab85 100755
--- a/bin/kolab_smtp_access_policy.py
+++ b/bin/kolab_smtp_access_policy.py
@@ -1332,10 +1332,17 @@ def hold(message, policy_request=None):
 
 def permit(message, policy_request=None):
     log.info(_("Returning action PERMIT: %s") % (message))
+
     if hasattr(policy_request, 'sasl_username'):
-        print "action=PREPEND Sender: %s\naction=PERMIT\n\n" % (policy_request.sasl_username)
-    else:
-        print "action=PERMIT\n\n"
+        sender = conf.get('kolab_smtp_access_policy', 'sender_header')
+        if utils.true_or_false(sender):
+            print "action=PREPEND Sender: %s" % (policy_request.sasl_username)
+
+        xsender = conf.get('kolab_smtp_access_policy', 'xsender_header')
+        if utils.true_or_false(xsender):
+            print "action=PREPEND X-Sender: %s" % (policy_request.sasl_username)
+
+    print "action=PERMIT\n\n"
     sys.exit(0)
 
 def reject(message, policy_request=None):
diff --git a/conf/kolab.conf b/conf/kolab.conf
index 9764f2a..0abe802 100644
--- a/conf/kolab.conf
+++ b/conf/kolab.conf
@@ -268,8 +268,18 @@ auth_attributes = mail, alias, uid
 [kolab_smtp_access_policy]
 cache_uri = mysql://user:pass@localhost/database
 cache_retention = 86400
+
+; To allow users to also send using email addresses in domain name spaces not
+; in their own parent and/or alias domains, add 'mailalternateaddress' to this
+; list.
 address_search_attrs = mail, alias
 
+; Prepend the Sender: header?
+sender_header = True
+
+; Prepend the X-Sender: header?
+xsender_header = True
+
 ; Allow hosts in these networks to submit messages with empty envelope senders,
 ; such as web-clients responding to MDN requests.
 empty_sender_hosts = 3.2.1.0/24, 6.6.6.0/24


commit 16df2c27cf3fc7218621648c20febaa32f26c3ac
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Mon Nov 25 17:29:10 2013 +0100

    Turn off debugging in production

diff --git a/share/templates/roundcubemail/config.inc.php.tpl b/share/templates/roundcubemail/config.inc.php.tpl
index df759e6..74b75ff 100644
--- a/share/templates/roundcubemail/config.inc.php.tpl
+++ b/share/templates/roundcubemail/config.inc.php.tpl
@@ -115,14 +115,14 @@
     \$config['log_date_format'] = 'd-M-Y H:i:s,u O';
     \$config['syslog_id'] = 'roundcube';
     \$config['syslog_facility'] = LOG_USER;
-    \$config['smtp_log'] = true;
+    \$config['smtp_log'] = false;
     \$config['log_logins'] = true;
-    \$config['log_session'] = true;
-    \$config['sql_debug'] = true;
-    \$config['memcache_debug'] = true;
-    \$config['imap_debug'] = true;
-    \$config['ldap_debug'] = true;
-    \$config['smtp_debug'] = true;
+    \$config['log_session'] = false;
+    \$config['sql_debug'] = false;
+    \$config['memcache_debug'] = false;
+    \$config['imap_debug'] = false;
+    \$config['ldap_debug'] = false;
+    \$config['smtp_debug'] = false;
 
     \$config['skin'] = 'larry';
     \$config['skin_include_php'] = false;
@@ -206,4 +206,9 @@
 
     \$config['htmleditor'] = 0;
 
+    \$config['kolab_http_request'] = Array(
+            'ssl_verify_host' => false,
+            'ssl_verify_peer' => false,
+        );
+
 ?>




More information about the commits mailing list