From 7ed1467d7d249828f3dec868d3d768cacd47f6cdd205f76e768bda7659ca152d Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Fri, 24 Jan 2025 21:56:06 +0000 Subject: [PATCH 1/2] - update to 2.4 Add unit files from 2.4 OBS-URL: https://build.opensuse.org/package/show/server:mail/dovecot?expand=0&rev=31 --- .gitattributes | 23 +++++ .gitignore | 1 + dovecot-2.0.configfiles | 28 +++++ dovecot-2.1-pigeonhole.configfiles | 2 + dovecot-2.1.configfiles | 31 ++++++ dovecot-2.2-pigeonhole.configfiles | 4 + dovecot-2.2.configfiles | 31 ++++++ dovecot-2.3-pigeonhole.configfiles | 4 + dovecot-2.3.configfiles | 31 ++++++ dovecot.README.SUSE | 70 +++++++++++++ dovecot.changes | 158 +++++++++++++++++++++++++++++ dovecot.pam | 6 ++ dovecot.service | 36 +++++++ dovecot.socket | 15 +++ dovecot.spec | 126 +++++++++++++++++++++++ dovecot.tmpfiles.d | 3 + 16 files changed, 569 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 dovecot-2.0.configfiles create mode 100644 dovecot-2.1-pigeonhole.configfiles create mode 100644 dovecot-2.1.configfiles create mode 100644 dovecot-2.2-pigeonhole.configfiles create mode 100644 dovecot-2.2.configfiles create mode 100644 dovecot-2.3-pigeonhole.configfiles create mode 100644 dovecot-2.3.configfiles create mode 100644 dovecot.README.SUSE create mode 100644 dovecot.changes create mode 100644 dovecot.pam create mode 100644 dovecot.service create mode 100644 dovecot.socket create mode 100644 dovecot.spec create mode 100644 dovecot.tmpfiles.d diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/dovecot-2.0.configfiles b/dovecot-2.0.configfiles new file mode 100644 index 0000000..fe6613d --- /dev/null +++ b/dovecot-2.0.configfiles @@ -0,0 +1,28 @@ +/etc/dovecot/README +/etc/dovecot/conf.d/10-auth.conf +/etc/dovecot/conf.d/10-director.conf +/etc/dovecot/conf.d/10-logging.conf +/etc/dovecot/conf.d/10-mail.conf +/etc/dovecot/conf.d/10-master.conf +/etc/dovecot/conf.d/10-ssl.conf +/etc/dovecot/conf.d/15-lda.conf +/etc/dovecot/conf.d/20-imap.conf +/etc/dovecot/conf.d/20-lmtp.conf +/etc/dovecot/conf.d/20-pop3.conf +/etc/dovecot/conf.d/90-acl.conf +/etc/dovecot/conf.d/90-plugin.conf +/etc/dovecot/conf.d/90-quota.conf +/etc/dovecot/conf.d/auth-checkpassword.conf.ext +/etc/dovecot/conf.d/auth-deny.conf.ext +/etc/dovecot/conf.d/auth-ldap.conf.ext +/etc/dovecot/conf.d/auth-master.conf.ext +/etc/dovecot/conf.d/auth-passwdfile.conf.ext +/etc/dovecot/conf.d/auth-sql.conf.ext +/etc/dovecot/conf.d/auth-static.conf.ext +/etc/dovecot/conf.d/auth-system.conf.ext +/etc/dovecot/conf.d/auth-vpopmail.conf.ext +/etc/dovecot/dovecot-db.conf.ext +/etc/dovecot/dovecot-dict-sql.conf.ext +/etc/dovecot/dovecot-ldap.conf.ext +/etc/dovecot/dovecot-sql.conf.ext +/etc/dovecot/dovecot.conf diff --git a/dovecot-2.1-pigeonhole.configfiles b/dovecot-2.1-pigeonhole.configfiles new file mode 100644 index 0000000..59a5647 --- /dev/null +++ b/dovecot-2.1-pigeonhole.configfiles @@ -0,0 +1,2 @@ +/etc/dovecot/conf.d/20-managesieve.conf +/etc/dovecot/conf.d/90-sieve.conf diff --git a/dovecot-2.1.configfiles b/dovecot-2.1.configfiles new file mode 100644 index 0000000..9c55da3 --- /dev/null +++ b/dovecot-2.1.configfiles @@ -0,0 +1,31 @@ +/etc/dovecot/README +/etc/dovecot/conf.d/10-auth.conf +/etc/dovecot/conf.d/10-director.conf +/etc/dovecot/conf.d/10-logging.conf +/etc/dovecot/conf.d/10-mail.conf +/etc/dovecot/conf.d/10-master.conf +/etc/dovecot/conf.d/10-ssl.conf +/etc/dovecot/conf.d/15-lda.conf +/etc/dovecot/conf.d/15-mailboxes.conf +/etc/dovecot/conf.d/20-imap.conf +/etc/dovecot/conf.d/20-lmtp.conf +/etc/dovecot/conf.d/20-pop3.conf +/etc/dovecot/conf.d/90-acl.conf +/etc/dovecot/conf.d/90-plugin.conf +/etc/dovecot/conf.d/90-quota.conf +/etc/dovecot/conf.d/auth-checkpassword.conf.ext +/etc/dovecot/conf.d/auth-deny.conf.ext +/etc/dovecot/conf.d/auth-dict.conf.ext +/etc/dovecot/conf.d/auth-ldap.conf.ext +/etc/dovecot/conf.d/auth-master.conf.ext +/etc/dovecot/conf.d/auth-passwdfile.conf.ext +/etc/dovecot/conf.d/auth-sql.conf.ext +/etc/dovecot/conf.d/auth-static.conf.ext +/etc/dovecot/conf.d/auth-system.conf.ext +/etc/dovecot/conf.d/auth-vpopmail.conf.ext +/etc/dovecot/dovecot-db.conf.ext +/etc/dovecot/dovecot-dict-auth.conf.ext +/etc/dovecot/dovecot-dict-sql.conf.ext +/etc/dovecot/dovecot-ldap.conf.ext +/etc/dovecot/dovecot-sql.conf.ext +/etc/dovecot/dovecot.conf diff --git a/dovecot-2.2-pigeonhole.configfiles b/dovecot-2.2-pigeonhole.configfiles new file mode 100644 index 0000000..d50fde7 --- /dev/null +++ b/dovecot-2.2-pigeonhole.configfiles @@ -0,0 +1,4 @@ +/etc/dovecot/conf.d/20-managesieve.conf +/etc/dovecot/conf.d/90-sieve-extprograms.conf +/etc/dovecot/conf.d/90-sieve.conf +/etc/dovecot/sieve-ldap.conf diff --git a/dovecot-2.2.configfiles b/dovecot-2.2.configfiles new file mode 100644 index 0000000..dda6680 --- /dev/null +++ b/dovecot-2.2.configfiles @@ -0,0 +1,31 @@ +/etc/dovecot/README +/etc/dovecot/conf.d/10-auth.conf +/etc/dovecot/conf.d/10-director.conf +/etc/dovecot/conf.d/10-logging.conf +/etc/dovecot/conf.d/10-mail.conf +/etc/dovecot/conf.d/10-master.conf +/etc/dovecot/conf.d/10-ssl.conf +/etc/dovecot/conf.d/11-object-storage.conf +/etc/dovecot/conf.d/15-lda.conf +/etc/dovecot/conf.d/15-mailboxes.conf +/etc/dovecot/conf.d/20-imap.conf +/etc/dovecot/conf.d/20-lmtp.conf +/etc/dovecot/conf.d/20-pop3.conf +/etc/dovecot/conf.d/90-acl.conf +/etc/dovecot/conf.d/90-plugin.conf +/etc/dovecot/conf.d/90-quota.conf +/etc/dovecot/conf.d/auth-checkpassword.conf.ext +/etc/dovecot/conf.d/auth-deny.conf.ext +/etc/dovecot/conf.d/auth-dict.conf.ext +/etc/dovecot/conf.d/auth-ldap.conf.ext +/etc/dovecot/conf.d/auth-master.conf.ext +/etc/dovecot/conf.d/auth-passwdfile.conf.ext +/etc/dovecot/conf.d/auth-sql.conf.ext +/etc/dovecot/conf.d/auth-static.conf.ext +/etc/dovecot/conf.d/auth-system.conf.ext +/etc/dovecot/conf.d/auth-vpopmail.conf.ext +/etc/dovecot/dovecot-dict-auth.conf.ext +/etc/dovecot/dovecot-dict-sql.conf.ext +/etc/dovecot/dovecot-ldap.conf.ext +/etc/dovecot/dovecot-sql.conf.ext +/etc/dovecot/dovecot.conf diff --git a/dovecot-2.3-pigeonhole.configfiles b/dovecot-2.3-pigeonhole.configfiles new file mode 100644 index 0000000..d50fde7 --- /dev/null +++ b/dovecot-2.3-pigeonhole.configfiles @@ -0,0 +1,4 @@ +/etc/dovecot/conf.d/20-managesieve.conf +/etc/dovecot/conf.d/90-sieve-extprograms.conf +/etc/dovecot/conf.d/90-sieve.conf +/etc/dovecot/sieve-ldap.conf diff --git a/dovecot-2.3.configfiles b/dovecot-2.3.configfiles new file mode 100644 index 0000000..93ffe8f --- /dev/null +++ b/dovecot-2.3.configfiles @@ -0,0 +1,31 @@ +/etc/dovecot/README +/etc/dovecot/conf.d/10-auth.conf +/etc/dovecot/conf.d/10-director.conf +/etc/dovecot/conf.d/10-logging.conf +/etc/dovecot/conf.d/10-mail.conf +/etc/dovecot/conf.d/10-master.conf +/etc/dovecot/conf.d/10-ssl.conf +/etc/dovecot/conf.d/15-lda.conf +/etc/dovecot/conf.d/15-mailboxes.conf +/etc/dovecot/conf.d/20-imap.conf +/etc/dovecot/conf.d/20-lmtp.conf +/etc/dovecot/conf.d/20-pop3.conf +/etc/dovecot/conf.d/20-submission.conf +/etc/dovecot/conf.d/90-acl.conf +/etc/dovecot/conf.d/90-plugin.conf +/etc/dovecot/conf.d/90-quota.conf +/etc/dovecot/conf.d/auth-checkpassword.conf.ext +/etc/dovecot/conf.d/auth-deny.conf.ext +/etc/dovecot/conf.d/auth-dict.conf.ext +/etc/dovecot/conf.d/auth-ldap.conf.ext +/etc/dovecot/conf.d/auth-master.conf.ext +/etc/dovecot/conf.d/auth-passwdfile.conf.ext +/etc/dovecot/conf.d/auth-sql.conf.ext +/etc/dovecot/conf.d/auth-static.conf.ext +/etc/dovecot/conf.d/auth-system.conf.ext +/etc/dovecot/conf.d/auth-vpopmail.conf.ext +/etc/dovecot/dovecot-dict-auth.conf.ext +/etc/dovecot/dovecot-dict-sql.conf.ext +/etc/dovecot/dovecot-ldap.conf.ext +/etc/dovecot/dovecot-sql.conf.ext +/etc/dovecot/dovecot.conf diff --git a/dovecot.README.SUSE b/dovecot.README.SUSE new file mode 100644 index 0000000..8e48ff3 --- /dev/null +++ b/dovecot.README.SUSE @@ -0,0 +1,70 @@ +SSL support in dovecot: +----------------------- + +SSL is disabled pr. default, to enable create an SSL certificate, and modify +the dovecot configuration file accordingly. + +The easiest way to generate certificates is editing + +"/usr/share/doc/packages/dovecot/dovecot-openssl.cnf" + +and running + +"/usr/share/doc/packages/dovecot/mkcert.sh" + +to create the needed SSL certificate. afterwards set "ssl_disable" +in "/etc/dovecot/dovecot.conf" to "no". + +*This only affects 13.1 and newer as well as SLE 12 and newer:* + +In the past mkcert.sh create certificates into + +/etc/ssl/certs/dovecot.pem +/etc/ssl/private/dovecot.pem + +The script and documentation is now patched to use the following paths: + +/etc/ssl/private/dovecot.crt +/etc/ssl/private/dovecot.pem + +/etc/ssl/certs/ is maintained by p11kit on newer distros and should not +be used for service certificates. For your own certificate authority +certificates either create your own ca-certificates-yourname package or +install them into /etc/pki/trust/anchors/ and run +update-ca-certificates. + +This documentation is provided for older distributions so you can +prepare your system before upgrading to the newer distros. + +Modules location: +----------------- + +Since the libexec dir is /usr/lib(64) when conforming to FHS as SUSE LINUX +does, the modules should go to /usr/lib(64)/dovecot/modules/{imap,pop3}. + + +Configuration: +-------------- +Since SLE12 there is no cyrus-imap support. The new imap server is dovecot. + +Changes in autoyast. + may have following values: "local" | "procmail" + +There is no yast support for dovecot configuration. + +If you want to deliver local mails to dovecot follow this steps: +1. Set MAIL_CREATE_CONFIG to "no" in /etc/sysconfig/mail to prohibit yast2 to override your configuration. +2. Set mailbox_command = /usr/lib/dovecot/dovecot-lda -f "$SENDER" -a "$RECIPIENT" in /etc/postfix/main.cf +3. Set mail_location = maildir:~/Maildir or to your prefered value in /etc/dovecot/conf.d/10-mail.conf +4. Set a normal user as alias for root in /etc/aliases +5. Execute following comands: + postalias /etc/aliases + systemctl restart postfix + systemctl enable dovecot + systemctl start dovecot + +Apparmor-related issues +----------------------- + +There is an AppArmor policy in effect for all SUSE distributions limiting dovecot’s behaviour. If you want to have your mail storage somewhere else than in +~/Maildir/, ~/mail/, ~/Mail/, /var/vmail/, /var/mail/, or /var/spool/mail/ you need to edit /etc/apparmor.d/tunables/dovecot file to include appropriate directories (you always want to leave /var/mail and /var/spool/mail present). diff --git a/dovecot.changes b/dovecot.changes new file mode 100644 index 0000000..a9cbe34 --- /dev/null +++ b/dovecot.changes @@ -0,0 +1,158 @@ +------------------------------------------------------------------- +Fri Jan 24 21:54:11 UTC 2025 - Marcus Rueckert + +- update to 2.4 + Add unit files from 2.4 + +------------------------------------------------------------------- +Mon Feb 14 10:04:47 UTC 2022 - Dirk Stoecker + +- Fix changelog and permissions + +------------------------------------------------------------------- +Wed Apr 21 11:50:25 UTC 2021 - Peter Varkoly + +- (bsc#1185074) /var/run in /usr/lib/tmpfiles.d/dovecot.conf is + deprecated, please use /run instead + +------------------------------------------------------------------- +Fri Apr 16 10:58:13 UTC 2021 - Илья Индиго +- Refreshed spec-file via spec-cleaner and manual optimization. + * Removed file dovecot.init (droped SystemV support). + * Added parameter -p to all install command in spec-file. + * Added %{name} macro wherever possible. + +------------------------------------------------------------------- +Fri Nov 13 14:11:59 UTC 2020 - Thorsten Kukuk + +- Check first if they exist before creating user and group accounts + +------------------------------------------------------------------- +Thu Nov 5 14:33:43 UTC 2020 - Thorsten Kukuk + +- Use macro for systemd-tmpfiles call +- Pre-Require shadow if we use it in %pre + +------------------------------------------------------------------- +Wed Jul 15 14:29:02 UTC 2020 - Thorsten Kukuk + +- Remove unused systemd requires/defines. + +------------------------------------------------------------------- +Wed Jul 24 08:30:42 UTC 2019 - matthias.gerstner@suse.com + +- removal of SuSEfirewall2 service, since SuSEfirewall2 has been replaced by + firewalld, see [1]. + + [1]: https://lists.opensuse.org/opensuse-factory/2019-01/msg00490.html + +------------------------------------------------------------------- +Wed Jun 26 16:47:07 UTC 2019 - Matej Cepl + +- Add information about the interaction with Apparmor to README.SUSE + +------------------------------------------------------------------- +Sun Dec 24 02:10:16 UTC 2017 - mrueckert@suse.de + +- bump recommends to 2.3 + +------------------------------------------------------------------- +Sun Dec 24 02:07:20 UTC 2017 - mrueckert@suse.de + +- copy example config from /usr/share/dovecot/example-config/ + instead of the documentation directory. (boo#1070871) + +------------------------------------------------------------------- +Wed Dec 20 11:24:54 UTC 2017 - mrueckert@suse.de + +- bump to dovecot 2.3 + +------------------------------------------------------------------- +Mon Jun 15 14:04:40 UTC 2015 - mrueckert@suse.de + +- updated README.SUSE: + Remove all references /etc/ssl/certs/. It should not be used + anymore. (boo #932386) + + Please make sure you read README.SUSE after installing this + update. + +------------------------------------------------------------------- +Sat Nov 08 04:46:00 UTC 2014 - Led + +- fix bashisms in pre script + +------------------------------------------------------------------- +Thu Sep 18 14:22:32 UTC 2014 - mrueckert@suse.de + +- add reload support to the dovecot service file + +------------------------------------------------------------------- +Thu Sep 11 11:39:44 UTC 2014 - mrueckert@suse.de + +- also track the config files from the sieve support in the %ghost + +------------------------------------------------------------------- +Wed Sep 10 10:13:49 UTC 2014 - mrueckert@suse.de + +- make the /etc/dovecot handling consistent between dovecot and + dovecotXY. both now use: + %dir /etc/dovecot + %ghost %config(noreplace) /etc/dovecot/* + +------------------------------------------------------------------- +Mon Sep 8 23:16:05 UTC 2014 - mrueckert@suse.de + +- copy the correct file as init script in the non systemd case +- remove %buildroot from %pre script just in case we uncomment that + part at some point +- only have %post in the systemd case + +------------------------------------------------------------------- +Mon Sep 8 23:00:14 UTC 2014 - mrueckert@suse.de + +- we dont need a dovecot implementation at build time just at + install time. add BuildIgnore to get around the loop. + +------------------------------------------------------------------- +Fri Sep 5 15:56:35 UTC 2014 - mrueckert@suse.de + +- remove triggers again. when we handle the dovecot update problems + by manually stopping in %pre and manually starting up again in + %postun we dont need them anymore. + +------------------------------------------------------------------- +Fri Sep 5 13:03:30 UTC 2014 - mrueckert@suse.de + +- as we cant use service_del_preun we should still check if it is + the last package that we install otherwise we kill it + unconditionally + +------------------------------------------------------------------- +Fri Sep 5 12:51:40 UTC 2014 - mrueckert@suse.de + +- no longer restart the socket activation. this seems to kill the + dovecot. + +------------------------------------------------------------------- +Fri Sep 5 11:35:37 UTC 2014 - mrueckert@suse.de + +- move ldconfig to the versioned packages +- own the shared var directories. +- kick out the triggerin script as we dont need it. +- restart dovecot also when the module packages are updated + +------------------------------------------------------------------- +Fri Sep 5 11:18:40 UTC 2014 - mrueckert@suse.de + +- added trigger scripts + +------------------------------------------------------------------- +Fri Sep 5 10:59:11 UTC 2014 - mrueckert@suse.de + +- make the dovecot implementation a prereq + +------------------------------------------------------------------- +Thu Sep 4 13:44:06 UTC 2014 - mrueckert@suse.de + +- start an unversioned wrapper package again diff --git a/dovecot.pam b/dovecot.pam new file mode 100644 index 0000000..02eb463 --- /dev/null +++ b/dovecot.pam @@ -0,0 +1,6 @@ +#%PAM-1.0 +auth include common-auth +account include common-account +password include common-password +session include common-session + diff --git a/dovecot.service b/dovecot.service new file mode 100644 index 0000000..aa2a33a --- /dev/null +++ b/dovecot.service @@ -0,0 +1,36 @@ +# This file is part of Dovecot +# +# DO NOT CUSTOMIZE THIS FILE, INSTEAD +# create the file: +# `/etc/systemd/system/dovecot.service.d/service.conf'. +# or copy this as +# `/etc/systemd/system/dovecot.service` and edit then +# and put your changes there + +[Unit] +Description=Dovecot IMAP/POP3 email server +Documentation=man:dovecot(1) +Documentation=https://doc.dovecot.org/ +After=local-fs.target network-online.target remote-fs.target time-sync.target + +[Service] +Type=notify +ExecStart=/usr/sbin/dovecot -F +ExecReload=/usr/bin/doveadm reload +ExecStop=/usr/bin/doveadm stop +PrivateTmp=true +NonBlocking=yes +ProtectSystem=full +ProtectHome=no +PrivateDevices=true +OOMPolicy=continue + +# You can add environment variables with e.g.: +#Environment='CORE_OUTOFMEM=1' +# If you have trouble with `Too many open files', increase +LimitNOFILE=65535 +# If you want to allow the Dovecot services to produce core dumps, use: +#LimitCORE=infinity + +[Install] +WantedBy=multi-user.target diff --git a/dovecot.socket b/dovecot.socket new file mode 100644 index 0000000..a6bf420 --- /dev/null +++ b/dovecot.socket @@ -0,0 +1,15 @@ +[Unit] +Description=Dovecot IMAP/POP3 email server activation socket + +[Socket] +#dovecot expects separate IPv4 and IPv6 sockets +BindIPv6Only=ipv6-only +ListenStream=0.0.0.0:143 +ListenStream=[::]:143 +ListenStream=0.0.0.0:993 +ListenStream=[::]:993 +KeepAlive=true + +[Install] +WantedBy=sockets.target + diff --git a/dovecot.spec b/dovecot.spec new file mode 100644 index 0000000..868b0a6 --- /dev/null +++ b/dovecot.spec @@ -0,0 +1,126 @@ +# +# spec file for package dovecot +# +# Copyright (c) 2025 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: dovecot +Version: 2.3 +Release: 0 +Summary: IMAP and POP3 Server Written Primarily with Security in Mind +License: BSD-3-Clause AND LGPL-2.1-or-later AND MIT +Group: Productivity/Networking/Email/Servers +URL: http://www.dovecot.org/ +PreReq: dovecot-implementation +PreReq: shadow +Recommends: %{name}23 +#!BuildIgnore: dovecot-implementation +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildArch: noarch +Source0: %{name}-2.0.configfiles +Source1: %{name}-2.1.configfiles +Source2: %{name}-2.2.configfiles +Source4: %{name}.pam +Source5: %{name}.README.SUSE +Source7: %{name}.tmpfiles.d +Source8: %{name}.service +Source9: %{name}.socket +Source10: %{name}-2.1-pigeonhole.configfiles +Source11: %{name}-2.2-pigeonhole.configfiles +Source12: %{name}-2.3.configfiles +Source13: %{name}-2.3-pigeonhole.configfiles + +%description +Dovecot is an IMAP and POP3 server for Linux and UNIX-like systems, +written primarily with security in mind. Although it is written in C, +it uses several coding techniques to avoid most of the common pitfalls. + +Dovecot can work with standard mbox and maildir formats and is fully +compatible with UW-IMAP and Courier IMAP servers as well as mail +clients accessing the mailboxes directly. + +This is a wrapper package that will just handle common things for all +versioned dovecot packages. + +%prep + +%build + +%install +for i in $RPM_SOURCE_DIR/*.configfiles ; do + echo "Creating ghost files for '$i'" + for j in $(<$i) ; do + install -D -m 0644 /dev/null %{buildroot}$j + done +done + +install -D -p -m 0644 %{S:5} %{buildroot}%{_datadir}/doc/packages/%{name}/README.SUSE +install -d %{buildroot}%{_sbindir} +%{__install} -D -m 644 %{S:7} %{buildroot}%{_tmpfilesdir}/%{name}.conf +%{__ln_s} -f %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name} +install -D -p -m 0644 %{S:8} %{buildroot}%{_unitdir}/%{name}.service +install -D -p -m 0644 %{S:9} %{buildroot}%{_unitdir}/%{name}.socket + +# install pam config +%{__install} -D -p -m 0644 %{S:4} %{buildroot}%{_sysconfdir}/pam.d/%{name} +# create /var directories +%{__install} -p -m 0755 -Dd \ + %{buildroot}%{_var}/run/%{name}/login/ \ + %{buildroot}%{_var}/lib/%{name}/ + +%pre +getent group %{name} > /dev/null || /usr/sbin/groupadd -r %{name} >/dev/null 2>&1 || : +getent passwd %{name} > /dev/null || /usr/sbin/useradd -g %{name} -s /bin/false -r -c "User for Dovecot imapd" -d %{_var}/run/%{name} %{name} +getent passwd dovenull > /dev/null || /usr/sbin/useradd -g %{name} -s /bin/false -r -c "User for Dovecot login" -d %{_var}/run/%{name} dovenull +# try to copy the default configuration. +# +# we fail silently if the dovecot-implementation package is not +# installed yet. This allows us to break a little build loop between +# dovecot and dovecotXY. +if [ ! -e %{_sysconfdir}/%{name}/%{name}.conf -a -e %{_datadir}/%{name}/example-config/%{name}.conf ] ; then + # install default config + echo "Did not find a /etc/dovecot/dovecot.conf. copying default configuration" + cp -na %{_datadir}/%{name}/example-config/* %{_sysconfdir}/%{name}/ + # the chmod breaks the lda. lets use the more open permissions + #chmod -Rv o= %{_sysconfdir}/%{name}/ +fi +%service_add_pre %{name}.service %{name}.socket + +%preun +%service_del_preun %{name}.service %{name}.socket + +%post +%tmpfiles_create %{_tmpfilesdir}/%{name}.conf +%service_add_post %{name}.service %{name}.socket + +%postun +%service_del_postun %{name}.service + +%files +%defattr(-,root,root) +%doc %{_datadir}/doc/packages/%{name}/ +# conf +%dir /etc/%{name}/ +%ghost %config(noreplace) /etc/%{name}/* +%config(noreplace) %{_sysconfdir}/pam.d/%{name} +%{_sbindir}/rc%{name} +%{_tmpfilesdir}/%{name}.conf +%{_unitdir}/%{name}.service +%{_unitdir}/%{name}.socket +%dir %attr(0750,root,root) %{_localstatedir}/lib/%{name} +%ghost %dir /run/%{name} +%ghost %dir /run/%{name}/login + +%changelog diff --git a/dovecot.tmpfiles.d b/dovecot.tmpfiles.d new file mode 100644 index 0000000..30c4683 --- /dev/null +++ b/dovecot.tmpfiles.d @@ -0,0 +1,3 @@ +# Type Path Mode UID GID Age Argument +d /run/dovecot/ 0755 root root - - +d /run/dovecot/login/ 0750 root dovecot - - From 8129c277339389d6e898d3f8cd0c47df412886cae273225355be2aed029e19e1 Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Fri, 24 Jan 2025 23:36:36 +0000 Subject: [PATCH 2/2] - Add config files for dovecot 2.4 OBS-URL: https://build.opensuse.org/package/show/server:mail/dovecot?expand=0&rev=32 --- dovecot-2.4-pigeonhole.configfiles | 4 ++++ dovecot-2.4.configfiles | 1 + dovecot.changes | 5 +++++ dovecot.spec | 4 +++- 4 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 dovecot-2.4-pigeonhole.configfiles create mode 100644 dovecot-2.4.configfiles diff --git a/dovecot-2.4-pigeonhole.configfiles b/dovecot-2.4-pigeonhole.configfiles new file mode 100644 index 0000000..d50fde7 --- /dev/null +++ b/dovecot-2.4-pigeonhole.configfiles @@ -0,0 +1,4 @@ +/etc/dovecot/conf.d/20-managesieve.conf +/etc/dovecot/conf.d/90-sieve-extprograms.conf +/etc/dovecot/conf.d/90-sieve.conf +/etc/dovecot/sieve-ldap.conf diff --git a/dovecot-2.4.configfiles b/dovecot-2.4.configfiles new file mode 100644 index 0000000..5dc5433 --- /dev/null +++ b/dovecot-2.4.configfiles @@ -0,0 +1 @@ +/etc/dovecot/dovecot.conf diff --git a/dovecot.changes b/dovecot.changes index a9cbe34..d9ad76b 100644 --- a/dovecot.changes +++ b/dovecot.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jan 24 23:35:56 UTC 2025 - Marcus Rueckert + +- Add config files for dovecot 2.4 + ------------------------------------------------------------------- Fri Jan 24 21:54:11 UTC 2025 - Marcus Rueckert diff --git a/dovecot.spec b/dovecot.spec index 868b0a6..c5ed0d6 100644 --- a/dovecot.spec +++ b/dovecot.spec @@ -17,7 +17,7 @@ Name: dovecot -Version: 2.3 +Version: 2.4 Release: 0 Summary: IMAP and POP3 Server Written Primarily with Security in Mind License: BSD-3-Clause AND LGPL-2.1-or-later AND MIT @@ -41,6 +41,8 @@ Source10: %{name}-2.1-pigeonhole.configfiles Source11: %{name}-2.2-pigeonhole.configfiles Source12: %{name}-2.3.configfiles Source13: %{name}-2.3-pigeonhole.configfiles +Source14: %{name}-2.4.configfiles +Source15: %{name}-2.4-pigeonhole.configfiles %description Dovecot is an IMAP and POP3 server for Linux and UNIX-like systems,