-
Notifications
You must be signed in to change notification settings - Fork 1
/
dovecot-toaster.spec
2105 lines (1716 loc) · 84.3 KB
/
dovecot-toaster.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
%define _unpackaged_files_terminate_build 0
%define _missing_doc_files_terminate_build 0
%define _qdir /var/qmail
%define _qtlogdir /var/log/qmail
%define _spath %{_qdir}/supervise
%define dversion 2.3
%global pigeonholever 0.5.16
%global __provides_exclude_from %{_docdir}
%global __requires_exclude_from %{_docdir}
%define real_name dovecot
Name: %{real_name}-toaster
Summary: Secure imap and pop3 server
Epoch: 1
Version: 2.3.16
Release: 4.kng%{?dist}
License: MIT and LGPLv2
# dovecot itself is MIT,
# pigeonhole is LGPLv2,
# a few sources are Public Domain
Group: System Environment/Daemons
Vendor: QmailToaster
URL: http://www.dovecot.org/
Source: http://www.dovecot.org/releases/2.3/%{real_name}-%{version}%{?prever}.tar.gz
Source1: dovecot.init
Source2: dovecot.pam
Source3: dovecot.prestartscript
Source4: dovecot.toaster.conf
Source5: dovecot.conf
Source8: http://pigeonhole.dovecot.org/releases/2.3/dovecot-2.3-pigeonhole-%{pigeonholever}.tar.gz
Source9: dovecot.sysconfig
Source10: dovecot.tmpfilesd
Source11: dovecot.local.conf
Source12: dovecot.logrotate
Source13: dovecot.lib.x86_64
Source14: dovecot.conf.5.gz
Source15: prestartscript
Source100: supervise-dovecot-run
Source101: supervise-dovecot-log-run
# 3x Fedora/RHEL specific
Patch1: dovecot-2.0-defaultconfig.patch
Patch2: dovecot-1.0.beta2-mkcert-permissions.patch
Patch3: dovecot-1.0.rc7-mkcert-paths.patch
Patch4: dovecot_2.3.20_vpopmail_auth_rev01.patch
Patch5: dovecot-2.3.14-opensslv3.patch
#wait for network
Patch6: dovecot-2.1.10-waitonline.patch
# adding systemd patch from https://src.fedoraproject.org/rpms/dovecot/tree/master
Patch8: dovecot-2.2.20-initbysystemd.patch
Patch9: dovecot-2.2.22-systemd_w_protectsystem.patch
# sent upstream, rhbz#1630380
Patch11: dovecot-2.2.36-aclfix.patch
Patch13: dovecot-2.2.36-bigkey.patch
# do not use own implementation of HMAC, use OpenSSL for certification purposes
# not sent upstream as proper fix would use dovecot's lib-dcrypt but it introduces
# hard to break circular dependency between lib and lib-dcrypt
Patch14: dovecot-2.3.6-opensslhmac.patch
# from upstream, for dovecot < 2.3.17, s390x FTBFS fix
Patch15: dovecot-2.3.16-ftbfsbigend.patch
Patch16: dovecot-2.3.16-keeplzma.patch
# from upstream, for <= 2.3.19.1, rhbz#2106232
Patch17: dovecot-2.3.19.1-7bad6a24.patch
# from upstream, for < 2.3.19.1, rhbz#2128857
Patch18: dovecot-2.3.18-9f300239..4596d399.patch
Patch19: dovecot-2.3.18-bdf447e4.patch
BuildRequires: openssl-devel, pam-devel, zlib-devel, bzip2-devel, libcap-devel
BuildRequires: libtool, autoconf, automake, pkgconfig
Requires: qmail-toaster >= 1.03
Obsoletes: qmail-pop3d-toaster
BuildRequires: sqlite-devel
BuildRequires: postgresql-devel
#BuildRequires: mariadb-devel
BuildRequires: mariadb-connector-c-devel
BuildRequires: openldap-devel
BuildRequires: krb5-devel
BuildRequires: make
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: quota-devel
BuildRequires: quota
BuildRequires: libcap-devel
BuildRequires: xz-devel
BuildRequires: lz4-devel
BuildRequires: multilib-rpm-config
# gettext-devel is needed for running autoconf because of the
# presence of AM_ICONV
BuildRequires: gettext-devel
# Explicit Runtime Requirements for executable
Requires: openssl >= 0.9.7f-4
# Package includes an initscript service file, needs to require initscripts package
Requires(pre): shadow-utils
%if %{?fedora}0 > 140 || %{?rhel}0 > 60
Requires: systemd
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
%else
Requires: initscripts
Requires(post): chkconfig
Requires(preun): chkconfig initscripts
Requires(postun): initscripts
%endif
%if %{?fedora}0 > 150 || %{?rhel}0 >60
#clucene in fedora <=15 and rhel<=6 is too old
BuildRequires: clucene-core-devel
%endif
%define ssldir %{_sysconfdir}/pki/%{real_name}
%if %{?fedora}00%{?rhel} < 6
%define _initddir %{_initrddir}
BuildRequires: curl-devel expat-devel
%else
BuildRequires: libcurl-devel expat-devel
%endif
BuildRequires: libvpopmail-static
# vpopmail should be able to be on a separate host
#Requires: vpopmail
Conflicts: uw-imap, courier-imap
Obsoletes: qmail-pop3d-toaster
BuildRoot: %{_topdir}/BUILDROOT/%{real_name}-%{version}-%{release}.%{_arch}
%define debug_package %{nil}
%global restart_flag /var/run/%{real_name}/%{real_name}-restart-after-rpm-install
#-------------------------------------------------------------------------------
%description
#-------------------------------------------------------------------------------
Dovecot is an IMAP server for Linux/UNIX-like systems, written with security
primarily in mind. It also contains a small POP3 server. It supports mail
in either of maildir or mbox formats.
The SQL drivers and authentication plug-ins are in their subpackages.
#-------------------------------------------------------------------------------
%package pigeonhole
#-------------------------------------------------------------------------------
Requires: %{real_name}-toaster = %{epoch}:%{version}-%{release}
Obsoletes: dovecot-sieve < 1:1.2.10-3
Obsoletes: dovecot-managesieve < 1:1.2.10-3
Summary: Sieve and managesieve plug-in for dovecot
Group: System Environment/Daemons
License: MIT and LGPLv2
%description pigeonhole
This package provides sieve and managesieve plug-in for dovecot LDA.
#-------------------------------------------------------------------------------
%package pgsql
#-------------------------------------------------------------------------------
Requires: %{real_name}-toaster = %{epoch}:%{version}-%{release}
Summary: Postgres SQL back end for dovecot
Group: System Environment/Daemons
%description pgsql
This package provides the Postgres SQL back end for dovecot-auth etc.
#-------------------------------------------------------------------------------
%package mysql
#-------------------------------------------------------------------------------
Requires: %{real_name}-toaster = %{epoch}:%{version}-%{release}
Summary: MySQL back end for dovecot
Group: System Environment/Daemons
%description mysql
This package provides the MySQL back end for dovecot-auth etc.
#-------------------------------------------------------------------------------
%package devel
#-------------------------------------------------------------------------------
Requires: %{real_name}-toaster = %{epoch}:%{version}-%{release}
Summary: Development files for dovecot
Group: Development/Libraries
%description devel
This package provides the development files for dovecot.
#-------------------------------------------------------------------------------
%prep
%setup -q -n %{real_name}-%{version}%{?prever} -a 8
%patch -P 1 -p1 -b .default-settings
%patch -P 2 -p1 -b .mkcert-permissions
%patch -P 3 -p1 -b .mkcert-paths
%patch -P 4 -p1 -b .vpopmail_auth
%patch -P 5 -p1 -b .opensslv3
%patch -P 6 -p1 -b .waitonline
%patch -P 8 -p1 -b .initbysystemd
%patch -P 9 -p1 -b .systemd_w_protectsystem
%patch -P 11 -p1 -b .aclfix
%patch -P 13 -p1 -b .bigkey
%patch -P 14 -p1 -b .opensslhmac
%patch -P 15 -p1 -b .ftbfsbigend
%patch -P 16 -p1 -b .keeplzma
%patch -P 17 -p1 -b .7bad6a24
%patch -P 19 -p1 -b .bdf447e4
pushd dovecot-2*3-pigeonhole-%{pigeonholever}
%patch -P 18 -p1 -b .9f300239..4596d399
popd
sed -i '/DEFAULT_INCLUDES *=/s|$| '"$(pkg-config --cflags libclucene-core)|" src/plugins/fts-lucene/Makefile.in
#-------------------------------------------------------------------------------
%build
#-------------------------------------------------------------------------------
#required for fdpass.c line 125,190: dereferencing type-punned pointer will break strict-aliasing rules
%global _hardened_build 1
export CFLAGS="%{__global_cflags} -fno-strict-aliasing -fstack-reuse=none"
export LDFLAGS="-Wl,-z,now -Wl,-z,relro %{?__global_ldflags}"
mkdir -p m4
autoreconf -I . -fiv #required for aarch64 support
## MR -- dirty trick for enable it
if [ -f /usr/kerberos/bin/krb5-config ] ; then
ln -sf /usr/kerberos/bin/krb5-config /usr/bin/krb5-config
fi
%configure \
INSTALL_DATA="install -c -p -m644" \
--with-systemd \
--docdir=%{_docdir}/%{real_name}-%{version} \
--disable-static \
--disable-rpath \
--with-nss \
--with-shadow \
--with-pam \
--with-gssapi=plugin \
--with-ldap=plugin \
--with-sql=plugin \
--with-pgsql \
--with-mysql \
--with-sqlite \
--with-vpopmail=/etc/libvpopmail \
--with-zlib \
--with-libcap \
--with-lucene \
--with-ssl=openssl \
--with-ssldir=%{ssldir} \
--with-solr \
--with-systemd \
systemdsystemunitdir=/usr/lib/systemd/system \
--with-docs
sed -i 's|/etc/ssl|/etc/pki/dovecot|' doc/mkcert.sh doc/example-config/conf.d/10-ssl.conf
#sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
#sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags}
#pigeonhole
pushd dovecot-2*3-pigeonhole-%{pigeonholever}
# required for snapshot
[ -f configure ] || autoreconf -fiv
[ -f ChangeLog ] || echo "Pigeonhole ChangeLog is not available, yet" >ChangeLog
%configure \
INSTALL_DATA="install -c -p -m644" \
--disable-static \
--with-dovecot=../ \
--with-vpopmail=/usr/include/libvpopmail \
--without-unfinished-features
make %{?_smp_mflags}
popd
#-------------------------------------------------------------------------------
%install
#-------------------------------------------------------------------------------
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
# Original
#-----------------------------------------------------------------------------
#move doc dir back to build dir so doc macro in files section can use it
mv %{buildroot}%{_docdir}/%{real_name}-%{version} \
%{_builddir}/%{real_name}-%{version}%{?prever}/docinstall
# fix multilib issues
%multilib_fix_c_header --file %{_includedir}/dovecot/config.h
pushd %{real_name}-%{dversion}-pigeonhole-%{pigeonholever}
make install DESTDIR=%{buildroot}
mv %{buildroot}%{_docdir}/%{real_name}-%{version} \
%{buildroot}%{_docdir}/%{real_name}-pigeonhole
install -m 644 AUTHORS ChangeLog COPYING COPYING.LGPL INSTALL NEWS README \
%{buildroot}%{_docdir}/%{real_name}-pigeonhole
popd
install -p -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/pam.d/dovecot
install %{SOURCE3} %{buildroot}%{_libexecdir}/dovecot
install -p -D -m 644 %{SOURCE14} %{buildroot}%{_mandir}/man5/dovecot.conf.5.gz
#install waitonline script
install -p -D -m 755 %{SOURCE15} %{buildroot}%{_libexecdir}/dovecot/prestartscript
# generate ghost .pem files
mkdir -p %{buildroot}%{ssldir}/certs
mkdir -p %{buildroot}%{ssldir}/private
touch %{buildroot}%{ssldir}/certs/dovecot.pem
chmod 600 %{buildroot}%{ssldir}/certs/dovecot.pem
touch %{buildroot}%{ssldir}/private/dovecot.pem
chmod 600 %{buildroot}%{ssldir}/private/dovecot.pem
%if %{?fedora}0 > 140 || %{?rhel}0 > 60
install -p -D -m 644 %{SOURCE10} %{buildroot}%{_tmpfilesdir}/dovecot.conf
%else
install -p -D -m 755 %{SOURCE1} %{buildroot}%{_initddir}/dovecot
install -p -D -m 600 %{SOURCE9} %{buildroot}%{_sysconfdir}/sysconfig/dovecot
%endif
mkdir -p %{buildroot}/var/run/dovecot/{login,empty,token-login}
# Install dovecot configuration and dovecot-openssl.cnf
mkdir -p %{buildroot}%{_sysconfdir}/dovecot/conf.d
#install -p -m 644 docinstall/example-config/dovecot.conf \
# %{buildroot}%{_sysconfdir}/dovecot
install -p -m 644 docinstall/example-config/conf.d/*.conf \
%{buildroot}%{_sysconfdir}/dovecot/conf.d
install -p -m 644 %{buildroot}%{_docdir}/%{real_name}-pigeonhole/example-config/conf.d/*.conf \
%{buildroot}%{_sysconfdir}/dovecot/conf.d
install -p -m 644 docinstall/example-config/conf.d/*.conf.ext \
%{buildroot}%{_sysconfdir}/dovecot/conf.d
install -p -m 644 %{buildroot}%{_docdir}/%{real_name}-pigeonhole/example-config/conf.d/*.conf.ext \
%{buildroot}%{_sysconfdir}/dovecot/conf.d ||:
install -p -m 644 doc/dovecot-openssl.cnf \
%{buildroot}%{ssldir}/dovecot-openssl.cnf
install %{SOURCE5} %{buildroot}%{_sysconfdir}/dovecot
install %{SOURCE4} %{buildroot}%{_sysconfdir}/dovecot/toaster.conf
install %{SOURCE11} %{buildroot}%{_sysconfdir}/dovecot/local.conf
install -Dp %{SOURCE12} %{buildroot}%{_sysconfdir}/logrotate.d/dovecot
install -p -m755 doc/mkcert.sh %{buildroot}%{_libexecdir}/%{real_name}/mkcert.sh
mkdir -p %{buildroot}/var/lib/dovecot
#remove the libtool archives
find %{buildroot}%{_libdir}/%{real_name}/ -name '*.la' -exec rm -f {} \;
#remove what we don't want
rm -f %{buildroot}%{_sysconfdir}/dovecot/README
pushd docinstall
rm -f securecoding.txt \
thread-refs.txt
popd
# add ld.so dovecot config
install -Dp %{SOURCE13} %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{real_name}.conf
# Qmail logs
#-----------------------------------------------------------------------------
mkdir -p %{buildroot}%{_qtlogdir}/dovecot
# Supervise
#-----------------------------------------------------------------------------
mkdir -p %{buildroot}%{_spath}/dovecot/log
install %{SOURCE100} %{buildroot}%{_spath}/dovecot/run
install %{SOURCE101} %{buildroot}%{_spath}/dovecot/log/run
#-------------------------------------------------------------------------------
%clean
#-------------------------------------------------------------------------------
rm -rf %{buildroot}
#-------------------------------------------------------------------------------
%pre
#-------------------------------------------------------------------------------
#dovecot uig and gid are reserved, see /usr/share/doc/setup-*/uidgid
getent group dovecot >/dev/null || groupadd -r --gid 97 dovecot
getent passwd dovecot >/dev/null || \
useradd -r --uid 97 -g dovecot -d /usr/libexec/dovecot -s /sbin/nologin -c "Dovecot IMAP server" dovecot
getent group dovenull >/dev/null || groupadd -r dovenull
getent passwd dovenull >/dev/null || \
useradd -r -g dovenull -d /usr/libexec/dovecot -s /sbin/nologin -c "Dovecot's unauthorized user" dovenull
# do not let dovecot run during upgrade rhbz#134325
if [ "$1" = "2" ]; then
rm -f %restart_flag
%if %{?fedora}0 > 140 || %{?rhel}0 > 60
/bin/systemctl is-active %{real_name}.service >/dev/null 2>&1 && touch %restart_flag ||:
/bin/systemctl stop %{real_name}.service >/dev/null 2>&1
%else
/sbin/service %{real_name} status >/dev/null 2>&1 && touch %restart_flag ||:
/sbin/service %{real_name} stop >/dev/null 2>&1
%endif
fi
#-------------------------------------------------------------------------------
%post
#-------------------------------------------------------------------------------
if [ $1 -eq 1 ]; then
%if %{?fedora}0 > 140 || %{?rhel}0 > 60
%systemd_post dovecot.service
%else
/sbin/chkconfig --add %{real_name}
%endif
fi
# generate the ssl certificates
if [ ! -f %{ssldir}/certs/%{real_name}.pem ]; then
SSLDIR=%{ssldir} OPENSSLCONFIG=%{ssldir}/dovecot-openssl.cnf \
%{_libexecdir}/%{real_name}/mkcert.sh &> /dev/null
fi
if [ ! -f /var/lib/dovecot/ssl-parameters.dat ]; then
/usr/libexec/dovecot/ssl-params &>/dev/null
fi
install -d -m 0755 -g dovecot -d /var/run/dovecot
install -d -m 0755 -d /var/run/dovecot/empty
install -d -m 0750 -g dovenull -d /var/run/dovecot/login
install -d -m 0750 -g dovenull -d /var/run/dovecot/token-login
[ -x /sbin/restorecon ] && /sbin/restorecon -R /var/run/dovecot
[ -x /sbin/ldconfig ] && /sbin/ldconfig
## MR -- set as inactive if courier-imap is 'run' state
if [ -f %{_spath}/imap4/run ] ; then
mv -f %{_spath}/dovecot/run %{_spath}/dovecot/down
mv -f %{_spath}/dovecot/log/run %{_spath}/dovecot/log/down
fi
#-------------------------------------------------------------------------------
%preun
#-------------------------------------------------------------------------------
if [ $1 = 0 ]; then
%if %{?fedora}0 > 140 || %{?rhel}0 > 60
/bin/systemctl disable dovecot.service dovecot.socket >/dev/null 2>&1 || :
/bin/systemctl stop dovecot.service dovecot.socket >/dev/null 2>&1 || :
%else
/sbin/service %{real_name} stop > /dev/null 2>&1
/sbin/chkconfig --del %{real_name}
%endif
rm -rf /var/run/dovecot
fi
#-------------------------------------------------------------------------------
%postun
#-------------------------------------------------------------------------------
%if %{?fedora}0 > 140 || %{?rhel}0 > 60
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
%endif
if [ "$1" -ge "1" -a -e %restart_flag ]; then
%if %{?fedora}0 > 140 || %{?rhel}0 > 60
/bin/systemctl start dovecot.service >/dev/null 2>&1 || :
%else
/sbin/service %{real_name} start >/dev/null 2>&1 || :
%endif
fi
[ -x /sbin/ldconfig ] && /sbin/ldconfig
#-------------------------------------------------------------------------------
%posttrans
# dovecot should be started again in %postun, but it's not executed on reinstall
# if it was already started, restart_flag won't be here,
# so it's ok to test it again
#-------------------------------------------------------------------------------
#if [ -e %restart_flag ]; then
#%if %{?fedora}0 > 140 || %{?rhel}0 > 60
# /bin/systemctl start dovecot.service >/dev/null 2>&1 || :
#%else
# /sbin/service %{real_name} start >/dev/null 2>&1 || :
#%endif
# rm -f %restart_flag
#fi
#-------------------------------------------------------------------------------
%check
#-------------------------------------------------------------------------------
make check
cd dovecot-%{dversion}-pigeonhole-%{pigeonholever}
make check
#-------------------------------------------------------------------------------
%files
#-------------------------------------------------------------------------------
%defattr(-,root,root,-)
%doc docinstall/* AUTHORS ChangeLog COPYING COPYING.LGPL COPYING.MIT NEWS README
%{_sbindir}/dovecot
%{_bindir}/doveadm
%{_bindir}/doveconf
%{_bindir}/dsync
%{_bindir}/dovecot-sysreport
%if %{?fedora}0 > 140 || %{?rhel}0 > 60
%config(noreplace) %{_tmpfilesdir}/dovecot.conf
%{_unitdir}/dovecot.service
# commenting this line this we may need for dovecot 2.3
%{_unitdir}/dovecot-init.service
%{_unitdir}/dovecot.socket
%else
%{_initddir}/dovecot
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/dovecot
%endif
#%%config %%{_sysconfdir}/ld.so.conf.d/%%{real_name}.conf
%dir %{_sysconfdir}/dovecot
%dir %{_sysconfdir}/dovecot/conf.d
%config(noreplace) %{_sysconfdir}/dovecot/dovecot.conf
%config(noreplace) %{_sysconfdir}/dovecot/toaster.conf
%config(noreplace) %{_sysconfdir}/dovecot/local.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/dovecot
#list all so we'll be noticed if upstream changes anything
%config(noreplace) %{_sysconfdir}/dovecot/conf.d/10-auth.conf
%config(noreplace) %{_sysconfdir}/dovecot/conf.d/10-director.conf
%config(noreplace) %{_sysconfdir}/dovecot/conf.d/10-logging.conf
%config(noreplace) %{_sysconfdir}/dovecot/conf.d/10-mail.conf
%config(noreplace) %{_sysconfdir}/dovecot/conf.d/10-master.conf
%config(noreplace) %{_sysconfdir}/dovecot/conf.d/10-metrics.conf
%config(noreplace) %{_sysconfdir}/dovecot/conf.d/10-ssl.conf
%config(noreplace) %{_sysconfdir}/dovecot/conf.d/15-lda.conf
%config(noreplace) %{_sysconfdir}/dovecot/conf.d/15-mailboxes.conf
%config(noreplace) %{_sysconfdir}/dovecot/conf.d/20-imap.conf
%config(noreplace) %{_sysconfdir}/dovecot/conf.d/20-lmtp.conf
%config(noreplace) %{_sysconfdir}/dovecot/conf.d/20-pop3.conf
%config(noreplace) %{_sysconfdir}/dovecot/conf.d/20-submission.conf
%config(noreplace) %{_sysconfdir}/dovecot/conf.d/90-acl.conf
%config(noreplace) %{_sysconfdir}/dovecot/conf.d/90-quota.conf
%config(noreplace) %{_sysconfdir}/dovecot/conf.d/90-plugin.conf
%config(noreplace) %{_sysconfdir}/dovecot/conf.d/auth-checkpassword.conf.ext
%config(noreplace) %{_sysconfdir}/dovecot/conf.d/auth-deny.conf.ext
%config(noreplace) %{_sysconfdir}/dovecot/conf.d/auth-dict.conf.ext
%config(noreplace) %{_sysconfdir}/dovecot/conf.d/auth-ldap.conf.ext
%config(noreplace) %{_sysconfdir}/dovecot/conf.d/auth-master.conf.ext
%config(noreplace) %{_sysconfdir}/dovecot/conf.d/auth-passwdfile.conf.ext
%config(noreplace) %{_sysconfdir}/dovecot/conf.d/auth-sql.conf.ext
%config(noreplace) %{_sysconfdir}/dovecot/conf.d/auth-static.conf.ext
%config(noreplace) %{_sysconfdir}/dovecot/conf.d/auth-system.conf.ext
%config(noreplace) %{_sysconfdir}/dovecot/conf.d/auth-vpopmail.conf.ext
%config(noreplace) %{_sysconfdir}/pam.d/dovecot
%config(noreplace) %{ssldir}/dovecot-openssl.cnf
%dir %{ssldir}
%dir %{ssldir}/certs
%dir %{ssldir}/private
%attr(0600,root,root) %ghost %config(missingok,noreplace) %verify(not md5 size mtime) %{ssldir}/certs/dovecot.pem
%attr(0600,root,root) %ghost %config(missingok,noreplace) %verify(not md5 size mtime) %{ssldir}/private/dovecot.pem
%dir %{_libdir}/dovecot
%dir %{_libdir}/dovecot/auth
%dir %{_libdir}/dovecot/dict
%{_libdir}/dovecot/doveadm
%exclude %{_libdir}/dovecot/doveadm/*sieve*
%{_libdir}/dovecot/*.so.*
#these (*.so files) are plugins not a devel files
%{_libdir}/dovecot/*_plugin.so
%exclude %{_libdir}/dovecot/*_sieve_plugin.so
%{_libdir}/dovecot/auth/lib20_auth_var_expand_crypt.so
%{_libdir}/dovecot/auth/libauthdb_imap.*
%{_libdir}/dovecot/auth/libauthdb_ldap.*
%{_libdir}/dovecot/auth/libmech_gssapi.*
%{_libdir}/dovecot/auth/libdriver_sqlite.so
%{_libdir}/dovecot/dict/libdriver_sqlite.so
%{_libdir}/dovecot/dict/libdict_ldap.so
%{_libdir}/dovecot/libdriver_sqlite.so
%{_libdir}/dovecot/libssl_iostream_openssl.so
%{_libdir}/dovecot/libfs_compress.so
%{_libdir}/dovecot/libfs_crypt.so
%{_libdir}/dovecot/libfs_mail_crypt.so
%{_libdir}/dovecot/libdcrypt_openssl.so
%{_libdir}/dovecot/lib20_var_expand_crypt.so
%{_libdir}/dovecot/old-stats/libold_stats_mail.so
%{_libdir}/dovecot/old-stats/libstats_auth.so
%dir %{_libdir}/dovecot/settings
%{_libexecdir}/dovecot
%exclude %{_libexecdir}/%{real_name}/managesieve*
%dir %attr(0755,root,dovecot) %ghost /var/run/dovecot
%attr(0750,root,dovenull) %ghost /var/run/dovecot/login
%attr(0750,root,dovenull) %ghost /var/run/dovecot/token-login
%attr(0755,root,root) %ghost /var/run/dovecot/empty
%attr(0750,dovecot,dovecot) /var/lib/dovecot
%{_datadir}/%{real_name}
%{_mandir}/man1/deliver.1.gz
%{_mandir}/man1/doveadm*.1.gz
%{_mandir}/man1/doveconf.1.gz
%{_mandir}/man1/dovecot*.1.gz
%{_mandir}/man1/dsync.1.gz
%{_mandir}/man5/dovecot.conf.5.gz
%{_mandir}/man7/doveadm-search-query.7.gz
%attr(0751,qmaill,qmail) %{_spath}/dovecot/run
%attr(0751,qmaill,qmail) %{_spath}/dovecot/log/run
%attr(0750,qmaill,qmail) %dir %{_qtlogdir}/dovecot
%{_libdir}/dovecot/libfs_compress.so
#%%{_libdir}/dovecot/stats/libstats*.so
%{_datadir}/dovecot/stopwords/stopwords*.txt
#-------------------------------------------------------------------------------
%files devel
#-------------------------------------------------------------------------------
%defattr(-,root,root,-)
%{_includedir}/dovecot
%{_datadir}/aclocal/dovecot.m4
%{_libdir}/dovecot/libdovecot*.so
%{_libdir}/dovecot/dovecot-config
#-------------------------------------------------------------------------------
%files pigeonhole
#-------------------------------------------------------------------------------
%defattr(-,root,root,-)
%{_bindir}/sieve-dump
%{_bindir}/sieve-filter
%{_bindir}/sieve-test
%{_bindir}/sievec
%config(noreplace) %{_sysconfdir}/dovecot/conf.d/20-managesieve.conf
%config(noreplace) %{_sysconfdir}/dovecot/conf.d/90-sieve.conf
%config(noreplace) %{_sysconfdir}/dovecot/conf.d/90-sieve-extprograms.conf
%{_docdir}/%{real_name}-pigeonhole
%{_libexecdir}/%{real_name}/managesieve
%{_libexecdir}/%{real_name}/managesieve-login
%{_libdir}/dovecot/doveadm/*sieve*
%{_libdir}/dovecot/*_sieve_plugin.so
%{_libdir}/dovecot/settings/libmanagesieve_*.so
%{_libdir}/dovecot/settings/libpigeonhole_*.so
%{_libdir}/dovecot/sieve/
%{_mandir}/man1/sieve-dump.1.gz
%{_mandir}/man1/sieve-filter.1.gz
%{_mandir}/man1/sieve-test.1.gz
%{_mandir}/man1/sievec.1.gz
%{_mandir}/man1/sieved.1.gz
%{_mandir}/man7/pigeonhole.7.gz
#-------------------------------------------------------------------------------
%files mysql
#-------------------------------------------------------------------------------
%defattr(-,root,root,-)
%{_libdir}/%{real_name}/libdriver_mysql.so
%{_libdir}/%{real_name}/auth/libdriver_mysql.so
%{_libdir}/%{real_name}/dict/libdriver_mysql.so
#-------------------------------------------------------------------------------
%files pgsql
#-------------------------------------------------------------------------------
%defattr(-,root,root,-)
%{_libdir}/%{real_name}/libdriver_pgsql.so
%{_libdir}/%{real_name}/auth/libdriver_pgsql.so
%{_libdir}/%{real_name}/dict/libdriver_pgsql.so
#-------------------------------------------------------------------------------
%changelog
#-------------------------------------------------------------------------------
* Fri Mar 13 2020 Dionysis Kladis <[email protected]> - 1:2.2.36.4-1
- Updated source to latest stable
- Compile for Kloxong and centos 8 on copr
- Updated pigeonhole to latest version
- Fixed some hardcoded values for versioning
* Tue Dec 10 2019 Dionysis Kladis <[email protected]> - 1:2.2.24-1
- Handling properly systemd to compile for centos 7
- Compile for Kloxong
- Making Copr acceptable spec file
* Fri Jun 17 2016 Mustafa Ramadhan <[email protected]> - 1:2.2.24-1
- Update to 2.2.24
- Compile for Kloxo-MR
- Rename to dovecot-toaster
- disable requires to maildrop-toaster (may trouble with dovecot-toaster)
- co-exists between Courier-imap and dovecot
* Sat Nov 16 2013 Eric Shubert <[email protected]> - 1:2.2.7-0.qt
- Migrated to github
- Added CentOS 6 support
- Updated to current upstream versions, updating spec from Fedora development
- Added changelog entries from fedoraproject development spec file
- Added logrotate config
- First 'official'/'stock' QMT version
* Thu Nov 14 2013 Michal Hlavinka <[email protected]> - 1:2.2.7-2
- fix ostream infinite loop (#1029906)
* Mon Nov 04 2013 Michal Hlavinka <[email protected]> - 1:2.2.7-1
- dovecot updated to 2.2.7
- master process was doing a hostname.domain lookup for each created
process, which may have caused a lot of unnecessary DNS lookups.
- dsync: Syncing over 100 messages at once caused problems in some
situations, causing messages to get new UIDs.
- fts-solr: Different Solr hosts for different users didn't work.
* Tue Oct 01 2013 Michal Hlavinka <[email protected]> - 1:2.2.6-1
- dovecot updated to 2.2.6, pigeonhole updated to 0.4.2
- director: v2.2.5 changes caused "SYNC lost" errors
- dsync: Many fixes and error handling improvements
- doveadm -A: Don't waste CPU by doing a separate config lookup
for each user
- Long-running ssl-params process no longer prevents Dovecot restart
- mbox: Fixed mailbox_list_index=yes to work correctly
* Thu Aug 08 2013 Michal Hlavinka <[email protected]> - 1:2.2.5-2
- use unversioned doc dir (#993731)
* Wed Aug 07 2013 Michal Hlavinka <[email protected]> - 1:2.2.5-1
- dovecot updated to 2.2.5
- added some missing man pages (by Pascal Volk)
- director: Users near expiration could have been redirected to
different servers at the same time.
- pop3: Avoid assert-crash if client disconnects during LIST.
- mdbox: Corrupted index header still wasn't automatically fixed.
- dsync: Various fixes to work better with imapc and pop3c storages.
- ldap: sasl_bind=yes caused crashes, because Dovecot's lib-sasl
symbols conflicted with Cyrus SASL library.
* Tue Jul 30 2013 Michal Hlavinka <[email protected]> - 1:2.2.4-3
- dovecot pigeonhole updated to 0.4.1
* Wed Jul 10 2013 Michal Hlavinka <[email protected]> - 1:2.2.4-2
- fix name conflict with cyrus-sasl (#975869)
* Tue Jun 25 2013 Michal Hlavinka <[email protected]> - 1:2.2.4-1
- dovecot updated to 2.2.4
- imap/pop3 proxy: Master user logins were broken in v2.2.3
- sdbox/mdbox: A corrupted index header with wrong size was never
automatically fixed in v2.2.3.
- mbox: Fixed assert-crashes related to locking.
* Mon Jun 17 2013 Michal Hlavinka <[email protected]> - 1:2.2.3-1
- dovecot updated to 2.2.3
- IMAP: If subject contained only whitespace, Dovecot returned an
ENVELOPE reply with a huge literal value, effectively causing the
IMAP client to wait for more data forever.
- IMAP: Various URLAUTH fixes.
- imapc: Various bugfixes and improvements
- pop3c: Various fixes to make it work in dsync (without imapc)
- dsync: Fixes to syncing subscriptions. Fixes to syncing mailbox
renames.
* Tue May 21 2013 Michal Hlavinka <[email protected]> - 1:2.2.2-2
- fix location of tmpfiles configuration (#964448)
* Mon May 20 2013 Michal Hlavinka <[email protected]> - 1:2.2.2-1
- dovecot updated to 2.2.2
- IMAP: Various URLAUTH fixes.
- IMAP: Fixed a hang with invalid APPEND parameters.
- IMAP LIST-EXTENDED: INBOX was never listed with \Subscribed flag.
- mailbox_list_index=yes still caused crashes.
- maildir: Fixed a crash after dovecot-keywords file was re-read.
- maildir: If files had reappeared unexpectedly to a Maildir, they
were ignored until index files were deleted.
- Maildir: Fixed handling over 26 keywords in a mailbox.
- imap/pop3-login proxying: Fixed a crash if TCP connection succeeded,
but the remote login timed out.
* Thu May 16 2013 Michal Hlavinka <[email protected]> - 1:2.2.1-4
- update pigeonhole to 0.4.0
* Mon Apr 29 2013 Michal Hlavinka <[email protected]> - 1:2.2.1-3
- revert last change and use different fix
* Wed Apr 24 2013 Kalev Lember <[email protected]> - 1:2.2.1-2
- Filter out autogenerated perl deps (#956194)
* Fri Apr 19 2013 Michal Hlavinka <[email protected]> - 1:2.2.1-1
- dovecot updated to 2.2.1
- mailbox_list_index=yes was broken.
- LAYOUT=index didn't list subscriptions.
- auth: Multiple master passdbs didn't work.
- Message parsing (e.g. during search) crashed when multipart message
didn't actually contain any parts.
- dovecot updated to 2.2.1
* Mon Apr 15 2013 Michal Hlavinka <[email protected]> - 1:2.2.0-1
- dovecot updated to 2.2.0
- Mailbox list indexes weren't using proper file permissions based
on the root directory.
- replicator: doveadm commands and user list export may have skipped
some users.
- Various fixes to mailbox_list_index=yes
* Fri Apr 05 2013 Michal Hlavinka <[email protected]> - 1:2.2-0.4
- dovecot updated to 2.2 RC4
- various bugfixes to LDAP changes in rc3
* Wed Mar 27 2013 Michal Hlavinka <[email protected]> - 1:2.2-0.3
- dovecot updated to 2.2 RC3
- Fixed a crash when decoding quoted-printable content.
- dsync: Various bugfixes
* Thu Feb 28 2013 Michal Hlavinka <[email protected]> - 1:2.2-0.2
- do not print error when NetworkManager is not installed (#916456)
* Wed Feb 27 2013 Michal Hlavinka <[email protected]> - 1:2.2-0.1
- major update to dovecot 2.2 RC2
* Mon Feb 11 2013 Michal Hlavinka <[email protected]> - 1:2.1.15-1
- dovecot updated to 2.1.15
- v2.1.14's dovecot.index.cache fixes caused Dovecot to use more disk I/O
and memory than was necessary.
* Tue Feb 05 2013 Michal Hlavinka <[email protected]> - 1:2.1.14-2
- spec clean up
* Thu Jan 31 2013 Michal Hlavinka <[email protected]> - 1:2.1.14-1
- dovecot updated to 2.1.14
- v2.1.11+ had a race condition where it sometimes overwrote data in
dovecot.index.cache file. This could have caused Dovecot to return
the same cached data to two different messages.
- mdbox: Fixes to handling duplicate GUIDs during index rebuild
* Tue Jan 15 2013 Michal Hlavinka <[email protected]> - 1:2.1.13-1
- dovecot updated to 2.1.13
- Some fixes to cache file changes in v2.1.11.
- virtual storage: Sorting mailbox by from/to/cc/bcc didn't work.
* Mon Dec 03 2012 Michal Hlavinka <[email protected]> - 1:2.1.12-1
- dovecot updated to 2.1.12
- lmtp proxy: Fixed hanging if remote server was down.
- doveadm: Various fixes to handling doveadm-server connections.
- auth: passdb imap was broken in v2.1.10.
* Thu Nov 08 2012 Michal Hlavinka <[email protected]> - 1:2.1.10-3
- fix network still not ready race condition (#871623)
* Fri Nov 02 2012 Michal Hlavinka <[email protected]> - 1:2.1.10-2
- add reload command to service file
* Wed Sep 19 2012 Michal Hlavinka <[email protected]> - 1:2.1.10-1
- dovecot updated to 2.1.10, pigeonhole updated to 0.3.3
- director: In some conditions director may have disconnected from
another director (without logging about it), thinking it was sending
invalid data.
- imap: Various fixes to listing mailboxes.
- login processes crashed if there were a lot of local {} or remote {}
settings blocks.
* Fri Aug 24 2012 Michal Hlavinka <[email protected]> - 1:2.1.9-2
- use new systemd rpm macros (#851238)
* Thu Aug 02 2012 Michal Hlavinka <[email protected]> - 1:2.1.9-1
- dovecot updated to 2.1.9
- Full text search indexing might have failed for some messages,
always causing indexer-worker process to run out of memory.
- fts-lucene: Fixed handling SEARCH HEADER FROM/TO/SUBJECT/CC/BCC when
the header wasn't lowercased.
- fts-squat: Fixed crash when searching a virtual mailbox.
- pop3: Fixed assert crash when doing UIDL on empty mailbox on some
setups.
- auth: GSSAPI RFC compliancy and error handling fixes.
- Various fixes related to handling shared namespaces
* Thu Aug 02 2012 Eric Shubert <[email protected]> - 1:2.0.17-2
- rebuilt for vpopmail 5.4.33
* Wed Jul 18 2012 Fedora Release Engineering <[email protected]> - 1:2.1.8-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Tue Jul 03 2012 Michal Hlavinka <[email protected]> - 1:2.1.8-2
- pigeonhole updated to 0.3.1
- Fixed several small issues, including a few potential segfault bugs, based
on static source code analysis.
* Tue Jul 03 2012 Michal Hlavinka <[email protected]> - 1:2.1.8-1
- dovecot updated to 2.1.8
- imap: Mailbox names were accidentally sent as UTF-8 instead of mUTF-7
in previous v2.1.x releases for STATUS, MYRIGHTS and GETQUOTAROOT commands.
- lmtp proxy: Don't timeout connections too early when mail has a lot of RCPT TOs.
- director: Don't crash if the director is working alone.
- shared mailboxes: Avoid doing "@domain" userdb lookups.
- doveadm: Fixed crash with proxying some commands.
- fts-squat: Fixed handling multiple SEARCH parameters.
- imapc: Fixed a crash when message had more than 8 keywords.
- imapc: Don't crash on APPEND/COPY if server doesn't support UIDPLUS.
* Mon Jul 02 2012 Michal Hlavinka <[email protected]> - 1:2.1.7-5
- make quota work with NFS mounted mailboxes
* Fri Jun 22 2012 Michal Hlavinka <[email protected]> - 1:2.1.7-4
- posttrans argument is always zero
* Fri Jun 15 2012 Michal Hlavinka <[email protected]> - 1:2.1.7-3
- do not let dovecot run during upgrade (#134325)
* Wed May 30 2012 Michal Hlavinka <[email protected]> - 1:2.1.7-2
- fix changelog, 2.1.7-1 had copy-pasted upstream changelog, which was wrong
- director: Don't crash with quickly disconnecting incoming director
connections.
- mdbox: If mail was originally saved to non-INBOX, and namespace
prefix is non-empty, don't assert-crash when rebuilding indexes.
- sdbox: Don't use more fds than necessary when copying mails.
- auth: Fixed crash with DIGEST-MD5 when attempting to do master user
login without master passdbs.
- Several fixes to mail_shared_explicit_inbox=no
- imapc: Use imapc_list_prefix also for listing subscriptions.
* Wed May 30 2012 Michal Hlavinka <[email protected]> - 1:2.1.7-1
- updated to 2.1.7
- v2.1.5: Using "~/" as mail_location or elsewhere failed to actually
expand it to home directory.
- dbox: Fixed potential assert-crash when reading dbox files.
- trash plugin: Fixed behavior when quota is already over limit.
- mail_log plugin: Logging "copy" event didn't work.
- Proxying to backend server with SSL: Verifying server certificate
name always failed, because it was compared to an IP address.
* Wed May 09 2012 Michal Hlavinka <[email protected]> - 1:2.1.6-2
- fix socket activation again, fix in 2.1.6 is incomplete
* Wed May 09 2012 Michal Hlavinka <[email protected]> - 1:2.1.6-1
- v2.1.5: Using "~/" as mail_location or elsewhere failed to actually
expand it to home directory.
- dbox: Fixed potential assert-crash when reading dbox files.
- trash plugin: Fixed behavior when quota is already over limit.
- Proxying to backend server with SSL: Verifying server certificate
name always failed, because it was compared to an IP address.
* Tue Apr 24 2012 Michal Hlavinka <[email protected]> - 1:2.1.5-1
- IMAP: Several fixes related to mailbox listing in some configs
- director: A lot of fixes and performance improvements
- mbox: Deleting a mailbox didn't delete its index files.
- pop3c: TOP command was sent incorrectly
- trash plugin didn't work properly
- LMTP: Don't add a duplicate Return-Path: header when proxying.
- listescape: Don't unescape namespace prefixes.
* Tue Apr 24 2012 Michal Hlavinka <[email protected]> - 1:2.1.4-2
- close systemd extra sockets that are not configured
* Tue Apr 10 2012 Michal Hlavinka <[email protected]> - 1:2.1.4-1
- dovecot updated to 2.1.4
- Proxying SSL connections crashed in v2.1.[23]
- fts-solr: Indexing mail bodies was broken.
- director: Several changes to significantly improve error handling
- doveadm import didn't import messages' flags
- mail_full_filesystem_access=yes was broken
- Make sure IMAP clients can't create directories when accessing
nonexistent users' mailboxes via shared namespace.
- Dovecot auth clients authenticating via TCP socket could have failed
with bogus "PID already in use" errors.
* Mon Mar 19 2012 Michal Hlavinka <[email protected]> - 1:2.1.3-1
- dovecot updated to 2.1.3
- multi-dbox format in dovecot 2.1.2 was broken
- temporarily disable check phase until bug #798968 is fixed
* Fri Mar 16 2012 Michal Hlavinka <[email protected]> - 1:2.1.2-1
- dovecot updated to 2.1.2
- doveadm sync: If mailbox was expunged empty, messages may have
become back instead of also being expunged in the other side.
- imap_id_* settings were ignored before login.
- Several fixes to mailbox_list_index=yes
- Previous v2.1.x didn't log all messages at shutdown.
* Thu Mar 01 2012 Michal Hlavinka <[email protected]> - 1:2.1.1-2
- enable fts_lucene plugin (#798661)
* Fri Feb 24 2012 Michal Hlavinka <[email protected]> - 1:2.1.1-1
- dovecot updated to 2.1.1
- acl plugin + autocreated mailboxes crashed when listing mailboxes
- doveadm force-resync: Don't skip autocreated mailboxes (especially
INBOX).
- If process runs out of fds, stop listening for new connections only
temporarily, not permanently (avoids hangs with process_limit=1