summaryrefslogtreecommitdiff
path: root/net-mail/dovecot
diff options
context:
space:
mode:
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.ebuild3
-rw-r--r--net-mail/dovecot/dovecot-2.4.1.ebuild244
-rw-r--r--net-mail/dovecot/files/50-misc.conf109
-rw-r--r--net-mail/dovecot/files/dovecot-2.4.1-gssapi-regression.patch14
-rw-r--r--net-mail/dovecot/files/dovecot-autoconf-lua-version-v3.patch18
-rw-r--r--net-mail/dovecot/metadata.xml1
7 files changed, 397 insertions, 2 deletions
diff --git a/net-mail/dovecot/Manifest b/net-mail/dovecot/Manifest
index 9cc0170ccb4a..bc8ee234268a 100644
--- a/net-mail/dovecot/Manifest
+++ b/net-mail/dovecot/Manifest
@@ -1,13 +1,19 @@
+AUX 50-misc.conf 1966 BLAKE2B b8e89a1de823fd8ef62353e8978c24e8b60ed40042752d601b7c6b5222d5de7ab975828138d18bd488f0f7af88ed11965b52c4f5c2f0ca026ebb752bab3f0c18 SHA512 021157687420efec01b4e7d39adb4071cd75d3d2b96cc70e57e6283eea9e1c4bda3c84f31f306a4f8221375fcc90be56b4091f65b056a701459c39eb12349496
AUX CVE-2022-30550.patch 5745 BLAKE2B ae48938734cceefa05473fa1d055e5d85c27f8a73ac4ed24debb631d83efbd1a1c94dd3629514d193abf5810d9adbf609c6cfc077d2a9de3e37d7429311ef86e SHA512 b2ff67fd8b6c5cea93877651a1168ef1a5d399cc5f1a61d1cce407c7624f5b6d758996084c6a5714b6880de0ce11ce5eac74a1e02918758cb6983caedb651c58
AUX dovecot-2.3.19.1-slibtool.patch 2935 BLAKE2B b54beb9364aba2e326249f41c77efd4633551498f420e7cfcd7da9c2409774d3caa3cd1df713332eaf2da1dd6f3bcec5e12947c25e536224ab21958a90f77103 SHA512 7c16efa35be9800061ae513117e2e8ed23cb81aa0db6dabf51c8e6c984ec317976fe97ceafda3387b7fe0c62bc5838240c6167003e0364548ead9aae40b91756
AUX dovecot-2.3.21.1-gcc15-test.patch 1085 BLAKE2B 766cd155da6bf7e51d85dc49f7d60f618be41d41762a7b460130929cbe0fcf5127e7a89539f831451eafc02d545d824e6c884af00684a021b6522432a9aaa4ec SHA512 06e9cf80dbdfaa3f1d942ed50b0eeaebe34ef636f1905525f51945e1c599b5d488580236fbd6f6285cf0f7d17492ab325240e0ee6c15b7c925ba3de5f570efd2
AUX dovecot-2.3.21.1-lto-tests.patch 2567 BLAKE2B 30328c6ca2c1072289585a7af240101c37da6aa52e8541fa66a1fc6a84fea548b76cad69692822bbe044847b3776ad1e52c8f9162dfe65ee1c203ed53a63fddd SHA512 f4f9b068b27b4c917218aeb924b34233dfec665083c009e48fc904a2ad659867373f1c72750ad6346faacd00c6dac8fc799e73fec1eca50c11c4f24e547f8860
+AUX dovecot-2.4.1-gssapi-regression.patch 586 BLAKE2B de09c8ca0cfcd6f3cd14b480761b4874a99f0007d41d9c1910880e37d259da3a68953d6a1bc003ca6103ca35046dcea0c3541ecdac3fd7e901f1a8278e12ea35 SHA512 3bbefe9dd1aea0a720663126a60898e44be55c7104f63b05c414bbbd54f031ebd782606e2267fa32213fc69499f5a79c95ad166b262ef6504c7e40ad292a49fa
AUX dovecot-autoconf-lua-version-v2.patch 524 BLAKE2B a0cb51a21169e55fe0ae92ed7fad3ccc898585ed4b0c9ed3db243b6f41165d5a4ad6470a6a76f5a04a44d450068da1b7173707f272f65a72265d4b49a630ac2e SHA512 cc9319926f90a4c4aaf1d1e77944bfa5df9f7f15ee9581469ff8c1a069ef18e55addb69fcfe88e024cad8544c0efb90f5b83c2b6d803e0c68770467849d31f78
+AUX dovecot-autoconf-lua-version-v3.patch 711 BLAKE2B 51dd37d20728663c14e6ac588abba5bb2a5541474077b8dd02371d7b44cdc43ecf23d6ed5da1f741e9dab9fd1a74a429225a4d1b274bb5973674cfcf7a40d629 SHA512 935015d6e1cc660ebe78f6ed9a638bc1fa940b61f34271ec6c328b7c9c3a8d972c350af344b8ef04453069b2b7102da4553c86e5721e78f4306f8adeecdf082f
AUX dovecot-openssl-3.patch 1345 BLAKE2B 282d18622d3a7eaab800ffda97a7bb72c242a505b228cd0f233394bb6d65bf5facc8f7576e73ba043bef11c8389da9f9bd211803819e5825c14843d8ba29b81d SHA512 b24db39cce6c388ab85eab7a9c161eb10ee871f5d78c7778e40a43acc3711486b4259dbbaef40c54efce55d3c8ca7cc8841adbe8528d75c6e8d60ba08b75df79
AUX dovecot-socket-name-too-long.patch 356 BLAKE2B ada5007b620cd5eef5a950d64add7d83ac366f126e1a9a70268e528d44a0a036fec096015bee2421caeca8a052d118011c5911b3c432fa73e846c66781df4da9 SHA512 f362bad725c9e408830dc9d5908a2b35b8ee82cb05f3d58795079b32d5ac4712779e71bd0f479fe072906fcaf01e4e08f08cedb9fd5ee08931409887480b8349
AUX dovecot-typo-push.patch 1217 BLAKE2B 813fcaf232fab6579aff27d636a902156d5a302c8ba5a7d522ab1021a2a1785ebcea8e1e2e6eb315c16c00c60c7633574ca48e41024b6225361b1a4d265fd84f SHA512 d66b7dd623b00086fee5e2b1c841f0e62339910c151cb758b71277ddfeda5009b58f1d74f61b2f1763fa44a4424d5d89ad5f5b5004eaefec1c02c79a80bec596
AUX dovecot.init-r6 1573 BLAKE2B 206318cbf7a6ef0276cb93237b091dd34dc2603a00f13ed288c787dc81f8902e770f7774c54eba90de49e9634eb93873046a043bd7825cfb65bab5b2ea9ce108 SHA512 982f9897e4a0a5a3957bb12785961c9cde72a2c941f55efdb23e9a26cec19efe89e3be4effe79522c297ea2b258d201db78c19b6e3f9cd5e68d3736c2a0f0063
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
-EBUILD dovecot-2.3.21.1-r1.ebuild 9009 BLAKE2B eef08b164b1ea25cad21f0a081907acd81cccd388b9b6b5830d7c615a6ebbaeda9f92e4c8473f68d30a2704d028c89ebd973b0dde96b81f4502f4f0b05da1ba5 SHA512 d8f988f968f22a19bd578f2e32aab687084c91829197fd3a441d46eb0c251f731eef098ce65200c075898f5337f7c600066c7d13e12b3d11128ac691a042bf65
-MISC metadata.xml 901 BLAKE2B fdc5511093672f5f3d685b6b9f3e8f6da2c5d39b86ce9a7407cce420d4333863f9a17ded8e6e89a78af1b5567f1a575a1fe7b5e9276640a3e0d8f0b9ffcb6316 SHA512 288a5812cc4880a10fa615c860649fe7809a0ebc8a6cc4e13352c1f21f94264bd2700241cb479891b84660b9f5202cdcd4a2c28c2da70980bffa191583571fd7
+DIST dovecot-2.4.1.tar.gz 6288223 BLAKE2B 4e0864984682e3b8a7e0cfb91794d7b8609fa1f33323443921a10abd286e58aa9e1e07807ddaf55d80e7994c6490e11d5f2543235c9a538cca2c8f4a268ea4f1 SHA512 4915e9282898a4bce4dc3c9781f9aa849e8a2d5bb89dffc2222b417560eaa0135d66342ef342098a86dd5e9b4e76d41145381b7264144411cf45a6f88ca36698
+DIST dovecot-pigeonhole-2.4.1.tar.gz 2014526 BLAKE2B 29b395065bbc8bb535ff15ba84238db4bb5494662814208eb03d1104d16914e9954fbec6bd406f2f3d1d267177694c47defb69d9b04565916d8b2dc52c89cde8 SHA512 47b9cc62b13d710123389c47d13c104e70b815d683dc6b957e86b57b2f175101d07f462d0fdb0488d6dcdcfbbc137c926825ba9a0d798551576aa7f3c9082100
+EBUILD dovecot-2.3.21.1-r1.ebuild 9079 BLAKE2B 7c6a89bc22ee9fe1c7d722a95ee732b7e9e2083ca07c5a617b667b2a84e7682b40f6e723fcaf1ab0fc8e1484e53baba8f4d8ef0a455b80db74980ad443e1cbce SHA512 d8a9ca9a0341ff798d947ee4fcdac1c73c0f4f35bc013d8a77c2a823e114d34b78a013b882422caea1f7d8067903a8cfc41141bcbfa7c962dcb3843250437fea
+EBUILD dovecot-2.4.1.ebuild 6663 BLAKE2B 811607ea9271bbcb520ef0ebfe7f3a26ccd8471146ca8671680a81a0264142316939e4202469c1f4e2421fb4658cda61d9f396d299251afbf52183de1796f94e SHA512 62ab2d75bf049198bd143d4b1d073932604ee8aa56eefaf71bcfefc042981daeb9de93de431c6b57ba34102b699a84b02988c6194734adc6141ef23b1b021e6a
+MISC metadata.xml 984 BLAKE2B 43934b366b562fe5856c62a55b23be3544644c0c00472aedc356b0135f7052741c84fd8a0a5c1c88eafd4c142ad2c3367a321a11030d235425439c8d11a56933 SHA512 abb9efab2f260769665cd4940219aa0312b0889cb8742534eee76f266489e6120474def80476fa7c3ba8a69b1b7ff3380e789d4b3f21fed7420474119a3a58fe
diff --git a/net-mail/dovecot/dovecot-2.3.21.1-r1.ebuild b/net-mail/dovecot/dovecot-2.3.21.1-r1.ebuild
index 7c7b37808ee9..e61e16869c16 100644
--- a/net-mail/dovecot/dovecot-2.3.21.1-r1.ebuild
+++ b/net-mail/dovecot/dovecot-2.3.21.1-r1.ebuild
@@ -108,6 +108,9 @@ src_prepare() {
# Bug #727244
append-cflags -fasynchronous-unwind-tables
+
+ # Can be dropped with 2.4.x (bug #947906)
+ append-cflags -std=gnu17
}
src_configure() {
diff --git a/net-mail/dovecot/dovecot-2.4.1.ebuild b/net-mail/dovecot/dovecot-2.4.1.ebuild
new file mode 100644
index 000000000000..0d6f35dd653f
--- /dev/null
+++ b/net-mail/dovecot/dovecot-2.4.1.ebuild
@@ -0,0 +1,244 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua5-1 lua5-{3..4} )
+# 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/_/.}-4"
+MY_PV="${PV}-4"
+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 \
+ -> ${P}.tar.gz
+ sieve? (
+ https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-pigeonhole-${MY_PV}.tar.gz \
+ -> ${PN}-pigeonhole-${PV}.tar.gz
+ )
+ managesieve? (
+ https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-pigeonhole-${MY_PV}.tar.gz \
+ -> ${PN}-pigeonhole-${PV}.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_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 unwind"
+
+IUSE="${IUSE_DOVECOT_AUTH_DICT} ${IUSE_DOVECOT_COMPRESS} ${IUSE_DOVECOT_FTS} ${IUSE_DOVECOT_OTHER}"
+
+# ldap requirement for sieve seems to be a bug
+REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )
+ sieve? ( ldap )"
+
+DEPEND="
+ app-arch/bzip2
+ dev-libs/icu:=
+ dev-libs/openssl:0=
+ net-libs/libtirpc:=
+ net-libs/rpcsvc-proto
+ sys-libs/libcap
+ sys-libs/zlib:=
+ 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:= )
+ suid? ( acct-group/mail )
+ systemd? ( sys-apps/systemd:= )
+ 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?]
+ "
+
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-autoconf-lua-version-v3.patch"
+ "${FILESDIR}/${PN}-2.4.1-gssapi-regression.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 \
+ --disable-rpath \
+ --with-bzlib \
+ --without-libbsd \
+ --with-libcap \
+ --with-icu \
+ --enable-experimental-mail-utf8 \
+ $( use_with argon2 sodium ) \
+ $( use_with cdb) \
+ $( 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
+ cd "../dovecot-pigeonhole-${MY_PV}" || 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 )
+ fi
+}
+
+src_compile() {
+ default
+ if use sieve || use managesieve; then
+ cd "../dovecot-pigeonhole-${MY_PV}" || 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-pigeonhole-${MY_PV}" || 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
+
+ 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
+ cd "../dovecot-pigeonhole-${MY_PV}" || die "cd failed"
+ emake DESTDIR="${ED}" install
+
+ newdoc README README.pigeonhole
+ 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
+ fi
+
+ rm -r "${ED}"/usr/share/dovecot
+ use static-libs || find "${ED}"/usr/lib* -name '*.la' -delete
+}
+
+pkg_postinst() {
+ local replacing_version
+ for replacing_version in ${REPLACING_VERSIONS} ; do
+ if ver_test "${replacing_version}" -lt 2.4 ; then
+ # This is an upgrade which requires user review
+ ewarn ""
+ 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"
+ # Show this elog only once
+ break
+ fi
+ done
+
+ # 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/dovecot/server
+ fi
+}
diff --git a/net-mail/dovecot/files/50-misc.conf b/net-mail/dovecot/files/50-misc.conf
new file mode 100644
index 000000000000..3038506c9451
--- /dev/null
+++ b/net-mail/dovecot/files/50-misc.conf
@@ -0,0 +1,109 @@
+## 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 {
+#}
diff --git a/net-mail/dovecot/files/dovecot-2.4.1-gssapi-regression.patch b/net-mail/dovecot/files/dovecot-2.4.1-gssapi-regression.patch
new file mode 100644
index 000000000000..1f810c2b0e48
--- /dev/null
+++ b/net-mail/dovecot/files/dovecot-2.4.1-gssapi-regression.patch
@@ -0,0 +1,14 @@
+#see https://dovecot.org/mailman3/archives/list/dovecot@dovecot.org/message/O54EAGLIXXHMOH7BQCCKHHB3Z32HDWVR/
+diff --git a/src/auth/mech-gssapi.c b/src/auth/mech-gssapi.c
+index 57a2b125b2..4ff5716528 100644
+--- a/src/auth/mech-gssapi.c
++++ b/src/auth/mech-gssapi.c
+@@ -672,7 +672,7 @@ mech_gssapi_auth_initial(struct auth_req
+
+ if (data_size == 0) {
+ /* The client should go first */
+- auth_request_handler_reply_continue(request, NULL, 0);
++ auth_request_handler_reply_continue(request, uchar_empty_ptr, 0);
+ } else {
+ mech_gssapi_auth_continue(request, data, data_size);
+ }
diff --git a/net-mail/dovecot/files/dovecot-autoconf-lua-version-v3.patch b/net-mail/dovecot/files/dovecot-autoconf-lua-version-v3.patch
new file mode 100644
index 000000000000..7fd32e71bcea
--- /dev/null
+++ b/net-mail/dovecot/files/dovecot-autoconf-lua-version-v3.patch
@@ -0,0 +1,18 @@
+--- 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/metadata.xml b/net-mail/dovecot/metadata.xml
index d94fbb16f7df..bb978c3336f3 100644
--- a/net-mail/dovecot/metadata.xml
+++ b/net-mail/dovecot/metadata.xml
@@ -14,6 +14,7 @@
<flag name="solr">Add solr full text search (FTS) support</flag>
<flag name="stemmer">Add libstemmer support (for FTS)</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>
</use>
<upstream>
<remote-id type="github">dovecot/core</remote-id>