[Dovecot] Check if quarantine_notify.py holds a lock

[SOGo] Change default theme
master
andryyy 2021-01-28 15:48:59 +01:00
parent 049b5ceb31
commit 410cb558ee
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
6 changed files with 288 additions and 165 deletions

View File

@ -199,6 +199,8 @@ if [[ $(stat -c %U /var/vmail_index) != "vmail" ]] ; then chown -R vmail:vmail /
# Cleanup random user maildirs # Cleanup random user maildirs
rm -rf /var/vmail/mailcow.local/* rm -rf /var/vmail/mailcow.local/*
# Cleanup PIDs
[[ -f /tmp/quarantine_notify.pid ]] && rm /tmp/quarantine_notify.pid
# create sni configuration # create sni configuration
echo "" > /etc/dovecot/sni.conf echo "" > /etc/dovecot/sni.conf

View File

@ -2,6 +2,7 @@
import smtplib import smtplib
import os import os
import sys
import mysql.connector import mysql.connector
from email.mime.multipart import MIMEMultipart from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText from email.mime.text import MIMEText
@ -15,137 +16,154 @@ import time
import html2text import html2text
import socket import socket
while True: pid = str(os.getpid())
try: pidfile = "/tmp/quarantine_notify.pid"
r = redis.StrictRedis(host='redis', decode_responses=True, port=6379, db=0)
r.ping()
except Exception as ex:
print('%s - trying again...' % (ex))
time.sleep(3)
else:
break
time_now = int(time.time()) if os.path.isfile(pidfile):
mailcow_hostname = '__MAILCOW_HOSTNAME__' print("%s already exists, exiting" % (pidfile))
sys.exit()
max_score = float(r.get('Q_MAX_SCORE') or "9999.0") pid = str(os.getpid())
if max_score == "": f = open(pidfile, 'w')
max_score = 9999.0 f.write(pid)
f.close()
try:
def query_mysql(query, headers = True, update = False):
while True: while True:
try: try:
cnx = mysql.connector.connect(unix_socket = '/var/run/mysqld/mysqld.sock', user='__DBUSER__', passwd='__DBPASS__', database='__DBNAME__', charset="utf8") r = redis.StrictRedis(host='redis', decode_responses=True, port=6379, db=0)
r.ping()
except Exception as ex: except Exception as ex:
print('%s - trying again...' % (ex)) print('%s - trying again...' % (ex))
time.sleep(3) time.sleep(3)
else: else:
break break
cur = cnx.cursor()
cur.execute(query)
if not update:
result = []
columns = tuple( [d[0] for d in cur.description] )
for row in cur:
if headers:
result.append(dict(list(zip(columns, row))))
else:
result.append(row)
cur.close()
cnx.close()
return result
else:
cnx.commit()
cur.close()
cnx.close()
def notify_rcpt(rcpt, msg_count, quarantine_acl, category): time_now = int(time.time())
if category == "add_header": category = "add header" mailcow_hostname = '__MAILCOW_HOSTNAME__'
meta_query = query_mysql('SELECT SHA2(CONCAT(id, qid), 256) AS qhash, id, subject, score, sender, created, action FROM quarantine WHERE notified = 0 AND rcpt = "%s" AND score < %f AND (action = "%s" OR "all" = "%s")' % (rcpt, max_score, category, category))
print("%s: %d of %d messages qualify for notification" % (rcpt, len(meta_query), msg_count)) max_score = float(r.get('Q_MAX_SCORE') or "9999.0")
if len(meta_query) == 0: if max_score == "":
return max_score = 9999.0
msg_count = len(meta_query)
if r.get('Q_HTML'): def query_mysql(query, headers = True, update = False):
try: while True:
template = Template(r.get('Q_HTML')) try:
except: cnx = mysql.connector.connect(unix_socket = '/var/run/mysqld/mysqld.sock', user='__DBUSER__', passwd='__DBPASS__', database='__DBNAME__', charset="utf8")
print("Error: Cannot parse quarantine template, falling back to default template.") except Exception as ex:
print('%s - trying again...' % (ex))
time.sleep(3)
else:
break
cur = cnx.cursor()
cur.execute(query)
if not update:
result = []
columns = tuple( [d[0] for d in cur.description] )
for row in cur:
if headers:
result.append(dict(list(zip(columns, row))))
else:
result.append(row)
cur.close()
cnx.close()
return result
else:
cnx.commit()
cur.close()
cnx.close()
def notify_rcpt(rcpt, msg_count, quarantine_acl, category):
if category == "add_header": category = "add header"
meta_query = query_mysql('SELECT SHA2(CONCAT(id, qid), 256) AS qhash, id, subject, score, sender, created, action FROM quarantine WHERE notified = 0 AND rcpt = "%s" AND score < %f AND (action = "%s" OR "all" = "%s")' % (rcpt, max_score, category, category))
print("%s: %d of %d messages qualify for notification" % (rcpt, len(meta_query), msg_count))
if len(meta_query) == 0:
return
msg_count = len(meta_query)
if r.get('Q_HTML'):
try:
template = Template(r.get('Q_HTML'))
except:
print("Error: Cannot parse quarantine template, falling back to default template.")
with open('/templates/quarantine.tpl') as file_:
template = Template(file_.read())
else:
with open('/templates/quarantine.tpl') as file_: with open('/templates/quarantine.tpl') as file_:
template = Template(file_.read()) template = Template(file_.read())
else: html = template.render(meta=meta_query, username=rcpt, counter=msg_count, hostname=mailcow_hostname, quarantine_acl=quarantine_acl)
with open('/templates/quarantine.tpl') as file_: text = html2text.html2text(html)
template = Template(file_.read()) count = 0
html = template.render(meta=meta_query, username=rcpt, counter=msg_count, hostname=mailcow_hostname, quarantine_acl=quarantine_acl) while count < 15:
text = html2text.html2text(html) count += 1
count = 0 try:
while count < 15: server = smtplib.SMTP('postfix', 590, 'quarantine')
count += 1 server.ehlo()
msg = MIMEMultipart('alternative')
msg_from = r.get('Q_SENDER') or "quarantine@localhost"
# Remove non-ascii chars from field
msg['From'] = ''.join([i if ord(i) < 128 else '' for i in msg_from])
msg['Subject'] = r.get('Q_SUBJ') or "Spam Quarantine Notification"
msg['Date'] = formatdate(localtime = True)
text_part = MIMEText(text, 'plain', 'utf-8')
html_part = MIMEText(html, 'html', 'utf-8')
msg.attach(text_part)
msg.attach(html_part)
msg['To'] = str(rcpt)
bcc = r.get('Q_BCC') or ""
redirect = r.get('Q_REDIRECT') or ""
text = msg.as_string()
if bcc == '':
if redirect == '':
server.sendmail(msg['From'], str(rcpt), text)
else:
server.sendmail(msg['From'], str(redirect), text)
else:
if redirect == '':
server.sendmail(msg['From'], [str(rcpt)] + [str(bcc)], text)
else:
server.sendmail(msg['From'], [str(redirect)] + [str(bcc)], text)
server.quit()
for res in meta_query:
query_mysql('UPDATE quarantine SET notified = 1 WHERE id = "%d"' % (res['id']), update = True)
r.hset('Q_LAST_NOTIFIED', record['rcpt'], time_now)
break
except Exception as ex:
server.quit()
print('%s' % (ex))
time.sleep(3)
records = query_mysql('SELECT IFNULL(user_acl.quarantine, 0) AS quarantine_acl, count(id) AS counter, rcpt FROM quarantine LEFT OUTER JOIN user_acl ON user_acl.username = rcpt WHERE notified = 0 AND score < %f AND rcpt in (SELECT username FROM mailbox) GROUP BY rcpt' % (max_score))
for record in records:
attrs = ''
attrs_json = ''
time_trans = {
"hourly": 3600,
"daily": 86400,
"weekly": 604800
}
try: try:
server = smtplib.SMTP('postfix', 590, 'quarantine') last_notification = int(r.hget('Q_LAST_NOTIFIED', record['rcpt']))
server.ehlo() if last_notification > time_now:
msg = MIMEMultipart('alternative') print('Last notification is > time now, assuming never')
msg_from = r.get('Q_SENDER') or "quarantine@localhost" last_notification = 0
# Remove non-ascii chars from field
msg['From'] = ''.join([i if ord(i) < 128 else '' for i in msg_from])
msg['Subject'] = r.get('Q_SUBJ') or "Spam Quarantine Notification"
msg['Date'] = formatdate(localtime = True)
text_part = MIMEText(text, 'plain', 'utf-8')
html_part = MIMEText(html, 'html', 'utf-8')
msg.attach(text_part)
msg.attach(html_part)
msg['To'] = str(rcpt)
bcc = r.get('Q_BCC') or ""
redirect = r.get('Q_REDIRECT') or ""
text = msg.as_string()
if bcc == '':
if redirect == '':
server.sendmail(msg['From'], str(rcpt), text)
else:
server.sendmail(msg['From'], str(redirect), text)
else:
if redirect == '':
server.sendmail(msg['From'], [str(rcpt)] + [str(bcc)], text)
else:
server.sendmail(msg['From'], [str(redirect)] + [str(bcc)], text)
server.quit()
for res in meta_query:
query_mysql('UPDATE quarantine SET notified = 1 WHERE id = "%d"' % (res['id']), update = True)
r.hset('Q_LAST_NOTIFIED', record['rcpt'], time_now)
break
except Exception as ex: except Exception as ex:
server.quit() print('Could not determine last notification for %s, assuming never' % (record['rcpt']))
print('%s' % (ex))
time.sleep(3)
records = query_mysql('SELECT IFNULL(user_acl.quarantine, 0) AS quarantine_acl, count(id) AS counter, rcpt FROM quarantine LEFT OUTER JOIN user_acl ON user_acl.username = rcpt WHERE notified = 0 AND score < %f AND rcpt in (SELECT username FROM mailbox) GROUP BY rcpt' % (max_score))
for record in records:
attrs = ''
attrs_json = ''
time_trans = {
"hourly": 3600,
"daily": 86400,
"weekly": 604800
}
try:
last_notification = int(r.hget('Q_LAST_NOTIFIED', record['rcpt']))
if last_notification > time_now:
print('Last notification is > time now, assuming never')
last_notification = 0 last_notification = 0
except Exception as ex: attrs_json = query_mysql('SELECT attributes FROM mailbox WHERE username = "%s"' % (record['rcpt']))
print('Could not determine last notification for %s, assuming never' % (record['rcpt'])) attrs = attrs_json[0]['attributes']
last_notification = 0 if isinstance(attrs, str):
attrs_json = query_mysql('SELECT attributes FROM mailbox WHERE username = "%s"' % (record['rcpt'])) # if attr is str then just load it
attrs = attrs_json[0]['attributes'] attrs = json.loads(attrs)
if isinstance(attrs, str): else:
# if attr is str then just load it # if it's bytes then decode and load it
attrs = json.loads(attrs) attrs = json.loads(attrs.decode('utf-8'))
else: if attrs['quarantine_notification'] not in ('hourly', 'daily', 'weekly'):
# if it's bytes then decode and load it continue
attrs = json.loads(attrs.decode('utf-8')) if last_notification == 0 or (last_notification + time_trans[attrs['quarantine_notification']]) < time_now:
if attrs['quarantine_notification'] not in ('hourly', 'daily', 'weekly'): print("Notifying %s: Considering %d new items in quarantine (policy: %s)" % (record['rcpt'], record['counter'], attrs['quarantine_notification']))
continue notify_rcpt(record['rcpt'], record['counter'], record['quarantine_acl'], attrs['quarantine_category'])
if last_notification == 0 or (last_notification + time_trans[attrs['quarantine_notification']]) < time_now:
print("Notifying %s: Considering %d new items in quarantine (policy: %s)" % (record['rcpt'], record['counter'], attrs['quarantine_notification'])) finally:
notify_rcpt(record['rcpt'], record['counter'], record['quarantine_acl'], attrs['quarantine_category']) os.unlink(pidfile)

View File

@ -0,0 +1,86 @@
/* -*- Mode: javascript; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
(function() {
'use strict';
angular.module('SOGo.Common')
.config(configure)
/**
* @ngInject
*/
configure.$inject = ['$mdThemingProvider'];
function configure($mdThemingProvider) {
/**
* The SOGo palettes are defined in js/Common/Common.app.js:
*
* - sogo-green
* - sogo-blue
* - sogo-grey
*
* The Material palettes are also available:
*
* - red
* - pink
* - purple
* - deep-purple
* - indigo
* - blue
* - light-blue
* - cyan
* - teal
* - green
* - light-green
* - lime
* - yellow
* - amber
* - orange
* - deep-orange
* - brown
* - grey
* - blue-grey
*
* See https://material.angularjs.org/latest/Theming/01_introduction
* and https://material.io/archive/guidelines/style/color.html#color-color-palette
*
* You can also define your own palettes. See js/Common/Common.app.js.
*/
// Create new background palette from grey palette
var greyMap = $mdThemingProvider.extendPalette('grey', {
// background color of sidebar selected item,
// background color of right panel,
// background color of menus (autocomplete and contextual menus)
'200': 'F5F5F5',
// background color of sidebar
'300': 'F3F3F3',
// background color of the busy periods of the attendees editor
'1000': '4C566A'
});
var greenCow = $mdThemingProvider.extendPalette('green', {
'600': 'f3f3f3'
});
$mdThemingProvider.definePalette('frost-grey', greyMap);
$mdThemingProvider.definePalette('green-cow', greenCow);
// Apply new palettes to the default theme, remap some of the hues
$mdThemingProvider.theme('default')
.primaryPalette('green-cow', {
'default': '400', // background color of top toolbars
'hue-1': '400',
'hue-2': '600', // background color of sidebar toolbar
'hue-3': 'A700'
})
.accentPalette('green', {
'default': '600', // background color of fab buttons
'hue-1': '300', // background color of center list toolbar
'hue-2': '300',
'hue-3': 'A700'
})
.backgroundPalette('frost-grey');
$mdThemingProvider.generateThemesOnDemand(false);
}
})();

