1 |
diff -Nur smeserver-dovecot-1.6.0.old/createlinks smeserver-dovecot-1.6.0/createlinks |
2 |
--- smeserver-dovecot-1.6.0.old/createlinks 2020-12-06 23:25:22.439000000 -0500 |
3 |
+++ smeserver-dovecot-1.6.0/createlinks 2020-12-07 01:08:10.627000000 -0500 |
4 |
@@ -2,28 +2,25 @@ |
5 |
|
6 |
use esmith::Build::CreateLinks qw(:all); |
7 |
|
8 |
-service_link_enhanced("dovecot", "S65", "7"); |
9 |
-service_link_enhanced("dovecot", "K35", "6"); |
10 |
-service_link_enhanced("dovecot", "K35", "0"); |
11 |
-service_link_enhanced("dovecot", "K35", "1"); |
12 |
|
13 |
templates2events("/etc/dovecot/dovecot.conf", qw(email-update bootstrap-console-save ssl-update smeserver-dovecot-update ip-change)); |
14 |
templates2events("/etc/dovecot/master.users", qw(email-update bootstrap-console-save smeserver-dovecot-update)); |
15 |
templates2events("/etc/pam.d/dovecotadmin", qw(email-update bootstrap-console-save smeserver-dovecot-update)); |
16 |
|
17 |
-safe_touch("root/var/service/dovecot/down"); |
18 |
-safe_symlink("../daemontools" , 'root/etc/rc.d/init.d/supervise/dovecot'); |
19 |
-safe_symlink("/var/service/dovecot" , 'root/service/dovecot'); |
20 |
safe_symlink("sigusr2", "root/etc/e-smith/events/email-update/services2adjust/dovecot"); |
21 |
-# Create a symlink for /service/imap so pop3s still find the imapd.pem file |
22 |
-safe_symlink("/var/service/dovecot", "root/service/imap"); |
23 |
|
24 |
event_link("adjust-dovecot", "email-update", "02"); |
25 |
event_link("adjust-dovecot", "bootstrap-console-save", "02"); |
26 |
|
27 |
#smeserver-dovecot-update |
28 |
safe_symlink("restart", "root/etc/e-smith/events/smeserver-dovecot-update/services2adjust/dovecot"); |
29 |
+safe_symlink("restart", "root/etc/e-smith/events/smeserver-dovecot-update/services2adjust/rsyslog"); |
30 |
event_link("adjust-dovecot", "smeserver-dovecot-update", "02"); |
31 |
+event_link("systemd-reload", "smeserver-dovecot-update", "89"); |
32 |
+event_link("systemd-default", "smeserver-dovecot-update", "88"); |
33 |
+templates2events("/etc/rsyslog.conf","smeserver-dovecot-update"); |
34 |
+templates2events("/usr/lib/systemd/system/dovecot.service.d/50koozali.conf", qw(bootstrap-console-save console-save post-install post-upgrade smeserver-dovecot-update )); |
35 |
+ |
36 |
|
37 |
# in case the ip change |
38 |
safe_symlink("sigusr2", "root/etc/e-smith/events/ip-change/services2adjust/dovecot"); |
39 |
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 |
40 |
--- smeserver-dovecot-1.6.0.old/root/etc/e-smith/templates/etc/dovecot/dovecot.conf/20log 2013-02-26 12:57:10.000000000 -0500 |
41 |
+++ smeserver-dovecot-1.6.0/root/etc/e-smith/templates/etc/dovecot/dovecot.conf/20log 2020-12-07 01:02:18.003000000 -0500 |
42 |
@@ -1,3 +1,4 @@ |
43 |
-log_path = /dev/stderr |
44 |
-log_timestamp = "" |
45 |
+log_path = syslog |
46 |
+# we choose same as rsyslog for SME "%b %e %H:%M:%S " and not "%b %d %H:%M:%S " |
47 |
+log_timestamp = "%b %e %H:%M:%S " |
48 |
auth_verbose = yes |
49 |
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 |
50 |
--- smeserver-dovecot-1.6.0.old/root/etc/e-smith/templates/etc/dovecot/dovecot.conf/35ssl 2020-12-06 23:25:22.432000000 -0500 |
51 |
+++ smeserver-dovecot-1.6.0/root/etc/e-smith/templates/etc/dovecot/dovecot.conf/35ssl 2020-12-07 00:28:39.035000000 -0500 |
52 |
@@ -1,6 +1,6 @@ |
53 |
ssl = {$OUT .= ( (($imaps{'status'} || 'enabled') eq 'enabled') || (($pops{'status'} || 'enabled') eq 'enabled') ) ? 'yes':'no';} |
54 |
-ssl_cert = </var/service/dovecot/ssl/imapd.pem |
55 |
-ssl_key = </var/service/dovecot/ssl/imapd.pem |
56 |
+ssl_cert = </etc/dovecot/ssl/imapd.pem |
57 |
+ssl_key = </etc/dovecot/ssl/imapd.pem |
58 |
{ |
59 |
|
60 |
my $proto = ''; |
61 |
diff -Nur smeserver-dovecot-1.6.0.old/root/etc/e-smith/templates/etc/rsyslog.conf/32dovecot smeserver-dovecot-1.6.0/root/etc/e-smith/templates/etc/rsyslog.conf/32dovecot |
62 |
--- smeserver-dovecot-1.6.0.old/root/etc/e-smith/templates/etc/rsyslog.conf/32dovecot 1969-12-31 19:00:00.000000000 -0500 |
63 |
+++ smeserver-dovecot-1.6.0/root/etc/e-smith/templates/etc/rsyslog.conf/32dovecot 2020-12-07 01:05:21.279000000 -0500 |
64 |
@@ -0,0 +1,6 @@ |
65 |
+ |
66 |
+#dovecot |
67 |
+:programname, isequal, "dovecot" /var/log/dovecot/dovecot.log |
68 |
+:programname, isequal, "dovecot" stop |
69 |
+ |
70 |
+ |
71 |
diff -Nur smeserver-dovecot-1.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/dovecot.service.d/50koozali.conf/40service smeserver-dovecot-1.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/dovecot.service.d/50koozali.conf/40service |
72 |
--- smeserver-dovecot-1.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/dovecot.service.d/50koozali.conf/40service 1969-12-31 19:00:00.000000000 -0500 |
73 |
+++ smeserver-dovecot-1.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/dovecot.service.d/50koozali.conf/40service 2020-12-03 23:24:00.397227278 -0500 |
74 |
@@ -0,0 +1,9 @@ |
75 |
+[Service] |
76 |
+#first we reset the ExecStartPre |
77 |
+ExecStartPre= |
78 |
+#our needs |
79 |
+ExecStartPre=-/sbin/e-smith/service-status dovecot |
80 |
+ExecStartPre=-/sbin/e-smith/expand-template /etc/dovecot/dovecot.conf |
81 |
+ExecStartPre=-/sbin/e-smith/expand-template /etc/dovecot/master.users |
82 |
+ExecStartPre=-/sbin/e-smith/systemd/dovecot-control |
83 |
+ExecStartPre=-/usr/sbin/portrelease dovecot |
84 |
diff -Nur smeserver-dovecot-1.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/dovecot.service.d/50koozali.conf/80install smeserver-dovecot-1.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/dovecot.service.d/50koozali.conf/80install |
85 |
--- smeserver-dovecot-1.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/dovecot.service.d/50koozali.conf/80install 1969-12-31 19:00:00.000000000 -0500 |
86 |
+++ smeserver-dovecot-1.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/dovecot.service.d/50koozali.conf/80install 2020-12-03 23:18:07.193615380 -0500 |
87 |
@@ -0,0 +1,2 @@ |
88 |
+[Install] |
89 |
+WantedBy=sme-server.target |
90 |
diff -Nur smeserver-dovecot-1.6.0.old/root/etc/logrotate.d/dovecot smeserver-dovecot-1.6.0/root/etc/logrotate.d/dovecot |
91 |
--- smeserver-dovecot-1.6.0.old/root/etc/logrotate.d/dovecot 1969-12-31 19:00:00.000000000 -0500 |
92 |
+++ smeserver-dovecot-1.6.0/root/etc/logrotate.d/dovecot 2020-12-07 01:03:16.023000000 -0500 |
93 |
@@ -0,0 +1,18 @@ |
94 |
+/var/log/dovecot/dovecot.log { |
95 |
+ weekly |
96 |
+ rotate 4 |
97 |
+ missingok |
98 |
+ notifempty |
99 |
+ compress |
100 |
+ delaycompress |
101 |
+ sharedscripts |
102 |
+ su root root |
103 |
+ create 600 root root |
104 |
+ postrotate |
105 |
+ #/usr/bin/systemctl reload-or-try-restart dovecot |
106 |
+ # kill -s USR2 `cat /var/run/dovecot/master.pid` |
107 |
+ doveadm log reopen |
108 |
+ # in case of issues with SELinux |
109 |
+ # kill -s 0 `cat /var/run/dovecot/master.pid` || kill -s USR1 `cat /var/run/dovecot/master.pid` |
110 |
+ endscript |
111 |
+} |
112 |
diff -Nur smeserver-dovecot-1.6.0.old/root/sbin/e-smith/systemd/dovecot-control smeserver-dovecot-1.6.0/root/sbin/e-smith/systemd/dovecot-control |
113 |
--- smeserver-dovecot-1.6.0.old/root/sbin/e-smith/systemd/dovecot-control 1969-12-31 19:00:00.000000000 -0500 |
114 |
+++ smeserver-dovecot-1.6.0/root/sbin/e-smith/systemd/dovecot-control 2020-12-06 23:34:00.603000000 -0500 |
115 |
@@ -0,0 +1,41 @@ |
116 |
+#!/usr/bin/perl -w |
117 |
+ |
118 |
+#---------------------------------------------------------------------- |
119 |
+# copyright (C) 2011 Firewall-Services |
120 |
+# daniel@firewall-services.com |
121 |
+# |
122 |
+# This program is free software; you can redistribute it and/or modify |
123 |
+# it under the terms of the GNU General Public License as published by |
124 |
+# the Free Software Foundation; either version 2 of the License, or |
125 |
+# (at your option) any later version. |
126 |
+# |
127 |
+# This program is distributed in the hope that it will be useful, |
128 |
+# but WITHOUT ANY WARRANTY; without even the implied warranty of |
129 |
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
130 |
+# GNU General Public License for more details. |
131 |
+# |
132 |
+# You should have received a copy of the GNU General Public License |
133 |
+# along with this program; if not, write to the Free Software |
134 |
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
135 |
+# |
136 |
+#---------------------------------------------------------------------- |
137 |
+ |
138 |
+ |
139 |
+use esmith::util; |
140 |
+use esmith::ConfigDB; |
141 |
+use File::Copy; |
142 |
+ |
143 |
+my $c = esmith::ConfigDB->open_ro; |
144 |
+my $s = $c->get('SystemName')->value; |
145 |
+my $d = $c->get('DomainName')->value; |
146 |
+ |
147 |
+my $pem = "/etc/dovecot/ssl/imapd.pem"; |
148 |
+# Now copy system pem file into jail used by ldap |
149 |
+copy("/home/e-smith/ssl.pem/$s.$d.pem", "$pem.$$") |
150 |
+ or die "failed to copy SSL PEM: $!"; |
151 |
+chmod 0440, "$pem.$$"; |
152 |
+esmith::util::chownFile("root", "stunnel", "$pem.$$"); |
153 |
+rename("$pem.$$", "$pem") |
154 |
+ or die "failed to rename $pem.$$ to $pem: $!"; |
155 |
+ |
156 |
+ |
157 |
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 |
158 |
--- smeserver-dovecot-1.6.0.old/root/var/service/dovecot/control/1 2016-02-05 18:43:48.000000000 -0500 |
159 |
+++ smeserver-dovecot-1.6.0/root/var/service/dovecot/control/1 1969-12-31 19:00:00.000000000 -0500 |
160 |
@@ -1,41 +0,0 @@ |
161 |
-#!/usr/bin/perl -w |
162 |
- |
163 |
-#---------------------------------------------------------------------- |
164 |
-# copyright (C) 2011 Firewall-Services |
165 |
-# daniel@firewall-services.com |
166 |
-# |
167 |
-# This program is free software; you can redistribute it and/or modify |
168 |
-# it under the terms of the GNU General Public License as published by |
169 |
-# the Free Software Foundation; either version 2 of the License, or |
170 |
-# (at your option) any later version. |
171 |
-# |
172 |
-# This program is distributed in the hope that it will be useful, |
173 |
-# but WITHOUT ANY WARRANTY; without even the implied warranty of |
174 |
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
175 |
-# GNU General Public License for more details. |
176 |
-# |
177 |
-# You should have received a copy of the GNU General Public License |
178 |
-# along with this program; if not, write to the Free Software |
179 |
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
180 |
-# |
181 |
-#---------------------------------------------------------------------- |
182 |
- |
183 |
- |
184 |
-use esmith::util; |
185 |
-use esmith::ConfigDB; |
186 |
-use File::Copy; |
187 |
- |
188 |
-my $c = esmith::ConfigDB->open_ro; |
189 |
-my $s = $c->get('SystemName')->value; |
190 |
-my $d = $c->get('DomainName')->value; |
191 |
- |
192 |
-my $pem = "./ssl/imapd.pem"; |
193 |
-# Now copy system pem file into jail used by ldap |
194 |
-copy("/home/e-smith/ssl.pem/$s.$d.pem", "$pem.$$") |
195 |
- or die "failed to copy SSL PEM: $!"; |
196 |
-chmod 0440, "$pem.$$"; |
197 |
-esmith::util::chownFile("root", "stunnel", "$pem.$$"); |
198 |
-rename("$pem.$$", "$pem") |
199 |
- or die "failed to rename $pem.$$ to $pem: $!"; |
200 |
- |
201 |
- |
202 |
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 |
203 |
--- smeserver-dovecot-1.6.0.old/root/var/service/dovecot/log/run 2013-02-26 12:57:10.000000000 -0500 |
204 |
+++ smeserver-dovecot-1.6.0/root/var/service/dovecot/log/run 1969-12-31 19:00:00.000000000 -0500 |
205 |
@@ -1,10 +0,0 @@ |
206 |
-#!/bin/sh |
207 |
- |
208 |
-NUM=$(/sbin/e-smith/db configuration getprop dovecot KeepLogFiles) |
209 |
- |
210 |
-exec \ |
211 |
- /usr/local/bin/setuidgid smelog \ |
212 |
- /usr/local/bin/multilog t s5000000 \ |
213 |
- n${NUM:-10} \ |
214 |
- /var/log/dovecot/ |
215 |
- |
216 |
diff -Nur smeserver-dovecot-1.6.0.old/root/var/service/dovecot/run smeserver-dovecot-1.6.0/root/var/service/dovecot/run |
217 |
--- smeserver-dovecot-1.6.0.old/root/var/service/dovecot/run 2013-02-26 12:57:10.000000000 -0500 |
218 |
+++ smeserver-dovecot-1.6.0/root/var/service/dovecot/run 1969-12-31 19:00:00.000000000 -0500 |
219 |
@@ -1,6 +0,0 @@ |
220 |
-#!/bin/sh |
221 |
- |
222 |
-exec 2>&1 |
223 |
-./control/1 |
224 |
-exec /usr/sbin/dovecot -F |
225 |
- |