diff -Nur smeserver-dovecot-1.6.0.old/createlinks smeserver-dovecot-1.6.0/createlinks --- smeserver-dovecot-1.6.0.old/createlinks 2020-12-06 23:25:22.439000000 -0500 +++ smeserver-dovecot-1.6.0/createlinks 2020-12-07 01:08:10.627000000 -0500 @@ -2,28 +2,25 @@ use esmith::Build::CreateLinks qw(:all); -service_link_enhanced("dovecot", "S65", "7"); -service_link_enhanced("dovecot", "K35", "6"); -service_link_enhanced("dovecot", "K35", "0"); -service_link_enhanced("dovecot", "K35", "1"); templates2events("/etc/dovecot/dovecot.conf", qw(email-update bootstrap-console-save ssl-update smeserver-dovecot-update ip-change)); templates2events("/etc/dovecot/master.users", qw(email-update bootstrap-console-save smeserver-dovecot-update)); templates2events("/etc/pam.d/dovecotadmin", qw(email-update bootstrap-console-save smeserver-dovecot-update)); -safe_touch("root/var/service/dovecot/down"); -safe_symlink("../daemontools" , 'root/etc/rc.d/init.d/supervise/dovecot'); -safe_symlink("/var/service/dovecot" , 'root/service/dovecot'); safe_symlink("sigusr2", "root/etc/e-smith/events/email-update/services2adjust/dovecot"); -# Create a symlink for /service/imap so pop3s still find the imapd.pem file -safe_symlink("/var/service/dovecot", "root/service/imap"); event_link("adjust-dovecot", "email-update", "02"); event_link("adjust-dovecot", "bootstrap-console-save", "02"); #smeserver-dovecot-update safe_symlink("restart", "root/etc/e-smith/events/smeserver-dovecot-update/services2adjust/dovecot"); +safe_symlink("restart", "root/etc/e-smith/events/smeserver-dovecot-update/services2adjust/rsyslog"); event_link("adjust-dovecot", "smeserver-dovecot-update", "02"); +event_link("systemd-reload", $event, "89"); +event_link("systemd-default", $event, "88"); +templates2events("/etc/rsyslog.conf",$event); +templates2events("/usr/lib/systemd/system/dovecot.service.d/50koozali.conf",($event, qw(bootstrap-console-save console-save post-install post-upgrade) )); + # in case the ip change safe_symlink("sigusr2", "root/etc/e-smith/events/ip-change/services2adjust/dovecot"); diff -Nur smeserver-dovecot-1.6.0.old/root/etc/e-smith/templates/etc/dovecot/dovecot.conf/20log smeserver-dovecot-1.6.0/root/etc/e-smith/templates/etc/dovecot/dovecot.conf/20log --- smeserver-dovecot-1.6.0.old/root/etc/e-smith/templates/etc/dovecot/dovecot.conf/20log 2013-02-26 12:57:10.000000000 -0500 +++ smeserver-dovecot-1.6.0/root/etc/e-smith/templates/etc/dovecot/dovecot.conf/20log 2020-12-07 01:02:18.003000000 -0500 @@ -1,3 +1,4 @@ -log_path = /dev/stderr -log_timestamp = "" +log_path = syslog +# we choose same as rsyslog for SME "%b %e %H:%M:%S " and not "%b %d %H:%M:%S " +log_timestamp = "%b %e %H:%M:%S " auth_verbose = yes diff -Nur smeserver-dovecot-1.6.0.old/root/etc/e-smith/templates/etc/dovecot/dovecot.conf/35ssl smeserver-dovecot-1.6.0/root/etc/e-smith/templates/etc/dovecot/dovecot.conf/35ssl --- smeserver-dovecot-1.6.0.old/root/etc/e-smith/templates/etc/dovecot/dovecot.conf/35ssl 2020-12-06 23:25:22.432000000 -0500 +++ smeserver-dovecot-1.6.0/root/etc/e-smith/templates/etc/dovecot/dovecot.conf/35ssl 2020-12-07 00:28:39.035000000 -0500 @@ -1,6 +1,6 @@ ssl = {$OUT .= ( (($imaps{'status'} || 'enabled') eq 'enabled') || (($pops{'status'} || 'enabled') eq 'enabled') ) ? 'yes':'no';} -ssl_cert = open_ro; +my $s = $c->get('SystemName')->value; +my $d = $c->get('DomainName')->value; + +my $pem = "/etc/dovecot/ssl/imapd.pem"; +# Now copy system pem file into jail used by ldap +copy("/home/e-smith/ssl.pem/$s.$d.pem", "$pem.$$") + or die "failed to copy SSL PEM: $!"; +chmod 0440, "$pem.$$"; +esmith::util::chownFile("root", "stunnel", "$pem.$$"); +rename("$pem.$$", "$pem") + or die "failed to rename $pem.$$ to $pem: $!"; + + diff -Nur smeserver-dovecot-1.6.0.old/root/var/service/dovecot/control/1 smeserver-dovecot-1.6.0/root/var/service/dovecot/control/1 --- smeserver-dovecot-1.6.0.old/root/var/service/dovecot/control/1 2016-02-05 18:43:48.000000000 -0500 +++ smeserver-dovecot-1.6.0/root/var/service/dovecot/control/1 1969-12-31 19:00:00.000000000 -0500 @@ -1,41 +0,0 @@ -#!/usr/bin/perl -w - -#---------------------------------------------------------------------- -# copyright (C) 2011 Firewall-Services -# daniel@firewall-services.com -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#---------------------------------------------------------------------- - - -use esmith::util; -use esmith::ConfigDB; -use File::Copy; - -my $c = esmith::ConfigDB->open_ro; -my $s = $c->get('SystemName')->value; -my $d = $c->get('DomainName')->value; - -my $pem = "./ssl/imapd.pem"; -# Now copy system pem file into jail used by ldap -copy("/home/e-smith/ssl.pem/$s.$d.pem", "$pem.$$") - or die "failed to copy SSL PEM: $!"; -chmod 0440, "$pem.$$"; -esmith::util::chownFile("root", "stunnel", "$pem.$$"); -rename("$pem.$$", "$pem") - or die "failed to rename $pem.$$ to $pem: $!"; - - diff -Nur smeserver-dovecot-1.6.0.old/root/var/service/dovecot/log/run smeserver-dovecot-1.6.0/root/var/service/dovecot/log/run --- smeserver-dovecot-1.6.0.old/root/var/service/dovecot/log/run 2013-02-26 12:57:10.000000000 -0500 +++ smeserver-dovecot-1.6.0/root/var/service/dovecot/log/run 1969-12-31 19:00:00.000000000 -0500 @@ -1,10 +0,0 @@ -#!/bin/sh - -NUM=$(/sbin/e-smith/db configuration getprop dovecot KeepLogFiles) - -exec \ - /usr/local/bin/setuidgid smelog \ - /usr/local/bin/multilog t s5000000 \ - n${NUM:-10} \ - /var/log/dovecot/ - diff -Nur smeserver-dovecot-1.6.0.old/root/var/service/dovecot/run smeserver-dovecot-1.6.0/root/var/service/dovecot/run --- smeserver-dovecot-1.6.0.old/root/var/service/dovecot/run 2013-02-26 12:57:10.000000000 -0500 +++ smeserver-dovecot-1.6.0/root/var/service/dovecot/run 1969-12-31 19:00:00.000000000 -0500 @@ -1,6 +0,0 @@ -#!/bin/sh - -exec 2>&1 -./control/1 -exec /usr/sbin/dovecot -F -