View File

@ -1,44 +1,55 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
<!ENTITY st0 "fill:#50BD37;"> <svg
]> xmlns:dc="http://purl.org/dc/elements/1.1/"
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" xmlns:cc="http://creativecommons.org/ns#"
width="640px" height="350px" viewBox="78.712 58.488 640 350" style="enable-background:new 78.712 58.488 640 350;" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xml:space="preserve"> xmlns:svg="http://www.w3.org/2000/svg"
<path style="&st0;" d="M648.541,145.679c-9.947,0-17.009-7.278-17.009-17.048c0-9.777,7.062-17.057,17.009-17.057 xmlns="http://www.w3.org/2000/svg"
c10.024,0,17.086,7.279,17.086,17.057C665.627,138.401,658.565,145.679,648.541,145.679z M648.511,94.893 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
c-19.693,0-33.679,14.4-33.679,33.738c0,19.33,13.985,33.729,33.679,33.729c19.822,0,33.808-14.4,33.808-33.729 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
C682.318,109.293,668.333,94.893,648.511,94.893z M648.482,179.843c-29.889,0-51.123-21.868-51.123-51.212 version="1.1"
c0-29.353,21.234-51.209,51.123-51.209c30.082,0,51.307,21.856,51.307,51.209C699.789,157.975,678.564,179.843,648.482,179.843z id="Layer_1"
M648.442,58.488c-40.929,0-69.995,29.946-69.995,70.143c0,40.189,29.066,70.125,69.995,70.125c41.194,0,70.27-29.937,70.27-70.125 x="0px"
C718.712,88.434,689.637,58.488,648.442,58.488z M158.166,183.902l-21.018-5.008c-19.131-4.396-28.849-9.413-28.849-23.21 y="0px"
c0-15.684,15.99-21.965,30.419-21.965c14.667,0,25.382,7.329,31.693,18.737c0.02,0.048,0.051,0.097,0.09,0.157 width="640px"
c0.127,0.247,0.276,0.484,0.403,0.731l0.03-0.02c1.985,3.002,5.323,5.008,8.919,5.008c6.122,0,10.558-4.425,10.558-10.547 height="350px"
c0-2.341-0.504-4.82-1.601-6.688c-10.764-18.302-28.513-26.192-48.838-26.192c-27.594,0-54.262,13.797-54.262,44.218 viewBox="78.712 58.488 640 350"
c0,27.921,27.605,36.079,37.64,38.578l20.069,4.71c15.368,3.763,27.912,8.791,27.912,23.517c0,16.938-17.561,23.943-34.499,23.943 style="enable-background:new 78.712 58.488 640 350;"
c-17.245,0-30.015-9.37-38.814-22.37h-0.01c-1.956-3-4.988-4.328-8.702-4.328c-5.984,0-10.805,5.185-10.587,11.162 xml:space="preserve"
c0.098,2.438,0.909,4.637,2.153,6.405c13.787,20.633,33.728,28.41,55.96,28.41c28.543,0,57.085-13.143,57.085-45.132 sodipodi:docname="sogo-full.svg"
C193.918,203.325,178.551,188.613,158.166,183.902z M298.479,250.312c-33.866,0-55.199-25.403-55.199-58.331 inkscape:version="0.92.4 (5da689c313, 2019-01-14)"><metadata
c0-32.939,21.333-58.343,55.199-58.343c34.192,0,55.516,25.403,55.516,58.343C353.996,224.91,332.672,250.312,298.479,250.312z id="metadata9"><rdf:RDF><cc:Work
M298.479,114.823c-45.471,0-77.777,32.93-77.777,77.158c0,44.217,32.306,77.146,77.777,77.146 rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
c45.786,0,78.093-32.929,78.093-77.146C376.572,147.753,344.266,114.823,298.479,114.823z M518.715,234.312 rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
c-0.771,0.74-1.549,1.472-2.399,2.175c-1.106,1.014-2.391,2.112-3.854,3.208c-8.829,6.391-19.979,10.094-33.017,10.094 id="defs7" /><sodipodi:namedview
c-33.876,0-55.198-25.402-55.198-58.332c0-32.939,21.322-58.342,55.198-58.342c34.183,0,55.506,25.403,55.506,58.342 pagecolor="#ffffff"
C534.951,208.653,529.135,223.774,518.715,234.312z M468.097,317.938c2.528,0,5.146-0.168,7.863-0.504 bordercolor="#666666"
c5.018-0.631,9.588-0.909,13.729-0.909c19.24,0.109,29.036,5.7,34.943,12.158c5.895,6.499,8.168,15.311,8.158,22.796 borderopacity="1"
c0.01,3.586-0.555,6.795-1.177,8.721c-2.944,8.93-8.888,15.002-17.996,19.576c-9.035,4.484-21.095,6.777-33.707,6.757 objecttolerance="10"
c-4.514,0-9.105-0.288-13.639-0.831c-8.573-0.987-19.911-4.671-28.13-11.093c-4.138-3.199-6.458-6.991-8.858-11.485 gridtolerance="10"
c-2.379-4.514-2.783-9.748-2.783-16.442v-0.742c0-12.346,4.84-20.544,11.051-26.5c3.07-2.904,5.69-5.064,7.99-6.438 guidetolerance="10"
c0.366-0.218,0.438-0.416,0.755-0.593C452.39,316.014,459.684,317.968,468.097,317.938z M479.445,114.301 inkscape:pageopacity="0"
c-45.471,0-77.786,32.929-77.786,77.157c0,29.887,14.765,54.598,38.378,67.489c-0.314,0.314-0.621,0.641-0.916,0.966 inkscape:pageshadow="2"
c-6.104,6.687-9.226,15.25-9.236,23.913c-0.008,3.821,0.624,7.741,1.977,11.494c-3.062,1.956-6.717,4.634-10.46,8.147 inkscape:window-width="2273"
c-9.026,8.408-18.734,22.541-19.021,42.097c-0.01,0.454-0.01,0.829-0.01,1.118c-0.01,10.071,2.379,19.157,6.459,26.774 inkscape:window-height="1417"
c6.133,11.466,15.683,19.445,25.539,24.77c9.917,5.334,20.257,8.166,29.273,9.274c5.373,0.643,10.826,0.988,16.268,0.988 id="namedview5"
c15.151-0.02,30.261-2.578,43.409-9.019c13.085-6.34,24.333-17.253,29.192-32.562c1.443-4.553,2.212-9.719,2.231-15.428 showgrid="false"
c-0.02-11.595-3.349-25.759-13.767-37.452c-10.421-11.734-27.654-19.566-51.288-19.459c-5.138,0-10.606,0.356-16.426,1.078 inkscape:zoom="0.571875"
c-1.877,0.227-3.596,0.334-5.166,0.334c-7.239-0.048-10.872-2.053-13.036-4.098c-2.133-2.084-3.2-4.839-3.229-8.058 inkscape:cx="320"
c-0.01-3.28,1.284-6.727,3.467-9.078c2.231-2.332,5.008-3.91,9.846-3.97c0.436,0,0.9,0.01,1.374,0.05 inkscape:cy="175"
c3.101,0.216,6.112,0.325,9.037,0.325c24.188,0.047,42.38-7.448,54.756-17.759c12.415-10.312,18.971-22.854,22.071-32.76l-0.04-0.01 inkscape:window-x="-8"
c3.37-8.899,5.197-18.715,5.197-29.166C557.539,147.229,525.234,114.301,479.445,114.301z"/> inkscape:window-y="-8"
</svg> inkscape:window-maximized="1"
inkscape:current-layer="Layer_1" />
<path
inkscape:connector-curvature="0"
style="fill:none;stroke-width:14.11475372"
d="m 222.34042,60.750293 h 338.7541 V 399.50439 h -338.7541 z"
id="path2" /><path
inkscape:connector-curvature="0"
d="m 391.71747,88.979803 c -77.91344,0 -141.14754,63.234097 -141.14754,141.147537 0,77.91344 63.2341,141.14754 141.14754,141.14754 h 70.57377 v -28.22951 h -70.57377 c -61.25803,0 -112.91803,-51.66 -112.91803,-112.91803 0,-61.25803 51.66,-112.91803 112.91803,-112.91803 61.25803,0 112.91803,51.66 112.91803,112.91803 v 20.1841 c 0,11.15065 -10.02147,22.16016 -21.17213,22.16016 -11.15065,0 -21.17213,-11.00951 -21.17213,-22.16016 v -20.1841 c 0,-38.95672 -31.61705,-70.57377 -70.57377,-70.57377 -38.95672,0 -70.57377,31.61705 -70.57377,70.57377 0,38.95672 31.61705,70.57377 70.57377,70.57377 19.47836,0 37.26295,-7.90426 49.96623,-20.74869 9.17459,12.56213 24.98311,20.74869 41.77967,20.74869 27.80607,0 49.40164,-22.58361 49.40164,-50.38967 v -20.1841 c 0,-77.91344 -63.2341,-141.147537 -141.14754,-141.147537 z m 0,183.491797 c -23.43049,0 -42.34426,-18.91377 -42.34426,-42.34426 0,-23.43049 18.91377,-42.34426 42.34426,-42.34426 23.43049,0 42.34426,18.91377 42.34426,42.34426 0,23.43049 -18.91377,42.34426 -42.34426,42.34426 z"
id="path4"
style="stroke-width:14.11475372" /></svg>

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -14,7 +14,12 @@
SOGoEnableEMailAlarms = YES; SOGoEnableEMailAlarms = YES;
SOGoFoldersSendEMailNotifications = YES; SOGoFoldersSendEMailNotifications = YES;
SOGoForwardEnabled = YES; SOGoForwardEnabled = YES;
SOGoUIAdditionalJSFiles = (js/custom-sogo.js);
SOGoUIAdditionalJSFiles = (
js/theme.js,
js/custom-sogo.js
);
SOGoEnablePublicAccess = YES; SOGoEnablePublicAccess = YES;
// Multi-domain setup // Multi-domain setup
@ -80,7 +85,7 @@
//LDAPDebugEnabled = YES; //LDAPDebugEnabled = YES;
//PGDebugEnabled = YES; //PGDebugEnabled = YES;
//MySQL4DebugEnabled = YES; //MySQL4DebugEnabled = YES;
//SOGoUIxDebugEnabled = YES; SOGoUIxDebugEnabled = YES;
//WODontZipResponse = YES; //WODontZipResponse = YES;
WOLogFile = "/dev/sogo_log"; WOLogFile = "/dev/sogo_log";
} }

