summaryrefslogtreecommitdiff
path: root/net-mail/dovecot
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-06-13 22:21:26 -0500
committerroot <root@alpha.trunkmasters.com>2026-06-13 22:21:26 -0500
commitf997c3ee588099e4f43e9ec845935868e3e60b8e (patch)
tree07f0967cda575ee2edf2d62ed8c0f67855ae6bd3 /net-mail/dovecot
parentb589bc93e15b300c3e5318fe97241d57e464bea1 (diff)
downloadbaldeagleos-repo-f997c3ee588099e4f43e9ec845935868e3e60b8e.tar.gz
baldeagleos-repo-f997c3ee588099e4f43e9ec845935868e3e60b8e.tar.xz
baldeagleos-repo-f997c3ee588099e4f43e9ec845935868e3e60b8e.zip
Adding metadata
Diffstat (limited to 'net-mail/dovecot')
-rw-r--r--net-mail/dovecot/Manifest10
-rw-r--r--net-mail/dovecot/dovecot-2.3.21.1-r1.ebuild312
-rw-r--r--net-mail/dovecot/dovecot-2.4.2-r2.ebuild275
-rw-r--r--net-mail/dovecot/dovecot-2.4.2-r3.ebuild277
-rw-r--r--net-mail/dovecot/dovecot-2.4.2.ebuild244
-rw-r--r--net-mail/dovecot/dovecot-2.4.3-r1.ebuild274
-rw-r--r--net-mail/dovecot/dovecot-2.4.3.ebuild188
-rw-r--r--net-mail/dovecot/dovecot-2.4.4.ebuild189
-rw-r--r--net-mail/dovecot/files/50-misc.conf114
-rw-r--r--net-mail/dovecot/files/CVE-2022-30550.patch155
-rw-r--r--net-mail/dovecot/files/dovecot-2.3.19.1-slibtool.patch65
-rw-r--r--net-mail/dovecot/files/dovecot-2.3.21.1-gcc15-test.patch30
-rw-r--r--net-mail/dovecot/files/dovecot-2.3.21.1-lto-tests.patch86
-rw-r--r--net-mail/dovecot/files/dovecot-2.4.1-src_lib-ssl-iostream_iostream-openssl_c.patch14
-rw-r--r--net-mail/dovecot/files/dovecot-2.4.2-fix-32bit.patch28
-rw-r--r--net-mail/dovecot/files/dovecot-2.4.2-tests.patch70
-rw-r--r--net-mail/dovecot/files/dovecot-2.4.3-fix-32bit.patch76
-rw-r--r--net-mail/dovecot/files/dovecot-autoconf-lua-version-v2.patch15
-rw-r--r--net-mail/dovecot/files/dovecot-autoconf-lua-version-v3.patch18
-rw-r--r--net-mail/dovecot/files/dovecot-openssl-3.patch45
-rw-r--r--net-mail/dovecot/files/dovecot-socket-name-too-long.patch11
-rw-r--r--net-mail/dovecot/files/dovecot-typo-push.patch27
-rw-r--r--net-mail/dovecot/files/dovecot_openssl_common_h.patch11
-rw-r--r--net-mail/dovecot/metadata.xml12
24 files changed, 172 insertions, 2374 deletions
diff --git a/net-mail/dovecot/Manifest b/net-mail/dovecot/Manifest
index 8546f9172314..3852e8cff1ca 100644
--- a/net-mail/dovecot/Manifest
+++ b/net-mail/dovecot/Manifest
@@ -1,14 +1,4 @@
-DIST dovecot-2.3-pigeonhole-0.5.21.1.tar.gz 1956404 BLAKE2B ad0ea5c2c181aa9cdf12a7b58141a9812cad11e6ead4d4f38366e13589a84135db1998da179192a6e66a53240647906d96bb330982e7f2f204ba8c402f14cbbd SHA512 7387b417611599fe70d1a83d3b408321e66f5a883bf78a9d55c7496b1a17220677daebaefde2061e0d7064fe07c410ecfc64662878bb253ddcd9e128dd83fbaa
-DIST dovecot-2.3.21.1.tar.gz 7842044 BLAKE2B 3f4238a2f6a73bce1ed37d0def7dc2e61823173836879ed8b4ef5806b4403300335d551215fc4fb2ee8b4106276f84d16b24c2be53148b92da3f946a3b904e46 SHA512 9de6ce3a579ef2040248b692874a6d64a732bb735a9cee3144604927cad49690c4b0e29f7ecf3af23190d56f30956d955d13acd5d352534df62fbdfde4b60f9f
-DIST dovecot-2.4.2.tar.gz 7807240 BLAKE2B 20c3e0e4aea36cdd7e13a62ffc287cc3950a41a5d900ff00a48b2eba81ac2db85005c7fa6aec969d6615f4327fa0076572a607a0bbcbf620b6151dd09c6c09b7 SHA512 0524695341abe711d3a811c56156889d6fef7a09becc684c6f1dc1e5add605969ca8794eb7d44bfbc49f70515f22e8640b5828443addecfe4798fb8b174670ae
-DIST dovecot-2.4.2.tar.gz.sig 119 BLAKE2B ac61308ea7c61a68b642cf7913c0d5e4dd21d651aaeda2e3c1ab10055ce7f3f2d2966a024ca8724519d59722416216dab3424f3f324d98197ee078891a2d31b0 SHA512 38f050363fef9f97282e69fb24705d480b7684f79fadf69df0edc509487614c29d9d0fba382e0b37aee2529878f51564e3243fac9a6f767028039f36503a64fb
DIST dovecot-2.4.3.tar.gz 8191547 BLAKE2B fe54db76c923733467ac4e4065c7af836e9e8f43ceaa86fbdb24a42874b7ac6f195722908001da8b5acf34b755e76195d0dfd87e5e20c8582985eda0829aa402 SHA512 65adb931fe0207b3dc4a3e7ecb19734c922d05adad1f6cb9ac08c6517e085e569291624f14f3088487401e2bd3e0b1e221d23314e0379a6facfc66a858c27469
-DIST dovecot-2.4.3.tar.gz.sig 228 BLAKE2B 1f5cbb71bb9bcada3b0337bad4ccdf5cbfdd2a60138c7b62f5309f18aa1d83e88f9a91e3d0a5dae0db77b580834e94865450ed37f2bc15aa7896fb6396a09865 SHA512 0196174a07535c31eab6317dde2e63e533c38eaf26c634c35e06f138288b2fd6e0da41899c1953e8dbfdb26b0355c0063d84f3baa504f22ba0ebe3640860f768
DIST dovecot-2.4.4.tar.gz 8250124 BLAKE2B 975623aa8d6c42222526dd8a970ee825ac5dcc626d6166aaddcb8db1c64c64b57b9e3f2d2436916ccbb2a9900c300d7f0ccfe71f64b179d0f4998c490b2be711 SHA512 0af781b885759700bbfcd2cd42449c70a8fb6da49fc919debfdf7e58c278b49593fea8f67c542e817b8a3b8de48817fbe703415ce11f471db1396f2c8828b4d8
-DIST dovecot-2.4.4.tar.gz.sig 119 BLAKE2B b8f4cb8fabb90450b7bcc522f4201c19614d207e649bc1ee826b125f217a2626cc9fff0682ddf0a8ac281fd15639500db2d60edbd1448321cd0aa12ed9ab40c1 SHA512 fcc8fc743798f2a46b27513bfc472b78604ed897d19a046885f02e0af3720c247e6a58af92a618a32bf698db8bf30ac26ae79e16083fd4ddfc75f546f64a4a86
-DIST dovecot-pigeonhole-2.4.2.tar.gz 2071623 BLAKE2B 2364f8e58b348c45b3d03646e07949a8c71e1bb7bb856fd9db61a919f53ba8440ca54d0ed1e5b7110597ace03e2e1c1edf52a4fc086af1dd786a30f713806619 SHA512 82c46c7ac2792aa5c211c8b66309f9f21c05ecd2fa8ab3abf98fb4e05831fd37aaa3edffcfbe1b3defbb9ac8ef9df1c33ece83cf7524e8b226c4deab8c250134
-DIST dovecot-pigeonhole-2.4.2.tar.gz.sig 119 BLAKE2B 4c680a892fe3797de4c1e3d6f69790b0117e84ccfb65c74cc995f5cec5add13de9a88b9d6f8b197733759b65a793f345639f9e20c2cd42848ce686010666857c SHA512 8a4eeab00e148c9bf1d5e260e5884a10ceb589cf4f3b7e8219a37af3e28c02b18c91f1455adc33302e026617d66068e64bad9e60231642e0b2505fa5003f01f1
DIST dovecot-pigeonhole-2.4.3.tar.gz 2108099 BLAKE2B 99954ea50393e9199de45876859d3c26fca26539892760186632f15e28f7a8c8456637c634a40fb48c16f10a5bfb773ef768aac28fa8ee90ccb58d07dcee3eb1 SHA512 d66125f2a75ea5ea490d188a085fafb5f6a3767d8b9150c7772206eebb94c6116118711d05aba55970c2e0e3c68104cc908f5bedbe1ed9009f481d827718326e
-DIST dovecot-pigeonhole-2.4.3.tar.gz.sig 228 BLAKE2B 4c9ee70ff53eba04d8f724d64ac34c78a3d94199bde6c1fe4ee03cf2424790653450da76a98ac19ac6a7beaf318124fcaa63b057d74f6422219f499a2222681a SHA512 7985af4a03915ea411a3b577a0cb8af03c6b711f09b0800acdd58540d79c4aaacab0ddd4e0a5d1e90d7e204b004738f32c44543773805aaadb8398dc642cc848
DIST dovecot-pigeonhole-2.4.4.tar.gz 2149670 BLAKE2B 80c3b030fb0010dcb4f480f6941495fdea93e49aa4caab766ca8dc16830fc8f7b3fd2746c7272683fd0e61d6d97e6f5ff68b35a2029e180b207fa37429188f7a SHA512 32ae785f037a1bd044a3f5e224bf459d22b6303446c95c5d9cabc694b9eb008c57e77c31a17510c569efe45870b59f28e370e68ceafaf21400fe4000649f1fed
-DIST dovecot-pigeonhole-2.4.4.tar.gz.sig 119 BLAKE2B 5ef83bc611b943c61ea9f6cb00de2d6d77cb8748f3ab5ae1bbdd1b980940f2243810f69a59c2d1e7475b91e11fbb3ca7fc1f5e1da151e06792f92f5726cbcefd SHA512 6878edfbe0e31ece6308bedb9372e4c477bd17e4a0dc04e064ca7e34844371454cffd0867aec19874ba8243c0cd634fc469f8f886247255816052d8ba137acc9
diff --git a/net-mail/dovecot/dovecot-2.3.21.1-r1.ebuild b/net-mail/dovecot/dovecot-2.3.21.1-r1.ebuild
deleted file mode 100644
index 1483233534db..000000000000
--- a/net-mail/dovecot/dovecot-2.3.21.1-r1.ebuild
+++ /dev/null
@@ -1,312 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-LUA_COMPAT=( lua5-{1,3,4} luajit )
-# do not add a ssl USE flag. ssl is mandatory
-SSL_DEPS_SKIP=1
-inherit autotools flag-o-matic lua-single ssl-cert systemd toolchain-funcs
-
-MY_P="${P/_/.}"
-#MY_S="${PN}-ce-${PV}"
-major_minor="$(ver_cut 1-2)"
-sieve_version="0.5.21.1"
-if [[ ${PV} == *_rc* ]]; then
- rc_dir="rc/"
-else
- rc_dir=""
-fi
-
-DESCRIPTION="An IMAP and POP3 server written with security primarily in mind"
-HOMEPAGE="https://www.dovecot.org/"
-SRC_URI="https://dovecot.org/releases/${major_minor}/${rc_dir}${MY_P}.tar.gz
- sieve? (
- https://pigeonhole.dovecot.org/releases/${major_minor}/${rc_dir}${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz
- )
- managesieve? (
- https://pigeonhole.dovecot.org/releases/${major_minor}/${rc_dir}${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz
- ) "
-S="${WORKDIR}/${MY_P}"
-LICENSE="LGPL-2.1 MIT"
-SLOT="0/${PV}"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
-
-IUSE_DOVECOT_AUTH="kerberos ldap lua mysql pam postgres sqlite"
-IUSE_DOVECOT_COMPRESS="lz4 zstd"
-IUSE_DOVECOT_OTHER="argon2 caps doc lucene managesieve rpc
- selinux sieve solr static-libs stemmer suid systemd tcpd textcat unwind"
-
-IUSE="${IUSE_DOVECOT_AUTH} ${IUSE_DOVECOT_COMPRESS} ${IUSE_DOVECOT_OTHER}"
-
-REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )"
-
-DEPEND="
- app-arch/bzip2
- app-arch/xz-utils
- dev-libs/icu:=
- dev-libs/openssl:0=
- virtual/zlib:=
- virtual/libiconv
- argon2? ( dev-libs/libsodium:= )
- caps? ( sys-libs/libcap )
- kerberos? ( virtual/krb5 )
- ldap? ( net-nds/openldap:= )
- lua? ( ${LUA_DEPS} )
- lucene? ( >=dev-cpp/clucene-2.3 )
- lz4? ( app-arch/lz4 )
- mysql? ( dev-db/mysql-connector-c:0= )
- pam? ( sys-libs/pam:= )
- postgres? ( dev-db/postgresql:* )
- rpc? ( net-libs/libtirpc:= net-libs/rpcsvc-proto )
- selinux? ( sec-policy/selinux-dovecot )
- solr? ( net-misc/curl dev-libs/expat )
- sqlite? ( dev-db/sqlite:* )
- stemmer? ( dev-libs/snowball-stemmer:= )
- suid? ( acct-group/mail )
- systemd? ( sys-apps/systemd:= )
- tcpd? ( sys-apps/tcp-wrappers )
- textcat? ( app-text/libexttextcat )
- unwind? ( sys-libs/libunwind:= )
- zstd? ( app-arch/zstd:= )
- virtual/libcrypt:=
- "
-
-RDEPEND="
- ${DEPEND}
- acct-group/dovecot
- acct-group/dovenull
- acct-user/dovecot
- acct-user/dovenull
- net-mail/mailbase[pam?]
- "
-
-PATCHES=(
- "${FILESDIR}/${PN}"-autoconf-lua-version-v2.patch
- "${FILESDIR}/${PN}"-socket-name-too-long.patch
- "${FILESDIR}/${PN}"-2.3.19.1-slibtool.patch # 782631
- "${FILESDIR}"/CVE-2022-30550.patch
- "${FILESDIR}/${PN}"-openssl-3.patch
- "${FILESDIR}/${PN}"-typo-push.patch
- "${FILESDIR}/${PN}"-2.3.21.1-lto-tests.patch
- "${FILESDIR}/${PN}"-2.3.21.1-gcc15-test.patch
-)
-
-pkg_setup() {
- use lua && lua-single_pkg_setup
- if use managesieve && ! use sieve; then
- ewarn "managesieve USE flag selected but sieve USE flag unselected"
- ewarn "sieve USE flag will be turned on"
- fi
-}
-
-src_prepare() {
- default
- # bug 657108, 782631
- #elibtoolize
- eautoreconf
-
- # Bug #727244
- append-cflags -fasynchronous-unwind-tables
-
- # Can be dropped with 2.4.x (bug #947906)
- append-cflags -std=gnu17
-}
-
-src_configure() {
- local conf=""
-
- if use postgres || use mysql || use sqlite; then
- conf="${conf} --with-sql"
- fi
-
- # --disable-hardening because our toolchain already defaults to
- # these bits on, and it actually regresses the default _FORTIFY_SOURCE
- # level for hardened at least from 3 to 2.
- #
- # turn valgrind tests off. Bug #340791
- VALGRIND=no \
- LUAPC="${ELUA}" \
- systemdsystemunitdir="$(systemd_get_systemunitdir)" \
- econf \
- --with-rundir="${EPREFIX}/run/dovecot" \
- --with-statedir="${EPREFIX}/var/lib/dovecot" \
- --with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \
- --disable-hardening \
- --disable-rpath \
- --with-bzlib \
- --without-libbsd \
- --with-lzma \
- --with-icu \
- --with-ssl \
- --with-zlib \
- $( use_with argon2 sodium ) \
- $( use_with caps libcap ) \
- $( use_with kerberos gssapi ) \
- $( use_with lua ) \
- $( use_with ldap ) \
- $( use_with lucene ) \
- $( use_with lz4 ) \
- $( use_with mysql ) \
- $( use_with pam ) \
- $( use_with postgres pgsql ) \
- $( use_with sqlite ) \
- $( use_with solr ) \
- $( use_with stemmer ) \
- $( use_with systemd ) \
- $( use_with tcpd libwrap ) \
- $( use_with textcat ) \
- $( use_with unwind libunwind ) \
- $( use_with zstd ) \
- $( use_enable static-libs static ) \
- ${conf}
-
- if use sieve || use managesieve; then
- # The sieve plugin needs this file to be build to determine the plugin
- # directory and the list of libraries to link to.
- emake dovecot-config
- cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
- econf \
- $( use_enable static-libs static ) \
- --localstatedir="${EPREFIX}/var" \
- --enable-shared \
- --with-dovecot="${S}" \
- $( use_with ldap ) \
- $( use_with managesieve )
- fi
-}
-
-src_compile() {
- default
- if use sieve || use managesieve; then
- cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
- emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
- fi
-}
-
-src_test() {
- # bug #340791 and bug #807178
- local -x NOVALGRIND=true
-
- default
- if use sieve || use managesieve; then
- cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
- default
- fi
-}
-
-src_install() {
- default
-
- if use suid; then
- einfo "Changing perms to allow deliver to be suided"
- fowners root:mail "/usr/libexec/dovecot/dovecot-lda"
- fperms 4750 "/usr/libexec/dovecot/dovecot-lda"
- fi
-
- newinitd "${FILESDIR}"/dovecot.init-r6 dovecot
-
- rm -rf "${ED}"/usr/share/doc/dovecot
-
- dodoc AUTHORS NEWS README TODO
- dodoc doc/*.{txt,cnf,xml,sh}
- docinto example-config
- dodoc doc/example-config/*.{conf,ext}
- docinto example-config/conf.d
- dodoc doc/example-config/conf.d/*.{conf,ext}
- docinto wiki
- dodoc doc/wiki/*
- doman doc/man/*.{1,7}
-
- # Create the dovecot.conf file from the dovecot-example.conf file that
- # the dovecot folks nicely left for us....
- local conf="${ED}/etc/dovecot/dovecot.conf"
- local confd="${ED}/etc/dovecot/conf.d"
-
- insinto /etc/dovecot
- doins doc/example-config/*.{conf,ext}
- insinto /etc/dovecot/conf.d
- doins doc/example-config/conf.d/*.{conf,ext}
- fperms 0600 /etc/dovecot/dovecot-{ldap,sql}.conf.ext
- rm -f "${confd}/../README"
-
- # .maildir is the Gentoo default
- local mail_location="maildir:~/.maildir"
- sed -i -e \
- "s|#mail_location =|mail_location = ${mail_location}|" \
- "${confd}/10-mail.conf" \
- || die "failed to update mail location settings in 10-mail.conf"
-
- # We're using pam files (imap and pop3) provided by mailbase
- if use pam; then
- sed -i -e '/driver = pam/,/^[ \t]*}/ s|#args = dovecot|args = "\*"|' \
- "${confd}/auth-system.conf.ext" \
- || die "failed to update PAM settings in auth-system.conf.ext"
- # mailbase does not provide a sieve pam file
- use managesieve && dosym imap /etc/pam.d/sieve
- sed -i -e \
- 's/#!include auth-system.conf.ext/!include auth-system.conf.ext/' \
- "${confd}/10-auth.conf" \
- || die "failed to update PAM settings in 10-auth.conf"
- fi
-
- # Update ssl cert locations
- sed -i -e 's:^#ssl = yes:ssl = yes:' "${confd}/10-ssl.conf" \
- || die "ssl conf failed"
- sed -i -e 's:^ssl_cert =.*:ssl_cert = </etc/ssl/dovecot/server.pem:' \
- -e 's:^ssl_key =.*:ssl_key = </etc/ssl/dovecot/server.key:' \
- "${confd}/10-ssl.conf" || die "failed to update SSL settings in 10-ssl.conf"
-
- # Install SQL configuration
- if use mysql || use postgres; then
- sed -i -e \
- 's/#!include auth-sql.conf.ext/!include auth-sql.conf.ext/' \
- "${confd}/10-auth.conf" || die "failed to update SQL settings in \
- 10-auth.conf"
- fi
-
- # Install LDAP configuration
- if use ldap; then
- sed -i -e \
- 's/#!include auth-ldap.conf.ext/!include auth-ldap.conf.ext/' \
- "${confd}/10-auth.conf" \
- || die "failed to update ldap settings in 10-auth.conf"
- fi
-
- if use sieve || use managesieve; then
- cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
- emake DESTDIR="${ED}" install
- sed -i -e \
- 's/^[[:space:]]*#mail_plugins = $mail_plugins/mail_plugins = sieve/' "${confd}/15-lda.conf" \
- || die "failed to update sieve settings in 15-lda.conf"
- rm -rf "${ED}"/usr/share/doc/dovecot
- docinto example-config/conf.d
- dodoc doc/example-config/conf.d/*.conf
- insinto /etc/dovecot/conf.d
- doins doc/example-config/conf.d/90-sieve{,-extprograms}.conf
- use managesieve && doins doc/example-config/conf.d/20-managesieve.conf
- docinto sieve/rfc
- dodoc doc/rfc/*.txt
- docinto sieve/devel
- dodoc doc/devel/DESIGN
- docinto plugins
- dodoc doc/plugins/*.txt
- docinto extensions
- dodoc doc/extensions/*.txt
- docinto locations
- dodoc doc/locations/*.txt
- doman doc/man/*.{1,7}
- fi
-
- use static-libs || find "${ED}"/usr/lib* -name '*.la' -delete
-}
-
-pkg_postinst() {
- # Let's not make a new certificate if we already have one
- if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \
- -e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then
- einfo "Creating SSL certificate"
- SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}"
- install_cert /etc/ssl/dovecot/server
- fi
-}
diff --git a/net-mail/dovecot/dovecot-2.4.2-r2.ebuild b/net-mail/dovecot/dovecot-2.4.2-r2.ebuild
deleted file mode 100644
index 0d9903a175ea..000000000000
--- a/net-mail/dovecot/dovecot-2.4.2-r2.ebuild
+++ /dev/null
@@ -1,275 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-LUA_COMPAT=( lua5-{1,3,4} luajit )
-# do not add a ssl USE flag. ssl is mandatory
-SSL_DEPS_SKIP=1
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/dovecot.asc
-inherit autotools dot-a eapi9-ver flag-o-matic lua-single ssl-cert systemd
-inherit toolchain-funcs verify-sig
-
-MY_P="${P/_/.}"
-MY_PV="${PV}"
-major_minor="$(ver_cut 1-2)"
-
-DESCRIPTION="An IMAP and POP3 server written with security primarily in mind"
-HOMEPAGE="https://www.dovecot.org/"
-SRC_URI="https://www.dovecot.org/releases/${major_minor}/${MY_P}.tar.gz
- sieve? (
- https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-pigeonhole-${MY_PV}.tar.gz
- verify-sig? (
- https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-pigeonhole-${MY_PV}.tar.gz.sig
- )
- )
- managesieve? (
- https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-pigeonhole-${MY_PV}.tar.gz
- verify-sig? (
- https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-pigeonhole-${MY_PV}.tar.gz.sig
- )
- )
- verify-sig? (
- https://www.dovecot.org/releases/${major_minor}/${MY_P}.tar.gz.sig
- ) "
-S="${WORKDIR}/${MY_P}"
-PIEGONHOLE_S="../dovecot-pigeonhole-${MY_PV}"
-LICENSE="LGPL-2.1 MIT"
-SLOT="0/${PV}"
-KEYWORDS="amd64 ~arm arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
-
-IUSE_DOVECOT_AUTH_DICT="cdb kerberos ldap lua mysql pam postgres sqlite"
-IUSE_DOVECOT_COMPRESS="lz4 zstd"
-IUSE_DOVECOT_FTS="solr stemmer textcat xapian"
-IUSE_DOVECOT_OTHER="argon2 managesieve selinux sieve static-libs suid systemd system-icu test unwind"
-
-IUSE="${IUSE_DOVECOT_AUTH_DICT} ${IUSE_DOVECOT_COMPRESS} ${IUSE_DOVECOT_FTS} ${IUSE_DOVECOT_OTHER}"
-
-REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )"
-RESTRICT="!test? ( test )"
-
-DEPEND="
- app-arch/bzip2
- dev-libs/openssl:0=
- net-libs/libtirpc:=
- dev-libs/libpcre2:0[pcre32]
- net-libs/rpcsvc-proto
- sys-libs/libcap
- virtual/zlib:=
- virtual/libcrypt:=
- virtual/libiconv
- argon2? ( dev-libs/libsodium:= )
- cdb? ( dev-db/tinycdb )
- kerberos? ( virtual/krb5 )
- ldap? ( net-nds/openldap:= )
- lua? ( ${LUA_DEPS} )
- xapian? ( dev-libs/xapian:= )
- lz4? ( app-arch/lz4 )
- mysql? ( dev-db/mysql-connector-c:0= )
- pam? ( sys-libs/pam:= )
- postgres? ( dev-db/postgresql:* )
- selinux? ( sec-policy/selinux-dovecot )
- solr? ( net-misc/curl dev-libs/expat )
- sqlite? ( dev-db/sqlite:* )
- stemmer? ( dev-libs/snowball-stemmer:= )
- system-icu? ( dev-libs/icu:= )
- suid? ( acct-group/mail )
- systemd? ( sys-apps/systemd:= )
- textcat? ( app-text/libexttextcat )
- unwind? ( sys-libs/libunwind:= )
- zstd? ( app-arch/zstd:= )
- "
-
-RDEPEND="
- ${DEPEND}
- acct-group/dovecot
- acct-group/dovenull
- acct-user/dovecot
- acct-user/dovenull
- net-mail/mailbase[pam?]
- "
-
-BDEPEND="virtual/pkgconfig
- test? (
- lua? (
- $(lua_gen_cond_dep '
- dev-lua/luajson[${LUA_USEDEP}]
- ')
- )
- )
- verify-sig? ( sec-keys/openpgp-keys-dovecot )
- "
-
-PATCHES=(
- "${FILESDIR}/${PN}-autoconf-lua-version-v3.patch"
- "${FILESDIR}/${PN}-2.4.2-tests.patch"
-)
-
-pkg_setup() {
- use lua && lua-single_pkg_setup
- if use managesieve && ! use sieve; then
- ewarn "managesieve USE flag selected but sieve USE flag unselected"
- ewarn "sieve USE flag will be turned on"
- fi
-}
-
-src_unpack() {
- if use verify-sig; then
- verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.gz{,.sig}
- use sieve && verify-sig_verify_detached "${DISTDIR}"/${PN}-pigeonhole-${MY_PV}.tar.gz{,.sig}
- use managesieve && verify-sig_verify_detached "${DISTDIR}"/${PN}-pigeonhole-${MY_PV}.tar.gz{,.sig}
- fi
-
- default
-}
-
-src_prepare() {
- default
-
- if use sieve || use managesieve; then
- pushd "${PIEGONHOLE_S}" > /dev/null || die
- eapply "${FILESDIR}/${PN}-2.4.2-fix-32bit.patch"
- popd > /dev/null || die
- fi
-
- # rename default cert files
- sed -i -e "s:ssl-cert.pem:server.pem:" \
- -e "s:ssl-key.pem:server.key:" \
- doc/dovecot.conf.in || die "sed failed"
-
- # bug 657108, 782631
- #elibtoolize
- eautoreconf
-
- # Bug #727244
- append-cflags -fasynchronous-unwind-tables
-}
-
-src_configure() {
- use static-libs && lto-guarantee-fat
-
- # --disable-hardening because our toolchain already defaults to
- # these bits on, and it actually regresses the default _FORTIFY_SOURCE
- # level for hardened at least from 3 to 2.
- #
- # turn valgrind tests off. Bug #340791
- VALGRIND=no \
- LUAPC="${ELUA}" \
- systemdsystemunitdir="$(systemd_get_systemunitdir)" \
- econf \
- --with-rundir="${EPREFIX}/run/dovecot" \
- --with-statedir="${EPREFIX}/var/lib/dovecot" \
- --with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \
- --disable-hardening \
- --with-bzlib \
- --without-libbsd \
- --with-libcap \
- --enable-experimental-mail-utf8 \
- $( use_with argon2 sodium ) \
- $( use_with cdb) \
- $( use_with system-icu icu) \
- $( use_with kerberos gssapi ) \
- $( use_with lua ) \
- $( use_with ldap ) \
- $( use_with xapian flatcurve ) \
- $( use_with lz4 ) \
- $( use_with mysql ) \
- $( use_with pam ) \
- $( use_with postgres pgsql ) \
- $( use_with sqlite ) \
- $( use_with solr ) \
- $( use_with stemmer ) \
- $( use_with systemd ) \
- $( use_with textcat ) \
- $( use_with unwind libunwind ) \
- $( use_with zstd ) \
- $( use_enable static-libs static )
-
- if use sieve || use managesieve; then
- # The sieve plugin needs this file to be build to determine the plugin
- # directory and the list of libraries to link to
- emake dovecot-config
- pushd "${PIEGONHOLE_S}" > /dev/null || die
- econf \
- $( use_enable static-libs static ) \
- --localstatedir="${EPREFIX}/var" \
- --enable-shared \
- --disable-hardening \
- --with-dovecot="${S}" \
- $( use_with ldap ) \
- $( use_with managesieve )
- popd > /dev/null || die
- fi
-}
-
-src_compile() {
- default
- if use sieve || use managesieve; then
- pushd "${PIEGONHOLE_S}" > /dev/null || die
- emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
- popd > /dev/null || die
- fi
-}
-
-src_test() {
- # bug #340791 and bug #807178
- local -x NOVALGRIND=true
-
- default
- if use sieve || use managesieve; then
- pushd "${PIEGONHOLE_S}" > /dev/null || die
- default
- popd > /dev/null || die
- fi
-}
-
-src_install() {
- default
-
- if use suid; then
- einfo "Changing perms to allow deliver to be suided"
- fowners root:mail "/usr/libexec/dovecot/dovecot-lda"
- fperms 4750 "/usr/libexec/dovecot/dovecot-lda"
- fi
-
- newinitd "${FILESDIR}"/dovecot.init-r6 dovecot
-
- use pam && dosym imap /etc/pam.d/dovecot
-
- insinto /etc/dovecot/conf.d
- doins "${FILESDIR}/50-misc.conf"
-
- dodoc AUTHORS NEWS README.md TODO
-
- if use sieve || use managesieve; then
- pushd "${PIEGONHOLE_S}" > /dev/null || die
- emake DESTDIR="${ED}" install
-
- newdoc README README.pigeonhole
- popd > /dev/null || die
- fi
-
- if use static-libs; then
- strip-lto-bytecode
- else
- find "${ED}"/usr/lib* -name '*.la' -delete
- fi
-}
-
-pkg_postinst() {
- if ver_replacing -lt 2.4 ; then
- # This is an upgrade which requires user review
- ewarn "Dovecot-2.4.x has new settings and WILL NOT work"
- ewarn "unless the configuration files are updated."
- ewarn "Please read the migration guide at:"
- ewarn " https://doc.dovecot.org/2.4.1/installation/upgrade/2.3-to-2.4.html"
- fi
-
- # Let's not make a new certificate if we already have one
- if ! [[ -e "${ROOT}"/etc/dovecot/server.pem && \
- -e "${ROOT}"/etc/dovecot/server.key ]]; then
- einfo "Creating SSL certificate"
- SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}"
- install_cert /etc/dovecot/server
- fi
-}
diff --git a/net-mail/dovecot/dovecot-2.4.2-r3.ebuild b/net-mail/dovecot/dovecot-2.4.2-r3.ebuild
deleted file mode 100644
index 292c448263a5..000000000000
--- a/net-mail/dovecot/dovecot-2.4.2-r3.ebuild
+++ /dev/null
@@ -1,277 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-LUA_COMPAT=( lua5-{1,3,4} luajit )
-# do not add a ssl USE flag. ssl is mandatory
-SSL_DEPS_SKIP=1
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/dovecot.asc
-inherit autotools dot-a eapi9-ver flag-o-matic lua-single ssl-cert systemd
-inherit toolchain-funcs verify-sig
-
-MY_P="${P/_/.}"
-MY_PV="${PV}"
-major_minor="$(ver_cut 1-2)"
-
-DESCRIPTION="An IMAP and POP3 server written with security primarily in mind"
-HOMEPAGE="https://www.dovecot.org/"
-SRC_URI="https://www.dovecot.org/releases/${major_minor}/${MY_P}.tar.gz
- sieve? (
- https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-pigeonhole-${MY_PV}.tar.gz
- verify-sig? (
- https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-pigeonhole-${MY_PV}.tar.gz.sig
- )
- )
- managesieve? (
- https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-pigeonhole-${MY_PV}.tar.gz
- verify-sig? (
- https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-pigeonhole-${MY_PV}.tar.gz.sig
- )
- )
- verify-sig? (
- https://www.dovecot.org/releases/${major_minor}/${MY_P}.tar.gz.sig
- ) "
-S="${WORKDIR}/${MY_P}"
-PIEGONHOLE_S="../dovecot-pigeonhole-${MY_PV}"
-LICENSE="LGPL-2.1 MIT"
-SLOT="0/${PV}"
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
-
-IUSE_DOVECOT_AUTH_DICT="cdb kerberos ldap lua mysql pam postgres sqlite"
-IUSE_DOVECOT_COMPRESS="lz4 zstd"
-IUSE_DOVECOT_FTS="solr stemmer textcat xapian"
-IUSE_DOVECOT_OTHER="argon2 managesieve selinux sieve static-libs suid systemd system-icu test unwind"
-
-IUSE="${IUSE_DOVECOT_AUTH_DICT} ${IUSE_DOVECOT_COMPRESS} ${IUSE_DOVECOT_FTS} ${IUSE_DOVECOT_OTHER}"
-
-REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )"
-RESTRICT="!test? ( test )"
-
-DEPEND="
- app-arch/bzip2
- dev-libs/openssl:0=
- net-libs/libtirpc:=
- dev-libs/libpcre2:0[pcre32]
- net-libs/rpcsvc-proto
- sys-libs/libcap
- virtual/zlib:=
- virtual/libcrypt:=
- virtual/libiconv
- argon2? ( dev-libs/libsodium:= )
- cdb? ( dev-db/tinycdb )
- kerberos? ( virtual/krb5 )
- ldap? ( net-nds/openldap:= )
- lua? ( ${LUA_DEPS} )
- xapian? ( dev-libs/xapian:= )
- lz4? ( app-arch/lz4 )
- mysql? ( dev-db/mysql-connector-c:0= )
- pam? ( sys-libs/pam:= )
- postgres? ( dev-db/postgresql:* )
- selinux? ( sec-policy/selinux-dovecot )
- solr? ( net-misc/curl dev-libs/expat )
- sqlite? ( dev-db/sqlite:* )
- stemmer? ( dev-libs/snowball-stemmer:= )
- system-icu? ( dev-libs/icu:= )
- suid? ( acct-group/mail )
- systemd? ( sys-apps/systemd:= )
- textcat? ( app-text/libexttextcat )
- unwind? ( sys-libs/libunwind:= )
- zstd? ( app-arch/zstd:= )
- "
-
-RDEPEND="
- ${DEPEND}
- acct-group/dovecot
- acct-group/dovenull
- acct-user/dovecot
- acct-user/dovenull
- net-mail/mailbase[pam?]
- "
-
-BDEPEND="virtual/pkgconfig
- test? (
- lua? (
- $(lua_gen_cond_dep '
- dev-lua/luajson[${LUA_USEDEP}]
- ')
- )
- )
- verify-sig? ( sec-keys/openpgp-keys-dovecot )
- "
-
-PATCHES=(
- "${FILESDIR}/${PN}-autoconf-lua-version-v3.patch"
- "${FILESDIR}/${PN}-2.4.2-tests.patch"
-)
-
-pkg_setup() {
- use lua && lua-single_pkg_setup
- if use managesieve && ! use sieve; then
- ewarn "managesieve USE flag selected but sieve USE flag unselected"
- ewarn "sieve USE flag will be turned on"
- fi
-}
-
-src_unpack() {
- if use verify-sig; then
- verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.gz{,.sig}
- use sieve && verify-sig_verify_detached "${DISTDIR}"/${PN}-pigeonhole-${MY_PV}.tar.gz{,.sig}
- use managesieve && verify-sig_verify_detached "${DISTDIR}"/${PN}-pigeonhole-${MY_PV}.tar.gz{,.sig}
- fi
-
- default
-}
-
-src_prepare() {
- default
-
- if use sieve || use managesieve; then
- pushd "${PIEGONHOLE_S}" > /dev/null || die
- eapply "${FILESDIR}/${PN}-2.4.2-fix-32bit.patch"
- popd > /dev/null || die
- fi
-
- # rename default cert files
- sed -i -e "s:ssl-cert.pem:server.pem:" \
- -e "s:ssl-key.pem:server.key:" \
- doc/dovecot.conf.in || die "sed failed"
-
- # bug 657108, 782631
- #elibtoolize
- eautoreconf
-
- # Bug #727244
- append-cflags -fasynchronous-unwind-tables
- # Bug #971191
- append-cflags -fno-strict-aliasing
-}
-
-src_configure() {
- use static-libs && lto-guarantee-fat
-
- # --disable-hardening because our toolchain already defaults to
- # these bits on, and it actually regresses the default _FORTIFY_SOURCE
- # level for hardened at least from 3 to 2.
- #
- # turn valgrind tests off. Bug #340791
- VALGRIND=no \
- LUAPC="${ELUA}" \
- systemdsystemunitdir="$(systemd_get_systemunitdir)" \
- econf \
- --with-rundir="${EPREFIX}/run/dovecot" \
- --with-statedir="${EPREFIX}/var/lib/dovecot" \
- --with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \
- --disable-hardening \
- --with-bzlib \
- --without-libbsd \
- --with-libcap \
- --enable-experimental-mail-utf8 \
- $( use_with argon2 sodium ) \
- $( use_with cdb) \
- $( use_with system-icu icu) \
- $( use_with kerberos gssapi ) \
- $( use_with lua ) \
- $( use_with ldap ) \
- $( use_with xapian flatcurve ) \
- $( use_with lz4 ) \
- $( use_with mysql ) \
- $( use_with pam ) \
- $( use_with postgres pgsql ) \
- $( use_with sqlite ) \
- $( use_with solr ) \
- $( use_with stemmer ) \
- $( use_with systemd ) \
- $( use_with textcat ) \
- $( use_with unwind libunwind ) \
- $( use_with zstd ) \
- $( use_enable static-libs static )
-
- if use sieve || use managesieve; then
- # The sieve plugin needs this file to be build to determine the plugin
- # directory and the list of libraries to link to
- emake dovecot-config
- pushd "${PIEGONHOLE_S}" > /dev/null || die
- econf \
- $( use_enable static-libs static ) \
- --localstatedir="${EPREFIX}/var" \
- --enable-shared \
- --disable-hardening \
- --with-dovecot="${S}" \
- $( use_with ldap ) \
- $( use_with managesieve )
- popd > /dev/null || die
- fi
-}
-
-src_compile() {
- default
- if use sieve || use managesieve; then
- pushd "${PIEGONHOLE_S}" > /dev/null || die
- emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
- popd > /dev/null || die
- fi
-}
-
-src_test() {
- # bug #340791 and bug #807178
- local -x NOVALGRIND=true
-
- default
- if use sieve || use managesieve; then
- pushd "${PIEGONHOLE_S}" > /dev/null || die
- default
- popd > /dev/null || die
- fi
-}
-
-src_install() {
- default
-
- if use suid; then
- einfo "Changing perms to allow deliver to be suided"
- fowners root:mail "/usr/libexec/dovecot/dovecot-lda"
- fperms 4750 "/usr/libexec/dovecot/dovecot-lda"
- fi
-
- newinitd "${FILESDIR}"/dovecot.init-r6 dovecot
-
- use pam && dosym imap /etc/pam.d/dovecot
-
- insinto /etc/dovecot/conf.d
- doins "${FILESDIR}/50-misc.conf"
-
- dodoc AUTHORS NEWS README.md TODO
-
- if use sieve || use managesieve; then
- pushd "${PIEGONHOLE_S}" > /dev/null || die
- emake DESTDIR="${ED}" install
-
- newdoc README README.pigeonhole
- popd > /dev/null || die
- fi
-
- if use static-libs; then
- strip-lto-bytecode
- else
- find "${ED}"/usr/lib* -name '*.la' -delete
- fi
-}
-
-pkg_postinst() {
- if ver_replacing -lt 2.4 ; then
- # This is an upgrade which requires user review
- ewarn "Dovecot-2.4.x has new settings and WILL NOT work"
- ewarn "unless the configuration files are updated."
- ewarn "Please read the migration guide at:"
- ewarn " https://doc.dovecot.org/2.4.1/installation/upgrade/2.3-to-2.4.html"
- fi
-
- # Let's not make a new certificate if we already have one
- if ! [[ -e "${ROOT}"/etc/dovecot/server.pem && \
- -e "${ROOT}"/etc/dovecot/server.key ]]; then
- einfo "Creating SSL certificate"
- SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}"
- install_cert /etc/dovecot/server
- fi
-}
diff --git a/net-mail/dovecot/dovecot-2.4.2.ebuild b/net-mail/dovecot/dovecot-2.4.2.ebuild
deleted file mode 100644
index 03424fba4070..000000000000
--- a/net-mail/dovecot/dovecot-2.4.2.ebuild
+++ /dev/null
@@ -1,244 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-LUA_COMPAT=( lua5-{1,3,4} luajit )
-# do not add a ssl USE flag. ssl is mandatory
-SSL_DEPS_SKIP=1
-inherit autotools eapi9-ver flag-o-matic lua-single ssl-cert systemd toolchain-funcs
-
-MY_P="${P/_/.}"
-MY_PV="${PV}"
-major_minor="$(ver_cut 1-2)"
-
-DESCRIPTION="An IMAP and POP3 server written with security primarily in mind"
-HOMEPAGE="https://www.dovecot.org/"
-SRC_URI="https://www.dovecot.org/releases/${major_minor}/${MY_P}.tar.gz
- sieve? (
- https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-pigeonhole-${MY_PV}.tar.gz
- )
- managesieve? (
- https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-pigeonhole-${MY_PV}.tar.gz
- ) "
-S="${WORKDIR}/${MY_P}"
-PIEGONHOLE_S="../dovecot-pigeonhole-${MY_PV}"
-LICENSE="LGPL-2.1 MIT"
-SLOT="0/${PV}"
-KEYWORDS="amd64 ~arm arm64 ~hppa ~mips ~ppc ppc64 ~riscv ~sparc ~x86"
-
-IUSE_DOVECOT_AUTH_DICT="cdb kerberos ldap lua mysql pam postgres sqlite"
-IUSE_DOVECOT_COMPRESS="lz4 zstd"
-IUSE_DOVECOT_FTS="solr stemmer textcat xapian"
-IUSE_DOVECOT_OTHER="argon2 managesieve selinux sieve static-libs suid systemd system-icu test unwind"
-
-IUSE="${IUSE_DOVECOT_AUTH_DICT} ${IUSE_DOVECOT_COMPRESS} ${IUSE_DOVECOT_FTS} ${IUSE_DOVECOT_OTHER}"
-
-REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )"
-RESTRICT="!test? ( test )"
-
-DEPEND="
- app-arch/bzip2
- dev-libs/openssl:0=
- net-libs/libtirpc:=
- dev-libs/libpcre2:0[pcre32]
- net-libs/rpcsvc-proto
- sys-libs/libcap
- virtual/zlib:=
- virtual/libcrypt:=
- virtual/libiconv
- argon2? ( dev-libs/libsodium:= )
- cdb? ( dev-db/tinycdb )
- kerberos? ( virtual/krb5 )
- ldap? ( net-nds/openldap:= )
- lua? ( ${LUA_DEPS} )
- xapian? ( dev-libs/xapian:= )
- lz4? ( app-arch/lz4 )
- mysql? ( dev-db/mysql-connector-c:0= )
- pam? ( sys-libs/pam:= )
- postgres? ( dev-db/postgresql:* )
- selinux? ( sec-policy/selinux-dovecot )
- solr? ( net-misc/curl dev-libs/expat )
- sqlite? ( dev-db/sqlite:* )
- stemmer? ( dev-libs/snowball-stemmer:= )
- system-icu? ( dev-libs/icu:= )
- suid? ( acct-group/mail )
- systemd? ( sys-apps/systemd:= )
- textcat? ( app-text/libexttextcat )
- unwind? ( sys-libs/libunwind:= )
- zstd? ( app-arch/zstd:= )
- "
-
-RDEPEND="
- ${DEPEND}
- acct-group/dovecot
- acct-group/dovenull
- acct-user/dovecot
- acct-user/dovenull
- net-mail/mailbase[pam?]
- "
-
-BDEPEND="virtual/pkgconfig
- test? (
- lua? (
- $(lua_gen_cond_dep '
- dev-lua/luajson[${LUA_USEDEP}]
- ')
- )
- )
- "
-
-PATCHES=(
- "${FILESDIR}/${PN}-autoconf-lua-version-v3.patch"
- "${FILESDIR}/${PN}-2.4.2-tests.patch"
-)
-
-pkg_setup() {
- use lua && lua-single_pkg_setup
- if use managesieve && ! use sieve; then
- ewarn "managesieve USE flag selected but sieve USE flag unselected"
- ewarn "sieve USE flag will be turned on"
- fi
-}
-
-src_prepare() {
- default
-
- # rename default cert files
- sed -i -e "s:ssl-cert.pem:server.pem:" \
- -e "s:ssl-key.pem:server.key:" \
- doc/dovecot.conf.in || die "sed failed"
-
- # bug 657108, 782631
- #elibtoolize
- eautoreconf
-
- # Bug #727244
- append-cflags -fasynchronous-unwind-tables
-}
-
-src_configure() {
- # --disable-hardening because our toolchain already defaults to
- # these bits on, and it actually regresses the default _FORTIFY_SOURCE
- # level for hardened at least from 3 to 2.
- #
- # turn valgrind tests off. Bug #340791
- VALGRIND=no \
- LUAPC="${ELUA}" \
- systemdsystemunitdir="$(systemd_get_systemunitdir)" \
- econf \
- --with-rundir="${EPREFIX}/run/dovecot" \
- --with-statedir="${EPREFIX}/var/lib/dovecot" \
- --with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \
- --disable-hardening \
- --with-bzlib \
- --without-libbsd \
- --with-libcap \
- --enable-experimental-mail-utf8 \
- $( use_with argon2 sodium ) \
- $( use_with cdb) \
- $( use_with system-icu icu) \
- $( use_with kerberos gssapi ) \
- $( use_with lua ) \
- $( use_with ldap ) \
- $( use_with xapian flatcurve ) \
- $( use_with lz4 ) \
- $( use_with mysql ) \
- $( use_with pam ) \
- $( use_with postgres pgsql ) \
- $( use_with sqlite ) \
- $( use_with solr ) \
- $( use_with stemmer ) \
- $( use_with systemd ) \
- $( use_with textcat ) \
- $( use_with unwind libunwind ) \
- $( use_with zstd ) \
- $( use_enable static-libs static )
-
- if use sieve || use managesieve; then
- # The sieve plugin needs this file to be build to determine the plugin
- # directory and the list of libraries to link to
- emake dovecot-config
- pushd "${PIEGONHOLE_S}" > /dev/null || die
- econf \
- $( use_enable static-libs static ) \
- --localstatedir="${EPREFIX}/var" \
- --enable-shared \
- --disable-hardening \
- --with-dovecot="${S}" \
- $( use_with ldap ) \
- $( use_with managesieve )
- popd > /dev/null || die
- fi
-}
-
-src_compile() {
- default
- if use sieve || use managesieve; then
- pushd "${PIEGONHOLE_S}" > /dev/null || die
- emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
- popd > /dev/null || die
- fi
-}
-
-src_test() {
- # bug #340791 and bug #807178
- local -x NOVALGRIND=true
-
- default
- if use sieve || use managesieve; then
- pushd "${PIEGONHOLE_S}" > /dev/null || die
- default
- popd > /dev/null || die
- fi
-}
-
-src_install() {
- default
-
- if use suid; then
- einfo "Changing perms to allow deliver to be suided"
- fowners root:mail "/usr/libexec/dovecot/dovecot-lda"
- fperms 4750 "/usr/libexec/dovecot/dovecot-lda"
- fi
-
- newinitd "${FILESDIR}"/dovecot.init-r6 dovecot
-
- use pam && dosym imap /etc/pam.d/dovecot
-
- insinto /etc/dovecot/conf.d
- doins "${FILESDIR}/50-misc.conf"
-
- dodoc AUTHORS NEWS README.md TODO
- docinto stopwords
- dodoc src/lib-language/stopwords/stopwords*.txt
-
- if use sieve || use managesieve; then
- pushd "${PIEGONHOLE_S}" > /dev/null || die
- emake DESTDIR="${ED}" install
-
- newdoc README README.pigeonhole
- popd > /dev/null || die
- fi
-
- rm -r "${ED}"/usr/share/dovecot
- use static-libs || find "${ED}"/usr/lib* -name '*.la' -delete
-}
-
-pkg_postinst() {
- if ver_replacing -lt 2.4 ; then
- # This is an upgrade which requires user review
- ewarn "Dovecot-2.4.x has new settings and WILL NOT work"
- ewarn "unless the configuration files are updated."
- ewarn "Please read the migration guide at:"
- ewarn " https://doc.dovecot.org/2.4.1/installation/upgrade/2.3-to-2.4.html"
- fi
-
- # Let's not make a new certificate if we already have one
- if ! [[ -e "${ROOT}"/etc/dovecot/server.pem && \
- -e "${ROOT}"/etc/dovecot/server.key ]]; then
- einfo "Creating SSL certificate"
- SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}"
- install_cert /etc/dovecot/server
- fi
-}
diff --git a/net-mail/dovecot/dovecot-2.4.3-r1.ebuild b/net-mail/dovecot/dovecot-2.4.3-r1.ebuild
deleted file mode 100644
index 66914f9b5721..000000000000
--- a/net-mail/dovecot/dovecot-2.4.3-r1.ebuild
+++ /dev/null
@@ -1,274 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-LUA_COMPAT=( lua5-{1,3,4} luajit )
-# do not add a ssl USE flag. ssl is mandatory
-SSL_DEPS_SKIP=1
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/dovecot.asc
-inherit autotools dot-a eapi9-ver flag-o-matic lua-single ssl-cert systemd
-inherit toolchain-funcs verify-sig
-
-MY_P="${P/_/.}"
-MY_PV="${PV}"
-major_minor="$(ver_cut 1-2)"
-
-DESCRIPTION="An IMAP and POP3 server written with security primarily in mind"
-HOMEPAGE="https://www.dovecot.org/"
-SRC_URI="https://www.dovecot.org/releases/${major_minor}/${MY_P}.tar.gz
- sieve? (
- https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-pigeonhole-${MY_PV}.tar.gz
- verify-sig? (
- https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-pigeonhole-${MY_PV}.tar.gz.sig
- )
- )
- managesieve? (
- https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-pigeonhole-${MY_PV}.tar.gz
- verify-sig? (
- https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-pigeonhole-${MY_PV}.tar.gz.sig
- )
- )
- verify-sig? (
- https://www.dovecot.org/releases/${major_minor}/${MY_P}.tar.gz.sig
- ) "
-S="${WORKDIR}/${MY_P}"
-PIEGONHOLE_S="../dovecot-pigeonhole-${MY_PV}"
-LICENSE="LGPL-2.1 MIT"
-SLOT="0/${PV}"
-KEYWORDS="~amd64 arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~sparc x86"
-
-IUSE_DOVECOT_AUTH_DICT="cdb kerberos ldap lua mysql pam postgres sqlite"
-IUSE_DOVECOT_COMPRESS="lz4 zstd"
-IUSE_DOVECOT_FTS="solr stemmer textcat xapian"
-IUSE_DOVECOT_OTHER="argon2 managesieve selinux sieve static-libs suid systemd system-icu test unwind"
-
-IUSE="${IUSE_DOVECOT_AUTH_DICT} ${IUSE_DOVECOT_COMPRESS} ${IUSE_DOVECOT_FTS} ${IUSE_DOVECOT_OTHER}"
-
-REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )"
-RESTRICT="!test? ( test )"
-
-DEPEND="
- app-arch/bzip2
- dev-libs/openssl:0=
- net-libs/libtirpc:=
- dev-libs/libpcre2:0[pcre32]
- net-libs/rpcsvc-proto
- sys-libs/libcap
- virtual/zlib:=
- virtual/libcrypt:=
- virtual/libiconv
- argon2? ( dev-libs/libsodium:= )
- cdb? ( dev-db/tinycdb )
- kerberos? ( virtual/krb5 )
- ldap? ( net-nds/openldap:= )
- lua? ( ${LUA_DEPS} )
- xapian? ( dev-libs/xapian:= )
- lz4? ( app-arch/lz4 )
- mysql? ( dev-db/mysql-connector-c:0= )
- pam? ( sys-libs/pam:= )
- postgres? ( dev-db/postgresql:* )
- selinux? ( sec-policy/selinux-dovecot )
- solr? ( net-misc/curl dev-libs/expat )
- sqlite? ( dev-db/sqlite:* )
- stemmer? ( dev-libs/snowball-stemmer:= )
- system-icu? ( dev-libs/icu:= )
- suid? ( acct-group/mail )
- systemd? ( sys-apps/systemd:= )
- textcat? ( app-text/libexttextcat )
- unwind? ( sys-libs/libunwind:= )
- zstd? ( app-arch/zstd:= )
- "
-
-RDEPEND="
- ${DEPEND}
- acct-group/dovecot
- acct-group/dovenull
- acct-user/dovecot
- acct-user/dovenull
- net-mail/mailbase[pam?]
- "
-
-BDEPEND="virtual/pkgconfig
- test? (
- lua? (
- $(lua_gen_cond_dep '
- dev-lua/luajson[${LUA_USEDEP}]
- ')
- )
- )
- verify-sig? ( sec-keys/openpgp-keys-dovecot )
- "
-
-PATCHES=(
- "${FILESDIR}/${PN}-autoconf-lua-version-v3.patch"
- "${FILESDIR}/${PN}-2.4.3-fix-32bit.patch"
-)
-
-pkg_setup() {
- use lua && lua-single_pkg_setup
- if use managesieve && ! use sieve; then
- ewarn "managesieve USE flag selected but sieve USE flag unselected"
- ewarn "sieve USE flag will be turned on"
- fi
-}
-
-src_unpack() {
- if use verify-sig; then
- verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.gz{,.sig}
- use sieve && verify-sig_verify_detached "${DISTDIR}"/${PN}-pigeonhole-${MY_PV}.tar.gz{,.sig}
- use managesieve && verify-sig_verify_detached "${DISTDIR}"/${PN}-pigeonhole-${MY_PV}.tar.gz{,.sig}
- fi
-
- default
-}
-
-src_prepare() {
- default
-
- # unix socket path too long under portage build dir
- sed -i '/^TEST_IMAP_CLIENT_HIBERNATE/s/test-imap-client-hibernate//' src/imap/Makefile.am || die
-
- # rename default cert files
- sed -i -e "s:ssl-cert.pem:server.pem:" \
- -e "s:ssl-key.pem:server.key:" \
- doc/dovecot.conf.in || die "sed failed"
-
- # bug 657108, 782631
- #elibtoolize
- eautoreconf
-
- # Bug #727244
- append-cflags -fasynchronous-unwind-tables
- # Bug #971191
- append-cflags -fno-strict-aliasing
-}
-
-src_configure() {
- use static-libs && lto-guarantee-fat
-
- # --disable-hardening because our toolchain already defaults to
- # these bits on, and it actually regresses the default _FORTIFY_SOURCE
- # level for hardened at least from 3 to 2.
- #
- # turn valgrind tests off. Bug #340791
- VALGRIND=no \
- LUAPC="${ELUA}" \
- systemdsystemunitdir="$(systemd_get_systemunitdir)" \
- econf \
- --with-rundir="${EPREFIX}/run/dovecot" \
- --with-statedir="${EPREFIX}/var/lib/dovecot" \
- --with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \
- --disable-hardening \
- --with-bzlib \
- --without-libbsd \
- --with-libcap \
- --enable-experimental-mail-utf8 \
- $( use_with argon2 sodium ) \
- $( use_with cdb) \
- $( use_with system-icu icu) \
- $( use_with kerberos gssapi ) \
- $( use_with lua ) \
- $( use_with ldap ) \
- $( use_with xapian flatcurve ) \
- $( use_with lz4 ) \
- $( use_with mysql ) \
- $( use_with pam ) \
- $( use_with postgres pgsql ) \
- $( use_with sqlite ) \
- $( use_with solr ) \
- $( use_with stemmer ) \
- $( use_with systemd ) \
- $( use_with textcat ) \
- $( use_with unwind libunwind ) \
- $( use_with zstd ) \
- $( use_enable static-libs static )
-
- if use sieve || use managesieve; then
- # The sieve plugin needs this file to be build to determine the plugin
- # directory and the list of libraries to link to
- emake dovecot-config
- pushd "${PIEGONHOLE_S}" > /dev/null || die
- econf \
- $( use_enable static-libs static ) \
- --localstatedir="${EPREFIX}/var" \
- --enable-shared \
- --disable-hardening \
- --with-dovecot="${S}" \
- $( use_with ldap ) \
- $( use_with managesieve )
- popd > /dev/null || die
- fi
-}
-
-src_compile() {
- default
- if use sieve || use managesieve; then
- pushd "${PIEGONHOLE_S}" > /dev/null || die
- emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
- popd > /dev/null || die
- fi
-}
-
-src_test() {
- # bug #340791 and bug #807178
- local -x NOVALGRIND=true
-
- default
- if use sieve || use managesieve; then
- pushd "${PIEGONHOLE_S}" > /dev/null || die
- default
- popd > /dev/null || die
- fi
-}
-
-src_install() {
- default
-
- if use suid; then
- einfo "Changing perms to allow deliver to be suided"
- fowners root:mail "/usr/libexec/dovecot/dovecot-lda"
- fperms 4750 "/usr/libexec/dovecot/dovecot-lda"
- fi
-
- newinitd "${FILESDIR}"/dovecot.init-r6 dovecot
-
- use pam && dosym imap /etc/pam.d/dovecot
-
- insinto /etc/dovecot/conf.d
- doins "${FILESDIR}/50-misc.conf"
-
- dodoc AUTHORS NEWS README.md TODO
-
- if use sieve || use managesieve; then
- pushd "${PIEGONHOLE_S}" > /dev/null || die
- emake DESTDIR="${ED}" install
-
- newdoc README README.pigeonhole
- popd > /dev/null || die
- fi
-
- if use static-libs; then
- strip-lto-bytecode
- else
- find "${ED}"/usr/lib* -name '*.la' -delete
- fi
-}
-
-pkg_postinst() {
- if ver_replacing -lt 2.4 ; then
- # This is an upgrade which requires user review
- ewarn "Dovecot-2.4.x has new settings and WILL NOT work"
- ewarn "unless the configuration files are updated."
- ewarn "Please read the migration guide at:"
- ewarn " https://doc.dovecot.org/2.4.1/installation/upgrade/2.3-to-2.4.html"
- fi
-
- # Let's not make a new certificate if we already have one
- if ! [[ -e "${ROOT}"/etc/dovecot/server.pem && \
- -e "${ROOT}"/etc/dovecot/server.key ]]; then
- einfo "Creating SSL certificate"
- SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}"
- install_cert /etc/dovecot/server
- fi
-}
diff --git a/net-mail/dovecot/dovecot-2.4.3.ebuild b/net-mail/dovecot/dovecot-2.4.3.ebuild
index a92a15323ba7..869073295fd8 100644
--- a/net-mail/dovecot/dovecot-2.4.3.ebuild
+++ b/net-mail/dovecot/dovecot-2.4.3.ebuild
@@ -1,83 +1,75 @@
-# Copyright 1999-2026 Gentoo Authors
+# Copyright 2021-2026 Liguros Authors
# Distributed under the terms of the GNU General Public License v2
-
EAPI=8
LUA_COMPAT=( lua5-{1,3,4} luajit )
+
# do not add a ssl USE flag. ssl is mandatory
SSL_DEPS_SKIP=1
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/dovecot.asc
-inherit autotools dot-a eapi9-ver flag-o-matic lua-single ssl-cert systemd
-inherit toolchain-funcs verify-sig
+inherit autotools flag-o-matic lua-single ssl-cert systemd toolchain-funcs
-MY_P="${P/_/.}"
-MY_PV="${PV}"
+MY_P="$(ver_cut 1-3)"
major_minor="$(ver_cut 1-2)"
+if [[ ${PV} == *_rc* ]]; then
+ rc_dir="rc/"
+else
+ rc_dir=""
+fi
+
DESCRIPTION="An IMAP and POP3 server written with security primarily in mind"
HOMEPAGE="https://www.dovecot.org/"
-SRC_URI="https://www.dovecot.org/releases/${major_minor}/${MY_P}.tar.gz
+
+SRC_URI="https://dovecot.org/releases/${major_minor}/${rc_dir}${PN}-${MY_P}.tar.gz
sieve? (
- https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-pigeonhole-${MY_PV}.tar.gz
- verify-sig? (
- https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-pigeonhole-${MY_PV}.tar.gz.sig
- )
+ https://pigeonhole.dovecot.org/releases/${major_minor}/${rc_dir}${PN}-pigeonhole-${MY_P}.tar.gz
)
managesieve? (
- https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-pigeonhole-${MY_PV}.tar.gz
- verify-sig? (
- https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-pigeonhole-${MY_PV}.tar.gz.sig
- )
- )
- verify-sig? (
- https://www.dovecot.org/releases/${major_minor}/${MY_P}.tar.gz.sig
+ https://pigeonhole.dovecot.org/releases/${major_minor}/${rc_dir}${PN}-pigeonhole-${MY_P}.tar.gz
) "
-S="${WORKDIR}/${MY_P}"
-PIEGONHOLE_S="../dovecot-pigeonhole-${MY_PV}"
+S="${WORKDIR}/${PN}-${MY_P}"
LICENSE="LGPL-2.1 MIT"
SLOT="0/${PV}"
-KEYWORDS="amd64 ~arm arm64 ~hppa ~mips ~ppc ppc64 ~riscv ~sparc ~x86"
+KEYWORDS="~alpha ~amd64 arm ~arm64 ~hppa ~ia64 ~mips ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE_DOVECOT_AUTH_DICT="cdb kerberos ldap lua mysql pam postgres sqlite"
+IUSE_DOVECOT_AUTH="kerberos lua mariadb pam postgres sqlite"
IUSE_DOVECOT_COMPRESS="lz4 zstd"
-IUSE_DOVECOT_FTS="solr stemmer textcat xapian"
-IUSE_DOVECOT_OTHER="argon2 managesieve selinux sieve static-libs suid systemd system-icu test unwind"
+IUSE_DOVECOT_OTHER="argon2 caps doc managesieve rpc selinux sieve solr static-libs stemmer suid systemd textcat unwind"
-IUSE="${IUSE_DOVECOT_AUTH_DICT} ${IUSE_DOVECOT_COMPRESS} ${IUSE_DOVECOT_FTS} ${IUSE_DOVECOT_OTHER}"
+IUSE="${IUSE_DOVECOT_AUTH} ${IUSE_DOVECOT_COMPRESS} ${IUSE_DOVECOT_OTHER}"
REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )"
-RESTRICT="!test? ( test )"
DEPEND="
app-arch/bzip2
+ app-arch/xz-utils
+ dev-libs/icu:=
dev-libs/openssl:0=
- net-libs/libtirpc:=
- dev-libs/libpcre2:0[pcre32]
- net-libs/rpcsvc-proto
- sys-libs/libcap
- virtual/zlib:=
- virtual/libcrypt:=
+
+ sys-libs/zlib:=
virtual/libiconv
argon2? ( dev-libs/libsodium:= )
- cdb? ( dev-db/tinycdb )
+ caps? ( sys-libs/libcap )
kerberos? ( virtual/krb5 )
- ldap? ( net-nds/openldap:= )
+ net-nds/openldap:=
lua? ( ${LUA_DEPS} )
- xapian? ( dev-libs/xapian:= )
+ >=dev-cpp/clucene-2.3
lz4? ( app-arch/lz4 )
- mysql? ( dev-db/mysql-connector-c:0= )
+ mariadb? ( dev-db/mariadb-connector-c:0= )
pam? ( sys-libs/pam:= )
postgres? ( dev-db/postgresql:* )
+ rpc? ( net-libs/libtirpc:= net-libs/rpcsvc-proto )
selinux? ( sec-policy/selinux-dovecot )
solr? ( net-misc/curl dev-libs/expat )
sqlite? ( dev-db/sqlite:* )
stemmer? ( dev-libs/snowball-stemmer:= )
- system-icu? ( dev-libs/icu:= )
suid? ( acct-group/mail )
systemd? ( sys-apps/systemd:= )
+ sys-apps/tcp-wrappers
textcat? ( app-text/libexttextcat )
unwind? ( sys-libs/libunwind:= )
zstd? ( app-arch/zstd:= )
+ virtual/libcrypt:=
"
RDEPEND="
@@ -89,21 +81,6 @@ RDEPEND="
net-mail/mailbase[pam?]
"
-BDEPEND="virtual/pkgconfig
- test? (
- lua? (
- $(lua_gen_cond_dep '
- dev-lua/luajson[${LUA_USEDEP}]
- ')
- )
- )
- verify-sig? ( sec-keys/openpgp-keys-dovecot )
- "
-
-PATCHES=(
- "${FILESDIR}/${PN}-autoconf-lua-version-v3.patch"
-)
-
pkg_setup() {
use lua && lua-single_pkg_setup
if use managesieve && ! use sieve; then
@@ -112,26 +89,9 @@ pkg_setup() {
fi
}
-src_unpack() {
- if use verify-sig; then
- verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.gz{,.sig}
- use sieve && verify-sig_verify_detached "${DISTDIR}"/${PN}-pigeonhole-${MY_PV}.tar.gz{,.sig}
- use managesieve && verify-sig_verify_detached "${DISTDIR}"/${PN}-pigeonhole-${MY_PV}.tar.gz{,.sig}
- fi
-
- default
-}
-
src_prepare() {
default
- # unix socket path too long under portage build dir
- sed -i '/^TEST_IMAP_CLIENT_HIBERNATE/s/test-imap-client-hibernate//' src/imap/Makefile.am || die
-
- # rename default cert files
- sed -i -e "s:ssl-cert.pem:server.pem:" \
- -e "s:ssl-key.pem:server.key:" \
- doc/dovecot.conf.in || die "sed failed"
# bug 657108, 782631
#elibtoolize
@@ -139,17 +99,15 @@ src_prepare() {
# Bug #727244
append-cflags -fasynchronous-unwind-tables
- # Bug #971191
- append-cflags -fno-strict-aliasing
}
src_configure() {
- use static-libs && lto-guarantee-fat
+ local conf=""
+
+ if use postgres || use mariadb || use sqlite; then
+ conf="${conf} --with-sql"
+ fi
- # --disable-hardening because our toolchain already defaults to
- # these bits on, and it actually regresses the default _FORTIFY_SOURCE
- # level for hardened at least from 3 to 2.
- #
# turn valgrind tests off. Bug #340791
VALGRIND=no \
LUAPC="${ELUA}" \
@@ -158,20 +116,16 @@ src_configure() {
--with-rundir="${EPREFIX}/run/dovecot" \
--with-statedir="${EPREFIX}/var/lib/dovecot" \
--with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \
- --disable-hardening \
+ --disable-rpath \
--with-bzlib \
--without-libbsd \
- --with-libcap \
- --enable-experimental-mail-utf8 \
+ --with-icu \
$( use_with argon2 sodium ) \
- $( use_with cdb) \
- $( use_with system-icu icu) \
+ $( use_with caps libcap ) \
$( use_with kerberos gssapi ) \
$( use_with lua ) \
- $( use_with ldap ) \
- $( use_with xapian flatcurve ) \
$( use_with lz4 ) \
- $( use_with mysql ) \
+ $( use_with mariadb ) \
$( use_with pam ) \
$( use_with postgres pgsql ) \
$( use_with sqlite ) \
@@ -181,31 +135,28 @@ src_configure() {
$( use_with textcat ) \
$( use_with unwind libunwind ) \
$( use_with zstd ) \
- $( use_enable static-libs static )
+ $( use_enable static-libs static ) \
+ ${conf}
if use sieve || use managesieve; then
# The sieve plugin needs this file to be build to determine the plugin
- # directory and the list of libraries to link to
+ # directory and the list of libraries to link to.
emake dovecot-config
- pushd "${PIEGONHOLE_S}" > /dev/null || die
+ cd "../dovecot-pigeonhole-${PV}-4" || die "cd failed"
econf \
$( use_enable static-libs static ) \
--localstatedir="${EPREFIX}/var" \
--enable-shared \
- --disable-hardening \
--with-dovecot="${S}" \
- $( use_with ldap ) \
$( use_with managesieve )
- popd > /dev/null || die
fi
}
src_compile() {
default
if use sieve || use managesieve; then
- pushd "${PIEGONHOLE_S}" > /dev/null || die
+ cd "../dovecot-pigeonhole-${PV}-4" || die "cd failed"
emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
- popd > /dev/null || die
fi
}
@@ -215,9 +166,8 @@ src_test() {
default
if use sieve || use managesieve; then
- pushd "${PIEGONHOLE_S}" > /dev/null || die
+ cd "../dovecot-pigeonhole-${PV}-4" || die "cd failed"
default
- popd > /dev/null || die
fi
}
@@ -232,42 +182,42 @@ src_install() {
newinitd "${FILESDIR}"/dovecot.init-r6 dovecot
- use pam && dosym imap /etc/pam.d/dovecot
-
- insinto /etc/dovecot/conf.d
- doins "${FILESDIR}/50-misc.conf"
+ rm -rf "${ED}"/usr/share/doc/dovecot
dodoc AUTHORS NEWS README.md TODO
+ dodoc doc/*.{txt,cnf,xml,sh}
+ doman doc/man/*.1
+
+ local conf="${ED}/etc/dovecot/dovecot.conf"
+ local confd="${ED}/etc/dovecot/conf.d"
+ # Install LDAP configuration
if use sieve || use managesieve; then
- pushd "${PIEGONHOLE_S}" > /dev/null || die
+ cd "../dovecot-pigeonhole-${PV}-4" || die "cd failed"
emake DESTDIR="${ED}" install
-
- newdoc README README.pigeonhole
- popd > /dev/null || die
+ rm -rf "${ED}"/usr/share/doc/dovecot
+ docinto sieve/rfc
+ dodoc doc/rfc/*.txt
+ docinto sieve/devel
+ dodoc doc/devel/DESIGN
+ docinto plugins
+ dodoc doc/plugins/*.txt
+ docinto extensions
+ dodoc doc/extensions/*.txt
+ docinto locations
+ dodoc doc/locations/*.txt
+ doman doc/man/*.1
fi
- if use static-libs; then
- strip-lto-bytecode
- else
- find "${ED}"/usr/lib* -name '*.la' -delete
- fi
+ use static-libs || find "${ED}"/usr/lib* -name '*.la' -delete
}
pkg_postinst() {
- if ver_replacing -lt 2.4 ; then
- # This is an upgrade which requires user review
- ewarn "Dovecot-2.4.x has new settings and WILL NOT work"
- ewarn "unless the configuration files are updated."
- ewarn "Please read the migration guide at:"
- ewarn " https://doc.dovecot.org/2.4.1/installation/upgrade/2.3-to-2.4.html"
- fi
-
# Let's not make a new certificate if we already have one
- if ! [[ -e "${ROOT}"/etc/dovecot/server.pem && \
- -e "${ROOT}"/etc/dovecot/server.key ]]; then
+ if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \
+ -e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then
einfo "Creating SSL certificate"
SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}"
- install_cert /etc/dovecot/server
+ install_cert /etc/ssl/dovecot/server
fi
}
diff --git a/net-mail/dovecot/dovecot-2.4.4.ebuild b/net-mail/dovecot/dovecot-2.4.4.ebuild
index cf9720460ded..869073295fd8 100644
--- a/net-mail/dovecot/dovecot-2.4.4.ebuild
+++ b/net-mail/dovecot/dovecot-2.4.4.ebuild
@@ -1,83 +1,75 @@
-# Copyright 1999-2026 Gentoo Authors
+# Copyright 2021-2026 Liguros Authors
# Distributed under the terms of the GNU General Public License v2
-
EAPI=8
LUA_COMPAT=( lua5-{1,3,4} luajit )
+
# do not add a ssl USE flag. ssl is mandatory
SSL_DEPS_SKIP=1
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/dovecot.asc
-inherit autotools dot-a eapi9-ver flag-o-matic lua-single ssl-cert systemd
-inherit toolchain-funcs verify-sig
+inherit autotools flag-o-matic lua-single ssl-cert systemd toolchain-funcs
-MY_P="${P/_/.}"
-MY_PV="${PV}"
+MY_P="$(ver_cut 1-3)"
major_minor="$(ver_cut 1-2)"
+if [[ ${PV} == *_rc* ]]; then
+ rc_dir="rc/"
+else
+ rc_dir=""
+fi
+
DESCRIPTION="An IMAP and POP3 server written with security primarily in mind"
HOMEPAGE="https://www.dovecot.org/"
-SRC_URI="https://www.dovecot.org/releases/${major_minor}/${MY_P}.tar.gz
+
+SRC_URI="https://dovecot.org/releases/${major_minor}/${rc_dir}${PN}-${MY_P}.tar.gz
sieve? (
- https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-pigeonhole-${MY_PV}.tar.gz
- verify-sig? (
- https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-pigeonhole-${MY_PV}.tar.gz.sig
- )
+ https://pigeonhole.dovecot.org/releases/${major_minor}/${rc_dir}${PN}-pigeonhole-${MY_P}.tar.gz
)
managesieve? (
- https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-pigeonhole-${MY_PV}.tar.gz
- verify-sig? (
- https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-pigeonhole-${MY_PV}.tar.gz.sig
- )
- )
- verify-sig? (
- https://www.dovecot.org/releases/${major_minor}/${MY_P}.tar.gz.sig
+ https://pigeonhole.dovecot.org/releases/${major_minor}/${rc_dir}${PN}-pigeonhole-${MY_P}.tar.gz
) "
-S="${WORKDIR}/${MY_P}"
-PIEGONHOLE_S="../dovecot-pigeonhole-${MY_PV}"
+S="${WORKDIR}/${PN}-${MY_P}"
LICENSE="LGPL-2.1 MIT"
SLOT="0/${PV}"
-KEYWORDS="amd64 ~arm arm64 ~hppa ~mips ~ppc ppc64 ~riscv ~sparc ~x86"
+KEYWORDS="~alpha ~amd64 arm ~arm64 ~hppa ~ia64 ~mips ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE_DOVECOT_AUTH_DICT="cdb kerberos ldap lua mysql pam postgres sqlite"
+IUSE_DOVECOT_AUTH="kerberos lua mariadb pam postgres sqlite"
IUSE_DOVECOT_COMPRESS="lz4 zstd"
-IUSE_DOVECOT_FTS="solr stemmer textcat xapian"
-IUSE_DOVECOT_OTHER="argon2 managesieve selinux sieve static-libs suid systemd system-icu test unwind"
+IUSE_DOVECOT_OTHER="argon2 caps doc managesieve rpc selinux sieve solr static-libs stemmer suid systemd textcat unwind"
-IUSE="${IUSE_DOVECOT_AUTH_DICT} ${IUSE_DOVECOT_COMPRESS} ${IUSE_DOVECOT_FTS} ${IUSE_DOVECOT_OTHER}"
+IUSE="${IUSE_DOVECOT_AUTH} ${IUSE_DOVECOT_COMPRESS} ${IUSE_DOVECOT_OTHER}"
REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )"
-RESTRICT="!test? ( test )"
DEPEND="
app-arch/bzip2
+ app-arch/xz-utils
+ dev-libs/icu:=
dev-libs/openssl:0=
- net-libs/libtirpc:=
- dev-libs/libpcre2:0[pcre32]
- net-libs/rpcsvc-proto
- sys-libs/libcap
- virtual/zlib:=
- virtual/libcrypt:=
+
+ sys-libs/zlib:=
virtual/libiconv
argon2? ( dev-libs/libsodium:= )
- cdb? ( dev-db/tinycdb )
+ caps? ( sys-libs/libcap )
kerberos? ( virtual/krb5 )
- ldap? ( net-nds/openldap:= )
+ net-nds/openldap:=
lua? ( ${LUA_DEPS} )
- xapian? ( dev-libs/xapian:= )
+ >=dev-cpp/clucene-2.3
lz4? ( app-arch/lz4 )
- mysql? ( dev-db/mysql-connector-c:0= )
+ mariadb? ( dev-db/mariadb-connector-c:0= )
pam? ( sys-libs/pam:= )
postgres? ( dev-db/postgresql:* )
+ rpc? ( net-libs/libtirpc:= net-libs/rpcsvc-proto )
selinux? ( sec-policy/selinux-dovecot )
solr? ( net-misc/curl dev-libs/expat )
sqlite? ( dev-db/sqlite:* )
stemmer? ( dev-libs/snowball-stemmer:= )
- system-icu? ( dev-libs/icu:= )
suid? ( acct-group/mail )
systemd? ( sys-apps/systemd:= )
+ sys-apps/tcp-wrappers
textcat? ( app-text/libexttextcat )
unwind? ( sys-libs/libunwind:= )
zstd? ( app-arch/zstd:= )
+ virtual/libcrypt:=
"
RDEPEND="
@@ -89,22 +81,6 @@ RDEPEND="
net-mail/mailbase[pam?]
"
-BDEPEND="virtual/pkgconfig
- test? (
- lua? (
- $(lua_gen_cond_dep '
- dev-lua/luajson[${LUA_USEDEP}]
- ')
- )
- )
- verify-sig? ( sec-keys/openpgp-keys-dovecot )
- "
-
-PATCHES=(
- "${FILESDIR}/${PN}-autoconf-lua-version-v3.patch"
- "${FILESDIR}/${PN}-2.4.3-fix-32bit.patch"
-)
-
pkg_setup() {
use lua && lua-single_pkg_setup
if use managesieve && ! use sieve; then
@@ -113,26 +89,9 @@ pkg_setup() {
fi
}
-src_unpack() {
- if use verify-sig; then
- verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.gz{,.sig}
- use sieve && verify-sig_verify_detached "${DISTDIR}"/${PN}-pigeonhole-${MY_PV}.tar.gz{,.sig}
- use managesieve && verify-sig_verify_detached "${DISTDIR}"/${PN}-pigeonhole-${MY_PV}.tar.gz{,.sig}
- fi
-
- default
-}
-
src_prepare() {
default
- # unix socket path too long under portage build dir
- sed -i '/^TEST_IMAP_CLIENT_HIBERNATE/s/test-imap-client-hibernate//' src/imap/Makefile.am || die
-
- # rename default cert files
- sed -i -e "s:ssl-cert.pem:server.pem:" \
- -e "s:ssl-key.pem:server.key:" \
- doc/dovecot.conf.in || die "sed failed"
# bug 657108, 782631
#elibtoolize
@@ -140,17 +99,15 @@ src_prepare() {
# Bug #727244
append-cflags -fasynchronous-unwind-tables
- # Bug #971191
- append-cflags -fno-strict-aliasing
}
src_configure() {
- use static-libs && lto-guarantee-fat
+ local conf=""
+
+ if use postgres || use mariadb || use sqlite; then
+ conf="${conf} --with-sql"
+ fi
- # --disable-hardening because our toolchain already defaults to
- # these bits on, and it actually regresses the default _FORTIFY_SOURCE
- # level for hardened at least from 3 to 2.
- #
# turn valgrind tests off. Bug #340791
VALGRIND=no \
LUAPC="${ELUA}" \
@@ -159,20 +116,16 @@ src_configure() {
--with-rundir="${EPREFIX}/run/dovecot" \
--with-statedir="${EPREFIX}/var/lib/dovecot" \
--with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \
- --disable-hardening \
+ --disable-rpath \
--with-bzlib \
--without-libbsd \
- --with-libcap \
- --enable-experimental-mail-utf8 \
+ --with-icu \
$( use_with argon2 sodium ) \
- $( use_with cdb) \
- $( use_with system-icu icu) \
+ $( use_with caps libcap ) \
$( use_with kerberos gssapi ) \
$( use_with lua ) \
- $( use_with ldap ) \
- $( use_with xapian flatcurve ) \
$( use_with lz4 ) \
- $( use_with mysql ) \
+ $( use_with mariadb ) \
$( use_with pam ) \
$( use_with postgres pgsql ) \
$( use_with sqlite ) \
@@ -182,31 +135,28 @@ src_configure() {
$( use_with textcat ) \
$( use_with unwind libunwind ) \
$( use_with zstd ) \
- $( use_enable static-libs static )
+ $( use_enable static-libs static ) \
+ ${conf}
if use sieve || use managesieve; then
# The sieve plugin needs this file to be build to determine the plugin
- # directory and the list of libraries to link to
+ # directory and the list of libraries to link to.
emake dovecot-config
- pushd "${PIEGONHOLE_S}" > /dev/null || die
+ cd "../dovecot-pigeonhole-${PV}-4" || die "cd failed"
econf \
$( use_enable static-libs static ) \
--localstatedir="${EPREFIX}/var" \
--enable-shared \
- --disable-hardening \
--with-dovecot="${S}" \
- $( use_with ldap ) \
$( use_with managesieve )
- popd > /dev/null || die
fi
}
src_compile() {
default
if use sieve || use managesieve; then
- pushd "${PIEGONHOLE_S}" > /dev/null || die
+ cd "../dovecot-pigeonhole-${PV}-4" || die "cd failed"
emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
- popd > /dev/null || die
fi
}
@@ -216,9 +166,8 @@ src_test() {
default
if use sieve || use managesieve; then
- pushd "${PIEGONHOLE_S}" > /dev/null || die
+ cd "../dovecot-pigeonhole-${PV}-4" || die "cd failed"
default
- popd > /dev/null || die
fi
}
@@ -233,42 +182,42 @@ src_install() {
newinitd "${FILESDIR}"/dovecot.init-r6 dovecot
- use pam && dosym imap /etc/pam.d/dovecot
-
- insinto /etc/dovecot/conf.d
- doins "${FILESDIR}/50-misc.conf"
+ rm -rf "${ED}"/usr/share/doc/dovecot
dodoc AUTHORS NEWS README.md TODO
+ dodoc doc/*.{txt,cnf,xml,sh}
+ doman doc/man/*.1
+
+ local conf="${ED}/etc/dovecot/dovecot.conf"
+ local confd="${ED}/etc/dovecot/conf.d"
+ # Install LDAP configuration
if use sieve || use managesieve; then
- pushd "${PIEGONHOLE_S}" > /dev/null || die
+ cd "../dovecot-pigeonhole-${PV}-4" || die "cd failed"
emake DESTDIR="${ED}" install
-
- newdoc README README.pigeonhole
- popd > /dev/null || die
+ rm -rf "${ED}"/usr/share/doc/dovecot
+ docinto sieve/rfc
+ dodoc doc/rfc/*.txt
+ docinto sieve/devel
+ dodoc doc/devel/DESIGN
+ docinto plugins
+ dodoc doc/plugins/*.txt
+ docinto extensions
+ dodoc doc/extensions/*.txt
+ docinto locations
+ dodoc doc/locations/*.txt
+ doman doc/man/*.1
fi
- if use static-libs; then
- strip-lto-bytecode
- else
- find "${ED}"/usr/lib* -name '*.la' -delete
- fi
+ use static-libs || find "${ED}"/usr/lib* -name '*.la' -delete
}
pkg_postinst() {
- if ver_replacing -lt 2.4 ; then
- # This is an upgrade which requires user review
- ewarn "Dovecot-2.4.x has new settings and WILL NOT work"
- ewarn "unless the configuration files are updated."
- ewarn "Please read the migration guide at:"
- ewarn " https://doc.dovecot.org/2.4.1/installation/upgrade/2.3-to-2.4.html"
- fi
-
# Let's not make a new certificate if we already have one
- if ! [[ -e "${ROOT}"/etc/dovecot/server.pem && \
- -e "${ROOT}"/etc/dovecot/server.key ]]; then
+ if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \
+ -e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then
einfo "Creating SSL certificate"
SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}"
- install_cert /etc/dovecot/server
+ install_cert /etc/ssl/dovecot/server
fi
}
diff --git a/net-mail/dovecot/files/50-misc.conf b/net-mail/dovecot/files/50-misc.conf
deleted file mode 100644
index 4d1d9ee3821e..000000000000
--- a/net-mail/dovecot/files/50-misc.conf
+++ /dev/null
@@ -1,114 +0,0 @@
-## Some additional configuration options that might be useful
-## Full documentation at https://doc.dovecot.org/
-#
-#auth_mechanisms = plain login
-#
-## maildir is gentoo default
-#mail_driver = maildir
-## maildir directory
-#mail_path = ~/.maildir
-#
-## Integrate with postfix
-#service lmtp {
-# unix_listener /var/spool/postfix/private/dovecot-lmtp {
-# group = postfix
-# mode = 0600
-# user = postfix
-# }
-#}
-#
-## Dovecot SASL for postfix
-#service auth {
-# unix_listener /var/spool/postfix/private/auth {
-# mode = 0660
-# # Assuming the default Postfix user and group
-# user = postfix
-# group = postfix
-# }
-#}
-#
-## Sieve with LMTP
-#protocol lmtp {
-# # REQUIRED
-# postmaster_address = postmaster@domainname
-# mail_plugins {
-# #quota = yes
-# sieve = yes
-# }
-#}
-#
-## Login Processes
-#service imap-login {
-# restart_request_count = 1
-# #process_min_avail = 0
-#}
-#
-#service pop3-login {
-# restart_request_count = 1
-#}
-#
-## Pass and User Databases
-#passdb passwd-file {
-# default_password_scheme = plain-md5
-# auth_username_format = %{user | username}
-# passwd_file_path = /etc/dovecot/users
-#}
-#userdb passwd-file {
-# auth_username_format = %{user | username}
-# passwd_file_path = /etc/dovecot/users
-# fields {
-# uid:default = vmail
-# gid:default = vmail
-# home:default = /home/vmail/%{user}
-# }
-#}
-#
-## Namespaces
-#namespace inbox {
-# inbox = yes
-#
-# mailbox Drafts {
-# auto = subscribe
-# special_use = \Drafts
-# }
-#
-# mailbox Sent {
-# auto = subscribe
-# special_use = \Sent
-# }
-#
-# mailbox "Sent Messages" {
-# auto = no
-# special_use = \Sent
-# }
-#
-# mailbox Spam {
-# auto = create
-# special_use = \Junk
-# }
-#
-# mailbox Trash {
-# auto = subscribe
-# special_use = \Trash
-# }
-#}
-#
-## Optimization
-#import_environment {
-# TZ = :/etc/localtime
-# MALLOC_MMAP_THRESHOLD_ = 131072
-#}
-#
-## Flatcurve FTS Plugin
-#mail_plugins {
-# fts = yes
-# fts_flatcurve = yes
-#}
-#
-#fts flatcurve {
-#}
-#
-#sieve_script personal {
-# path = ~/.dovecot.sieve
-#}
-
diff --git a/net-mail/dovecot/files/CVE-2022-30550.patch b/net-mail/dovecot/files/CVE-2022-30550.patch
deleted file mode 100644
index d7da1316f76f..000000000000
--- a/net-mail/dovecot/files/CVE-2022-30550.patch
+++ /dev/null
@@ -1,155 +0,0 @@
-From 7bad6a24160e34bce8f10e73dbbf9e5fbbcd1904 Mon Sep 17 00:00:00 2001
-From: Timo Sirainen <timo.sirainen@open-xchange.com>
-Date: Mon, 9 May 2022 15:23:33 +0300
-Subject: [PATCH 1/2] auth: Fix handling passdbs with identical driver/args but
- different mechanisms/username_filter
-
-The passdb was wrongly deduplicated in this situation, causing wrong
-mechanisms or username_filter setting to be used. This would be a rather
-unlikely configuration though.
-
-Fixed by moving mechanisms and username_filter from struct passdb_module
-to struct auth_passdb, which is where they should have been in the first
-place.
----
- src/auth/auth-request.c | 6 +++---
- src/auth/auth.c | 18 ++++++++++++++++++
- src/auth/auth.h | 5 +++++
- src/auth/passdb.c | 15 ++-------------
- src/auth/passdb.h | 4 ----
- 5 files changed, 28 insertions(+), 20 deletions(-)
-
-diff --git a/src/auth/auth-request.c b/src/auth/auth-request.c
-index cd08b1fa02..0ca29f3674 100644
---- a/src/auth/auth-request.c
-+++ b/src/auth/auth-request.c
-@@ -534,8 +534,8 @@ auth_request_want_skip_passdb(struct auth_request *request,
- struct auth_passdb *passdb)
- {
- /* if mechanism is not supported, skip */
-- const char *const *mechs = passdb->passdb->mechanisms;
-- const char *const *username_filter = passdb->passdb->username_filter;
-+ const char *const *mechs = passdb->mechanisms;
-+ const char *const *username_filter = passdb->username_filter;
- const char *username;
-
- username = request->fields.user;
-@@ -548,7 +548,7 @@ auth_request_want_skip_passdb(struct auth_request *request,
- return TRUE;
- }
-
-- if (passdb->passdb->username_filter != NULL &&
-+ if (passdb->username_filter != NULL &&
- !auth_request_username_accepted(username_filter, username)) {
- auth_request_log_debug(request,
- request->mech != NULL ? AUTH_SUBSYS_MECH
-diff --git a/src/auth/auth.c b/src/auth/auth.c
-index f2f3fda20c..9f6c4ba60c 100644
---- a/src/auth/auth.c
-+++ b/src/auth/auth.c
-@@ -99,6 +99,24 @@ auth_passdb_preinit(struct auth *auth, const struct auth_passdb_settings *set,
- auth_passdb->override_fields_tmpl =
- passdb_template_build(auth->pool, set->override_fields);
-
-+ if (*set->mechanisms == '\0') {
-+ auth_passdb->mechanisms = NULL;
-+ } else if (strcasecmp(set->mechanisms, "none") == 0) {
-+ auth_passdb->mechanisms = (const char *const[]){ NULL };
-+ } else {
-+ auth_passdb->mechanisms =
-+ (const char *const *)p_strsplit_spaces(auth->pool,
-+ set->mechanisms, " ,");
-+ }
-+
-+ if (*set->username_filter == '\0') {
-+ auth_passdb->username_filter = NULL;
-+ } else {
-+ auth_passdb->username_filter =
-+ (const char *const *)p_strsplit_spaces(auth->pool,
-+ set->username_filter, " ,");
-+ }
-+
- /* for backwards compatibility: */
- if (set->pass)
- auth_passdb->result_success = AUTH_DB_RULE_CONTINUE;
-diff --git a/src/auth/auth.h b/src/auth/auth.h
-index f700e29d5c..460a179765 100644
---- a/src/auth/auth.h
-+++ b/src/auth/auth.h
-@@ -41,6 +41,11 @@ struct auth_passdb {
- struct passdb_template *default_fields_tmpl;
- struct passdb_template *override_fields_tmpl;
-
-+ /* Supported authentication mechanisms, NULL is all, {NULL} is none */
-+ const char *const *mechanisms;
-+ /* Username filter, NULL is no filter */
-+ const char *const *username_filter;
-+
- enum auth_passdb_skip skip;
- enum auth_db_rule result_success;
- enum auth_db_rule result_failure;
-diff --git a/src/auth/passdb.c b/src/auth/passdb.c
-index eb4ac8ae82..f5eed1af4f 100644
---- a/src/auth/passdb.c
-+++ b/src/auth/passdb.c
-@@ -224,19 +224,8 @@ passdb_preinit(pool_t pool, const struct auth_passdb_settings *set)
- passdb->id = ++auth_passdb_id;
- passdb->iface = *iface;
- passdb->args = p_strdup(pool, set->args);
-- if (*set->mechanisms == '\0') {
-- passdb->mechanisms = NULL;
-- } else if (strcasecmp(set->mechanisms, "none") == 0) {
-- passdb->mechanisms = (const char *const[]){NULL};
-- } else {
-- passdb->mechanisms = (const char* const*)p_strsplit_spaces(pool, set->mechanisms, " ,");
-- }
--
-- if (*set->username_filter == '\0') {
-- passdb->username_filter = NULL;
-- } else {
-- passdb->username_filter = (const char* const*)p_strsplit_spaces(pool, set->username_filter, " ,");
-- }
-+ /* NOTE: if anything else than driver & args are added here,
-+ passdb_find() also needs to be updated. */
- array_push_back(&passdb_modules, &passdb);
- return passdb;
- }
-diff --git a/src/auth/passdb.h b/src/auth/passdb.h
-index 2e95328e5c..e466a9fdb6 100644
---- a/src/auth/passdb.h
-+++ b/src/auth/passdb.h
-@@ -63,10 +63,6 @@ struct passdb_module {
- /* Default password scheme for this module.
- If default_cache_key is set, must not be NULL. */
- const char *default_pass_scheme;
-- /* Supported authentication mechanisms, NULL is all, [NULL] is none*/
-- const char *const *mechanisms;
-- /* Username filter, NULL is no filter */
-- const char *const *username_filter;
-
- /* If blocking is set to TRUE, use child processes to access
- this passdb. */
-
-From a1022072e2ce36f853873d910287f466165b184b Mon Sep 17 00:00:00 2001
-From: Timo Sirainen <timo.sirainen@open-xchange.com>
-Date: Mon, 16 May 2022 14:58:45 +0200
-Subject: [PATCH 2/2] auth: Add a comment about updating userdb_find()
-
----
- src/auth/userdb.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/src/auth/userdb.c b/src/auth/userdb.c
-index 0849659102..830bc2dd64 100644
---- a/src/auth/userdb.c
-+++ b/src/auth/userdb.c
-@@ -158,7 +158,8 @@ userdb_preinit(pool_t pool, const struct auth_userdb_settings *set)
- userdb->id = ++auth_userdb_id;
- userdb->iface = iface;
- userdb->args = p_strdup(pool, set->args);
--
-+ /* NOTE: if anything else than driver & args are added here,
-+ userdb_find() also needs to be updated. */
- array_push_back(&userdb_modules, &userdb);
- return userdb;
- }
diff --git a/net-mail/dovecot/files/dovecot-2.3.19.1-slibtool.patch b/net-mail/dovecot/files/dovecot-2.3.19.1-slibtool.patch
deleted file mode 100644
index 8371a6ee67f2..000000000000
--- a/net-mail/dovecot/files/dovecot-2.3.19.1-slibtool.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-Upstream-commit: https://github.com/dovecot/core/commit/d5f5cd32bafc18a28a7edbe1dbe559f8abe55323
-
-From d5f5cd32bafc18a28a7edbe1dbe559f8abe55323 Mon Sep 17 00:00:00 2001
-From: Timo Sirainen <timo.sirainen@open-xchange.com>
-Date: Mon, 25 Jul 2022 19:47:34 +0300
-Subject: [PATCH] lib-index: Makefile.am - Fix double-linking of
- mail-index-util.o
-
-This fixes linking with slibtool.
----
- src/lib-index/Makefile.am | 15 +++++++++------
- 1 file changed, 9 insertions(+), 6 deletions(-)
-
-diff --git a/src/lib-index/Makefile.am b/src/lib-index/Makefile.am
-index f203201bf7..a4af01715b 100644
---- a/src/lib-index/Makefile.am
-+++ b/src/lib-index/Makefile.am
-@@ -79,10 +79,13 @@ test_programs = \
- noinst_PROGRAMS = $(test_programs)
-
- test_libs = \
-- mail-index-util.lo \
- ../lib-test/libtest.la \
- ../lib/liblib.la
-
-+test_minimal_libs = \
-+ mail-index-util.lo \
-+ $(test_libs)
-+
- test_deps = $(noinst_LTLIBRARIES) $(test_libs)
-
- test_mail_cache_SOURCES = test-mail-cache-common.c test-mail-cache.c
-@@ -114,19 +117,19 @@ test_mail_index_sync_ext_LDADD = $(noinst_LTLIBRARIES) $(test_libs)
- test_mail_index_sync_ext_DEPENDENCIES = $(test_deps)
-
- test_mail_index_transaction_finish_SOURCES = test-mail-index-transaction-finish.c
--test_mail_index_transaction_finish_LDADD = mail-index-transaction-finish.lo $(test_libs)
-+test_mail_index_transaction_finish_LDADD = mail-index-transaction-finish.lo $(test_minimal_libs)
- test_mail_index_transaction_finish_DEPENDENCIES = $(test_deps)
-
- test_mail_index_transaction_update_SOURCES = test-mail-index-transaction-update.c
--test_mail_index_transaction_update_LDADD = mail-index-transaction-update.lo $(test_libs)
-+test_mail_index_transaction_update_LDADD = mail-index-transaction-update.lo $(test_minimal_libs)
- test_mail_index_transaction_update_DEPENDENCIES = $(test_deps)
-
- test_mail_index_write_SOURCES = test-mail-index-write.c
--test_mail_index_write_LDADD = mail-index-write.lo $(test_libs)
-+test_mail_index_write_LDADD = mail-index-write.lo $(test_minimal_libs)
- test_mail_index_write_DEPENDENCIES = $(test_deps)
-
- test_mail_transaction_log_append_SOURCES = test-mail-transaction-log-append.c
--test_mail_transaction_log_append_LDADD = mail-transaction-log-append.lo $(test_libs)
-+test_mail_transaction_log_append_LDADD = mail-transaction-log-append.lo $(test_minimal_libs)
- test_mail_transaction_log_append_DEPENDENCIES = $(test_deps)
-
- test_mail_transaction_log_file_SOURCES = test-mail-transaction-log-file.c
-@@ -134,7 +137,7 @@ test_mail_transaction_log_file_LDADD = $(noinst_LTLIBRARIES) $(test_libs)
- test_mail_transaction_log_file_DEPENDENCIES = $(test_deps)
-
- test_mail_transaction_log_view_SOURCES = test-mail-transaction-log-view.c
--test_mail_transaction_log_view_LDADD = mail-transaction-log-view.lo $(test_libs)
-+test_mail_transaction_log_view_LDADD = mail-transaction-log-view.lo $(test_minimal_libs)
- test_mail_transaction_log_view_DEPENDENCIES = $(test_deps)
-
- check-local:
diff --git a/net-mail/dovecot/files/dovecot-2.3.21.1-gcc15-test.patch b/net-mail/dovecot/files/dovecot-2.3.21.1-gcc15-test.patch
deleted file mode 100644
index 774fe67f9659..000000000000
--- a/net-mail/dovecot/files/dovecot-2.3.21.1-gcc15-test.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-https://github.com/dovecot/core/pull/229
-
-From aaeabfec1abd0d4f2b68819a1afee51defd62e3c Mon Sep 17 00:00:00 2001
-From: Sam James <sam@gentoo.org>
-Date: Sat, 28 Dec 2024 13:17:24 +0000
-Subject: [PATCH] lib: test-data-stack - Drop bogus assertion
-
-This assertion goes back to 992a1726a41b42fa47204565ff17f7c635fcb421 when
-test-data-stack.c was added.
-
-It starts to fail with (upcoming) GCC 15 which has improvements for
-optimising out redundant pointer-vs-pointer comparisons, specifically
-r15-580-gf3e5f4c58591f5 for gcc bug PR13962.
-
-Anyway, this is a problem for this assertion because t_malloc_no0
-is marked with `__attribute__((malloc))` which guarantees that the
-returned pointer doesn't alias, hence a == b must be false.
-
-Bug: https://bugs.gentoo.org/939857
---- a/src/lib/test-data-stack.c
-+++ b/src/lib/test-data-stack.c
-@@ -188,7 +188,6 @@ static void test_ds_buffers(void)
- void *b = t_buffer_get(1000);
- void *a = t_malloc_no0(1);
- void *b2 = t_buffer_get(1001);
-- test_assert(a == b); /* expected, not guaranteed */
- test_assert(b2 != b);
- } T_END;
- test_end();
-
diff --git a/net-mail/dovecot/files/dovecot-2.3.21.1-lto-tests.patch b/net-mail/dovecot/files/dovecot-2.3.21.1-lto-tests.patch
deleted file mode 100644
index 9173674ef1a1..000000000000
--- a/net-mail/dovecot/files/dovecot-2.3.21.1-lto-tests.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-https://github.com/dovecot/core/pull/230
-
-From 33cda8cbbc445d27ce38234b17442a9abe66167f Mon Sep 17 00:00:00 2001
-From: Martin Liska <mliska@suse.cz>
-Date: Fri, 24 Mar 2023 13:33:13 +0100
-Subject: [PATCH 1/2] lib: md4 - Fix violation of strict aliasing.
-
-Fix miscompilation when LTO is enabled.
-
-(cherry picked from commit f0c1cf42ea78d22e2674b03fe65f0ee6545c5b99)
---- a/src/lib/md4.c
-+++ b/src/lib/md4.c
-@@ -34,23 +34,6 @@
- (a) = ((a) << (s)) | ((a) >> (32 - (s)))
-
-
--/*
-- * SET reads 4 input bytes in little-endian byte order and stores them
-- * in a properly aligned word in host byte order.
-- *
-- * The check for little-endian architectures which tolerate unaligned
-- * memory accesses is just an optimization. Nothing will break if it
-- * doesn't work.
-- */
--#if defined(__i386__) || defined(__x86_64__) || defined(__vax__)
--/* uint_fast32_t might be 64 bit, and thus may read 4 more bytes
-- * beyond the end of the buffer. So only read precisely 32 bits
-- */
--#define SET(n) \
-- (*(const uint32_t *)&ptr[(n) * 4])
--#define GET(n) \
-- SET(n)
--#else
- #define SET(n) \
- (ctx->block[(n)] = \
- (uint_fast32_t)ptr[(n) * 4] | \
-@@ -59,7 +42,6 @@
- ((uint_fast32_t)ptr[(n) * 4 + 3] << 24))
- #define GET(n) \
- (ctx->block[(n)])
--#endif
-
- /*
- * This processes one or more 64-byte data blocks, but does NOT update
-
-From 6cdd0b1428ab393ec5996ed10a98e7a7043c501f Mon Sep 17 00:00:00 2001
-From: Sam James <sam@gentoo.org>
-Date: Mon, 27 Mar 2023 02:25:12 +0100
-Subject: [PATCH 2/2] lib: md5: Fix strict aliasing violation
-
-Followup to f0c1cf42ea78d22e2674b03fe65f0ee6545c5b99. It's exactly the
-same code as in md4, so let's rip it out here too.
-
-(cherry picked from commit 6de2e4ac0b9abd4ab09b68f1f7e5f032705080b1)
---- a/src/lib/md5.c
-+++ b/src/lib/md5.c
-@@ -38,20 +38,6 @@
- (a) = (((a) << (s)) | (((a) & 0xffffffff) >> (32 - (s)))); \
- (a) += (b);
-
--/*
-- * SET reads 4 input bytes in little-endian byte order and stores them
-- * in a properly aligned word in host byte order.
-- *
-- * The check for little-endian architectures which tolerate unaligned
-- * memory accesses is just an optimization. Nothing will break if it
-- * doesn't work.
-- */
--#if defined(__i386__) || defined(__x86_64__) || defined(__vax__)
--#define SET(n) \
-- (*(const uint32_t *)&ptr[(n) * 4])
--#define GET(n) \
-- SET(n)
--#else
- #define SET(n) \
- (ctx->block[(n)] = \
- (uint_fast32_t)ptr[(n) * 4] | \
-@@ -60,7 +46,6 @@
- ((uint_fast32_t)ptr[(n) * 4 + 3] << 24))
- #define GET(n) \
- (ctx->block[(n)])
--#endif
-
- /*
- * This processes one or more 64-byte data blocks, but does NOT update
-
diff --git a/net-mail/dovecot/files/dovecot-2.4.1-src_lib-ssl-iostream_iostream-openssl_c.patch b/net-mail/dovecot/files/dovecot-2.4.1-src_lib-ssl-iostream_iostream-openssl_c.patch
new file mode 100644
index 000000000000..52f5f9ece945
--- /dev/null
+++ b/net-mail/dovecot/files/dovecot-2.4.1-src_lib-ssl-iostream_iostream-openssl_c.patch
@@ -0,0 +1,14 @@
+diff '--color=auto' -urN dovecot-2.4.1-4.orig/src/lib-ssl-iostream/iostream-openssl.c dovecot-2.4.1-4/src/lib-ssl-iostream/iostream-openssl.c
+--- dovecot-2.4.1-4.orig/src/lib-ssl-iostream/iostream-openssl.c 2025-04-13 10:45:37.678600528 +0200
++++ dovecot-2.4.1-4/src/lib-ssl-iostream/iostream-openssl.c 2025-04-13 10:58:06.917886380 +0200
+@@ -891,8 +891,9 @@
+ if (SSL_version(ssl_io->ssl) < TLS1_3_VERSION
+ #ifdef SSL_OP_NO_RENEGOTIATION
+ && HAS_NO_BITS(SSL_get_options(ssl_io->ssl),
+- SSL_OP_NO_RENEGOTIATION))
++ SSL_OP_NO_RENEGOTIATION)
+ #endif
++ )
+ {
+ *error_r = t_strdup_printf(
+ "Channel binding type 'tls-exporter' not available: "
diff --git a/net-mail/dovecot/files/dovecot-2.4.2-fix-32bit.patch b/net-mail/dovecot/files/dovecot-2.4.2-fix-32bit.patch
deleted file mode 100644
index 9919a0fd8840..000000000000
--- a/net-mail/dovecot/files/dovecot-2.4.2-fix-32bit.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-https://bugs.gentoo.org/967978#c20
-https://github.com/dovecot/pigeonhole/commit/82e3d905d68723f6477619ebb0a642ffe7f126bc
-
-From 82e3d905d68723f6477619ebb0a642ffe7f126bc Mon Sep 17 00:00:00 2001
-From: Timo Sirainen <timo.sirainen@open-xchange.com>
-Date: Wed, 29 Oct 2025 13:27:21 +0200
-Subject: [PATCH] lib-sieve: plugins: extlists: Fix max_lookup_size setting
- type
-
-It failed with compiler error on 32bit systems.
----
- src/lib-sieve/plugins/extlists/ext-extlists-settings.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/lib-sieve/plugins/extlists/ext-extlists-settings.h b/src/lib-sieve/plugins/extlists/ext-extlists-settings.h
-index 142598a6..82ab593c 100644
---- a/src/lib-sieve/plugins/extlists/ext-extlists-settings.h
-+++ b/src/lib-sieve/plugins/extlists/ext-extlists-settings.h
-@@ -12,7 +12,7 @@ struct ext_extlists_list_settings {
-
- const char *name;
- /* Maximum size of lookup value */
-- size_t max_lookup_size;
-+ uoff_t max_lookup_size;
-
- struct {
- const char *name;
-
diff --git a/net-mail/dovecot/files/dovecot-2.4.2-tests.patch b/net-mail/dovecot/files/dovecot-2.4.2-tests.patch
deleted file mode 100644
index aa83552e52ba..000000000000
--- a/net-mail/dovecot/files/dovecot-2.4.2-tests.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-https://bugs.gentoo.org/968559
-https://github.com/dovecot/core/commit/2b3ed7030c3c5a969d862d3faac5ec2357608138
-https://github.com/dovecot/core/commit/04eff0c501595912191945d7021ca67c46f7bd27
-
-From 2b3ed7030c3c5a969d862d3faac5ec2357608138 Mon Sep 17 00:00:00 2001
-From: Aki Tuomi <aki.tuomi@open-xchange.com>
-Date: Wed, 12 Nov 2025 08:54:38 +0200
-Subject: [PATCH] m4: Set DOVECONF_PATH
-
-If dovecot is not installed, it points to dovecot build location.
----
- m4/dovecot.m4 | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/m4/dovecot.m4 b/m4/dovecot.m4
-index 1b45bc9a4f..829b2f122f 100644
---- a/m4/dovecot.m4
-+++ b/m4/dovecot.m4
-@@ -6,7 +6,7 @@ dnl This file is free software; the authors give
- dnl unlimited permission to copy and/or distribute it, with or without
- dnl modifications, as long as this notice is preserved.
-
--# serial 45
-+# serial 46
-
- dnl
- dnl Check for support for D_FORTIFY_SOURCE=2
-@@ -425,6 +425,10 @@ AC_DEFUN([DC_DOVECOT],[
- AS_IF([test x$DOVECOT_HAVE_MAIL_UTF8 = xyes], [
- AC_DEFINE([DOVECOT_HAVE_MAIL_UTF8],,"Define if Dovecot has mail UTF-8 support")
- ])
-+ AS_IF([test "$DOVECOT_INSTALLED" != "yes"],
-+ AC_SUBST([DOVECONF_PATH], [$dovecotdir/src/config/doveconf]),
-+ AC_SUBST([DOVECONF_PATH], []))
-+
- AM_CONDITIONAL(DOVECOT_INSTALLED, test "$DOVECOT_INSTALLED" = "yes")
-
- DC_PLUGIN_DEPS
-
-From 04eff0c501595912191945d7021ca67c46f7bd27 Mon Sep 17 00:00:00 2001
-From: Aki Tuomi <aki.tuomi@open-xchange.com>
-Date: Wed, 12 Nov 2025 08:58:08 +0200
-Subject: [PATCH] build-aux/run-test.sh.in: Export DOVECONF_PATH if it's set
-
----
- build-aux/run-test.sh.in | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/build-aux/run-test.sh.in b/build-aux/run-test.sh.in
-index 325bb48..f0c7011 100644
---- a/build-aux/run-test.sh.in
-+++ b/build-aux/run-test.sh.in
-@@ -1,12 +1,16 @@
- #!/bin/sh
-
--## serial 2
-+## serial 3
-
- set -eu
-
- top_srcdir="@abs_top_srcdir@"
- VALGRIND="@VALGRIND@"
-
-+if [ "@DOVECONF_PATH@" != "" ]; then
-+ export DOVECONF_PATH="@DOVECONF_PATH@"
-+fi
-+
- if test $# -eq 0 || test "$1" = ""; then
- echo "Missing target binary" >&2
- exit 1
diff --git a/net-mail/dovecot/files/dovecot-2.4.3-fix-32bit.patch b/net-mail/dovecot/files/dovecot-2.4.3-fix-32bit.patch
deleted file mode 100644
index 4279b9507634..000000000000
--- a/net-mail/dovecot/files/dovecot-2.4.3-fix-32bit.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-bug #971763
-Test values overflow long in 32bit
---- a/src/lib/test-event-filter.c
-+++ b/src/lib/test-event-filter.c
-@@ -1003,32 +1003,32 @@
- { "field > 1mins", 60 * 1000 * 1000, FALSE },
- { "field < 1mins", 60 * 1000 * 1000, FALSE },
-
-- { "field = 1hours", 60L * 60 * 1000 * 1000, TRUE },
-- { "field = 1h", 60L * 60 * 1000 * 1000, TRUE },
-- { "field = 3600000000", 60L * 60 * 1000 * 1000, TRUE },
-- { "field >= 1hours", 60L * 60 * 1000 * 1000, TRUE },
-- { "field <= 1hours", 60L * 60 * 1000 * 1000, TRUE },
-- { "field > 1mins", 60L * 60 * 1000 * 1000, TRUE },
-- { "field > 1hours", 60L * 60 * 1000 * 1000, FALSE },
-- { "field < 1hours", 60L * 60 * 1000 * 1000, FALSE },
-+ { "field = 1hours", 60LL * 60 * 1000 * 1000, TRUE },
-+ { "field = 1h", 60LL * 60 * 1000 * 1000, TRUE },
-+ { "field = 3600000000", 60LL * 60 * 1000 * 1000, TRUE },
-+ { "field >= 1hours", 60LL * 60 * 1000 * 1000, TRUE },
-+ { "field <= 1hours", 60LL * 60 * 1000 * 1000, TRUE },
-+ { "field > 1mins", 60LL * 60 * 1000 * 1000, TRUE },
-+ { "field > 1hours", 60LL * 60 * 1000 * 1000, FALSE },
-+ { "field < 1hours", 60LL * 60 * 1000 * 1000, FALSE },
-
-- { "field = 1days", 24L * 60 * 60 * 1000 * 1000, TRUE },
-- { "field = 1d", 24L * 60 * 60 * 1000 * 1000, TRUE },
-- { "field = 86400000000", 24L * 60 * 60 * 1000 * 1000, TRUE },
-- { "field >= 1days", 24L * 60 * 60 * 1000 * 1000, TRUE },
-- { "field <= 1days", 24L * 60 * 60 * 1000 * 1000, TRUE },
-- { "field > 1hours", 24L * 60 * 60 * 1000 * 1000, TRUE },
-- { "field > 1days", 24L * 60 * 60 * 1000 * 1000, FALSE },
-- { "field < 1days", 24L * 60 * 60 * 1000 * 1000, FALSE },
-+ { "field = 1days", 24LL * 60 * 60 * 1000 * 1000, TRUE },
-+ { "field = 1d", 24LL * 60 * 60 * 1000 * 1000, TRUE },
-+ { "field = 86400000000", 24LL * 60 * 60 * 1000 * 1000, TRUE },
-+ { "field >= 1days", 24LL * 60 * 60 * 1000 * 1000, TRUE },
-+ { "field <= 1days", 24LL * 60 * 60 * 1000 * 1000, TRUE },
-+ { "field > 1hours", 24LL * 60 * 60 * 1000 * 1000, TRUE },
-+ { "field > 1days", 24LL * 60 * 60 * 1000 * 1000, FALSE },
-+ { "field < 1days", 24LL * 60 * 60 * 1000 * 1000, FALSE },
-
-- { "field = 1weeks", 7L * 24 * 60 * 60 * 1000 * 1000, TRUE },
-- { "field = 1w", 7L * 24 * 60 * 60 * 1000 * 1000, TRUE },
-- { "field = 604800000000", 7L * 24 * 60 * 60 * 1000 * 1000, TRUE },
-- { "field >= 1weeks", 7L * 24 * 60 * 60 * 1000 * 1000, TRUE },
-- { "field <= 1weeks", 7L * 24 * 60 * 60 * 1000 * 1000, TRUE },
-- { "field > 1days", 7L * 24 * 60 * 60 * 1000 * 1000, TRUE },
-- { "field > 1weeks", 7L * 24 * 60 * 60 * 1000 * 1000, FALSE },
-- { "field < 1weeks", 7L * 24 * 60 * 60 * 1000 * 1000, FALSE },
-+ { "field = 1weeks", 7LL * 24 * 60 * 60 * 1000 * 1000, TRUE },
-+ { "field = 1w", 7LL * 24 * 60 * 60 * 1000 * 1000, TRUE },
-+ { "field = 604800000000", 7LL * 24 * 60 * 60 * 1000 * 1000, TRUE },
-+ { "field >= 1weeks", 7LL * 24 * 60 * 60 * 1000 * 1000, TRUE },
-+ { "field <= 1weeks", 7LL * 24 * 60 * 60 * 1000 * 1000, TRUE },
-+ { "field > 1days", 7LL * 24 * 60 * 60 * 1000 * 1000, TRUE },
-+ { "field > 1weeks", 7LL * 24 * 60 * 60 * 1000 * 1000, FALSE },
-+ { "field < 1weeks", 7LL * 24 * 60 * 60 * 1000 * 1000, FALSE },
- };
-
- struct event_filter *filter;
-
----
-On 32-bit systems with signed time_t (e.g. x86), the gmtime_max
-configure test incorrectly reports TIME_T_MAX_BITS=32 instead of 31.
---- a/m4/gmtime_max.m4 2026-03-31 17:09:12.700626480 +0200
-+++ b/m4/gmtime_max.m4 2026-03-31 17:09:39.249235416 +0200
-@@ -8,7 +8,7 @@
- FILE *f;
- int bits;
-
-- for (bits = 1; bits < sizeof(time_t)*8; bits++) {
-+ for (bits = 1; bits < sizeof(time_t)*8 - 1; bits++) {
- time_t t = ((time_t)1 << bits) - 1;
- if (gmtime(&t) == NULL) {
- bits--;
diff --git a/net-mail/dovecot/files/dovecot-autoconf-lua-version-v2.patch b/net-mail/dovecot/files/dovecot-autoconf-lua-version-v2.patch
deleted file mode 100644
index 7ba19a4c74a4..000000000000
--- a/net-mail/dovecot/files/dovecot-autoconf-lua-version-v2.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/m4/want_lua.m4 2021-06-14 16:40:37.000000000 +0300
-+++ b/m4/want_lua.m4 2021-06-22 10:24:39.036095013 +0300
-@@ -16,12 +16,10 @@
- AS_IF([test -n "$LUA_CFLAGS" -o -n "$LUA_LIBS"], [
- with_lua=yes
- ], [
-- for LUAPC in lua5.3 lua-5.3 lua53 lua5.1 lua-5.1 lua51 lua; do
- PKG_CHECK_MODULES([LUA], [$LUAPC >= 5.1 $LUAPC != 5.2] , [
- with_lua=yes
- ], [LUAPC=""]) # otherwise pkg_check will fail
- if test "x$LUA_LIBS" != "x"; then break; fi
-- done
- ])
- ])
-
diff --git a/net-mail/dovecot/files/dovecot-autoconf-lua-version-v3.patch b/net-mail/dovecot/files/dovecot-autoconf-lua-version-v3.patch
deleted file mode 100644
index 7fd32e71bcea..000000000000
--- a/net-mail/dovecot/files/dovecot-autoconf-lua-version-v3.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- a/m4/want_lua.m4 2025-05-04 20:10:02.438557238 +0200
-+++ b/m4/want_lua.m4 2025-05-04 20:10:51.606553311 +0200
-@@ -6,7 +6,6 @@
- dnl Use pkgconfig to first find out all luas that are there
- LUAPCS=$($PKG_CONFIG --list-all | $EGREP "lua-?...? " | sort -r)
- dnl Then we pick suitable one
-- for LUAPC in $LUAPCS lua; do
- PKG_CHECK_MODULES([LUA], [$LUAPC >= 5.1 $LUAPC != 5.2], [
- have_lua=yes
- AC_MSG_NOTICE([using library $LUAPC])
-@@ -14,7 +13,6 @@
- ], [
- :
- ])
-- done
- ], [have_lua=yes])
- AS_IF([test "$want_lua" = "yes" && test "$have_lua" = "no"], [
- AC_MSG_ERROR([cannot build with Lua support: lua not found])
diff --git a/net-mail/dovecot/files/dovecot-openssl-3.patch b/net-mail/dovecot/files/dovecot-openssl-3.patch
deleted file mode 100644
index 8f39a7ddfe21..000000000000
--- a/net-mail/dovecot/files/dovecot-openssl-3.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From: =?utf-8?q?Christian_G=C3=B6ttsche?= <cgzones@googlemail.com>
-Date: Wed, 11 May 2022 20:27:53 +0200
-Author: Michal Hlavinka
-Origin: https://bugzilla.redhat.com/show_bug.cgi?id=1962035
-Subject: Support openssl 3.0
-
----
- src/lib-dcrypt/dcrypt-openssl.c | 20 ++++++++++++++++++++
- 1 file changed, 20 insertions(+)
-
-diff --git a/src/lib-dcrypt/dcrypt-openssl.c b/src/lib-dcrypt/dcrypt-openssl.c
-index 1cbe352..5570d62 100644
---- a/src/lib-dcrypt/dcrypt-openssl.c
-+++ b/src/lib-dcrypt/dcrypt-openssl.c
-@@ -73,10 +73,30 @@
- 2<tab>key algo oid<tab>1<tab>symmetric algo name<tab>salt<tab>hash algo<tab>rounds<tab>E(RSA = i2d_PrivateKey, EC=Private Point)<tab>key id
- **/
-
-+#if OPENSSL_VERSION_MAJOR == 3
-+static EC_KEY *EVP_PKEY_get0_EC_KEYv3(EVP_PKEY *key)
-+{
-+ EC_KEY *eck = EVP_PKEY_get1_EC_KEY(key);
-+ EVP_PKEY_set1_EC_KEY(key, eck);
-+ EC_KEY_free(eck);
-+ return eck;
-+}
-+
-+static EC_KEY *EVP_PKEY_get1_EC_KEYv3(EVP_PKEY *key)
-+{
-+ EC_KEY *eck = EVP_PKEY_get1_EC_KEY(key);
-+ EVP_PKEY_set1_EC_KEY(key, eck);
-+ return eck;
-+}
-+
-+#define EVP_PKEY_get0_EC_KEY EVP_PKEY_get0_EC_KEYv3
-+#define EVP_PKEY_get1_EC_KEY EVP_PKEY_get1_EC_KEYv3
-+#else
- #ifndef HAVE_EVP_PKEY_get0
- #define EVP_PKEY_get0_EC_KEY(x) x->pkey.ec
- #define EVP_PKEY_get0_RSA(x) x->pkey.rsa
- #endif
-+#endif
-
- #ifndef HAVE_OBJ_LENGTH
- #define OBJ_length(o) ((o)->length)
diff --git a/net-mail/dovecot/files/dovecot-socket-name-too-long.patch b/net-mail/dovecot/files/dovecot-socket-name-too-long.patch
deleted file mode 100644
index 64c17f367b99..000000000000
--- a/net-mail/dovecot/files/dovecot-socket-name-too-long.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/src/imap/test-imap-client-hibernate.c 2021-01-05 11:42:53.073912808 +0300
-+++ b/src/imap/test-imap-client-hibernate.c 2021-01-05 11:43:49.790616213 +0300
-@@ -19,7 +19,7 @@
-
- #include <sys/stat.h>
-
--#define TEMP_DIRNAME ".test-imap-client-hibernate"
-+#define TEMP_DIRNAME ".t-ic-h" /* test-imap-client-hibernate */
-
- #define EVILSTR "\t\r\n\001"
-
diff --git a/net-mail/dovecot/files/dovecot-typo-push.patch b/net-mail/dovecot/files/dovecot-typo-push.patch
deleted file mode 100644
index 4fb551bcd261..000000000000
--- a/net-mail/dovecot/files/dovecot-typo-push.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From cd2ff353c6198428219fea76bdd296e5256d97b6 Mon Sep 17 00:00:00 2001
-From: orbea <orbea@riseup.net>
-Date: Tue, 5 Mar 2024 18:15:58 -0800
-Subject: [PATCH] push-notification: fix typo 'module' to '-module'
-
-There is a typo in the Makefile.am where it has 'module` instead of '-module' which causes a build failure with slibtool.
-
- ld: cannot find module: No such file or directory
-
-With GNU libtool the typo is silently ignored.
----
- src/plugins/push-notification/Makefile.am | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/plugins/push-notification/Makefile.am b/src/plugins/push-notification/Makefile.am
-index f1527148a0..daa43a2d4d 100644
---- a/src/plugins/push-notification/Makefile.am
-+++ b/src/plugins/push-notification/Makefile.am
-@@ -75,7 +75,7 @@ lib22_push_notification_lua_plugin_la_CFLAGS = $(AM_CPPFLAGS) \
- -I$(top_srcdir)/src/lib-lua \
- -I$(top_srcdir)/src/plugins/mail-lua \
- $(LUA_CFLAGS)
--lib22_push_notification_lua_plugin_la_LDFLAGS = module -avoid-version
-+lib22_push_notification_lua_plugin_la_LDFLAGS = -module -avoid-version
- module_LTLIBRARIES += \
- lib22_push_notification_lua_plugin.la
- lib22_push_notification_lua_plugin_la_LIBADD = $(notify_deps) $(LUA_LIBS)
diff --git a/net-mail/dovecot/files/dovecot_openssl_common_h.patch b/net-mail/dovecot/files/dovecot_openssl_common_h.patch
new file mode 100644
index 000000000000..40f54225aa48
--- /dev/null
+++ b/net-mail/dovecot/files/dovecot_openssl_common_h.patch
@@ -0,0 +1,11 @@
+diff '--color=auto' -urN dovecot-2.4.4.orig/src/lib-ssl-iostream/dovecot-openssl-common.h dovecot-2.4.4/src/lib-ssl-iostream/dovecot-openssl-common.h
+--- dovecot-2.4.4.orig/src/lib-ssl-iostream/dovecot-openssl-common.h 2026-05-13 21:25:41.651524109 +0200
++++ dovecot-2.4.4/src/lib-ssl-iostream/dovecot-openssl-common.h 2026-05-13 21:33:34.894693140 +0200
+@@ -14,3 +14,7 @@
+ const char **error_r);
+
+ #endif
++
++#if defined(LIBRESSL_VERSION_NUMBER)
++#define OPENSSL_INIT_NO_ATEXIT 0x00080000L
++#endif
diff --git a/net-mail/dovecot/metadata.xml b/net-mail/dovecot/metadata.xml
index 4df0f640bdf0..e2b540e208c6 100644
--- a/net-mail/dovecot/metadata.xml
+++ b/net-mail/dovecot/metadata.xml
@@ -1,22 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd">
<pkgmetadata>
+ <maintainer type="project">
+ <email>dev@liguros.net</email>
+ <name>Development</name>
+ </maintainer>
<maintainer type="person">
<email>eras@gentoo.org</email>
<name>Eray Aslan</name>
</maintainer>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:dovecot:dovecot</remote-id>
+ </upstream>
<use>
<flag name="argon2">Add support for ARGON2 password schemes</flag>
<flag name="managesieve">Add managesieve protocol support</flag>
<flag name="sieve">Add sieve support</flag>
<flag name="lucene">Add lucene full text search (FTS) support using <pkg>dev-cpp/clucene</pkg>
</flag>
+ <flag name="lzma">Add support for lzma (de)compression</flag>
<flag name="rpc">Add support for NFS quotas</flag>
<flag name="solr">Add solr full text search (FTS) support</flag>
- <flag name="stemmer">Add libstemmer support (for FTS)</flag>
- <flag name="system-icu">Use system dev-libs/icu instead of the bundled library</flag>
<flag name="textcat">Add libtextcat language guessing support for full text search (FTS)</flag>
- <flag name="xapian">Add xapian (flatcurve) full text search (FTS) support</flag>
+ <flag name="zstd">Add support for zstd (de)compression</flag>
</use>
<origin>baldeagleos-repo</origin>
</pkgmetadata>