View File

@ -160,7 +160,7 @@ services:
- phpfpm - phpfpm
sogo-mailcow: sogo-mailcow:
image: mailcow/sogo:1.94 image: mailcow/sogo:1.95
environment: environment:
- DBNAME=${DBNAME} - DBNAME=${DBNAME}
- DBUSER=${DBUSER} - DBUSER=${DBUSER}
@ -183,6 +183,7 @@ services:
- ./data/conf/sogo/:/etc/sogo/:z - ./data/conf/sogo/:/etc/sogo/:z
- ./data/web/inc/init_db.inc.php:/init_db.inc.php:Z - ./data/web/inc/init_db.inc.php:/init_db.inc.php:Z
- ./data/conf/sogo/custom-sogo.js:/usr/lib/GNUstep/SOGo/WebServerResources/js/custom-sogo.js:z - ./data/conf/sogo/custom-sogo.js:/usr/lib/GNUstep/SOGo/WebServerResources/js/custom-sogo.js:z
- ./data/conf/sogo/custom-theme.js:/usr/lib/GNUstep/SOGo/WebServerResources/js/theme.js:z
- mysql-socket-vol-1:/var/run/mysqld/:z - mysql-socket-vol-1:/var/run/mysqld/:z
- sogo-web-vol-1:/sogo_web:z - sogo-web-vol-1:/sogo_web:z
- sogo-userdata-backup-vol-1:/sogo_backup:Z - sogo-userdata-backup-vol-1:/sogo_backup:Z