Package Details: cyrus-imapd 3.4.4-1

Git Clone URL: https://aur.archlinux.org/cyrus-imapd.git (read-only, click to copy)
Package Base: cyrus-imapd
Description: An email, contacts and calendar server
Upstream URL: https://www.cyrusimap.org/
Licenses: BSD
Provides: imap-server, pop3-server
Submitter: ryanc
Maintainer: J5lx
Last Packager: J5lx
Votes: 25
Popularity: 0.42
First Submitted: 2007-10-14 08:22 (UTC)
Last Updated: 2022-06-27 18:08 (UTC)

Pinned Comments

Latest Comments

J5lx commented on 2022-02-03 21:38 (UTC)

I’ve applied your workaround as part of the 3.4.3 update. Thanks for reporting!

mappy73 commented on 2022-01-19 15:55 (UTC) (edited on 2022-01-19 15:58 (UTC) by mappy73)

I ran into a bug that has been reported since 3.4.1 and still open: https://github.com/cyrusimap/cyrus-imapd/issues/3562 This bug causes UID SEARCH imap command to either return bogus/nothing or crash the server process, when using squat as the search engine. Not all clients are affected, but some use UID SEARCH extensively and won't download any messages (K-9 mail on Android is an example). There is a workaround: add

    # Work around Cyrus bug #3562
    export CFLAGS="${CFLAGS} -fno-toplevel-reorder"

to build()

jjulian commented on 2021-05-06 00:35 (UTC)

I successfully built 3.4.0. The only changes I had to make besides the pkgver and sha512sum changes was that I could now remove the sphinx3.patch.

J5lx commented on 2020-08-20 10:12 (UTC) (edited on 2020-08-23 10:52 (UTC) by J5lx)

All this might be considerably more manageable if the documentation […] were split off into its own package.

I’ll consider it in the future. For now I’ve stuck with the current method, since I already had a patch ready. Sorry for the late update.

Edit: Unfortunately it’s not that easy after all. I just remembered that the main reason for why those documentation dependencies are needed is not actually for the -docs package, but for some of the manpages in the “main” package, which I’d rather not split out into a completely separate package.

pronet commented on 2020-08-18 15:39 (UTC) (edited on 2020-08-18 15:40 (UTC) by pronet)

If you must use -d to get it to work something else is wrong. Fix that first. You cannot skip package dependencys and expect it to compile correctly. That is why they have package dependencys so everything needed is there. Apparently python-sphinx-2 is not installed correctly. Did you also install it with -d ? Try installing python-sphinx-2 with "yay". It will find all the needed dependencys when it builds the package https://newbloghosting.com/how-to-install-yay-on-arch-linux/ Also you dont need to have old versions installed to use downgrade. downgrade fetches them remotely as shown in my previous post.

zork commented on 2020-08-18 10:17 (UTC)

I cannot use "downgrade" aur package, I do not have older python-sphinx packages in pacman cache. I build python-sphinx-2 from AUR and it worked with makepkg -d and original PKGBUILD (3.0.13). For 3.2.2 I have an error - see my earlier comment.

pronet commented on 2020-08-17 17:18 (UTC) (edited on 2020-08-17 17:20 (UTC) by pronet)

You cannot use -d or it will fail. Did you install "downgrade" from AUR?

pronet commented on 2020-08-17 17:14 (UTC) (edited on 2020-08-17 17:16 (UTC) by pronet)

[cyrus-imapd]$ makepkg
==> Making package: cyrus-imapd 3.2.2-0 (Mon 17 Aug 2020 01:06:17 PM EDT)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Missing dependencies:
  -> python-sphinx<3
==> ERROR: Could not resolve all dependencies.
[cyrus-imapd]$ downgrade python-sphinx 
Available packages:

-   1)  python-sphinx    1.8.3  1  any  (remote)
-   2)  python-sphinx    1.8.4  1  any  (remote)
-   3)  python-sphinx    1.8.5  1  any  (remote)
-   4)  python-sphinx    2.0.1  1  any  (remote)
-   5)  python-sphinx    2.1.0  1  any  (remote)
-   6)  python-sphinx    2.1.1  1  any  (remote)
-   7)  python-sphinx    2.1.2  1  any  (remote)
-   8)  python-sphinx    2.2.0  1  any  (remote)
    9)  python-sphinx    2.2.0  2  any  (remote)
-  10)  python-sphinx    2.2.1  1  any  (remote)
-  11)  python-sphinx    2.2.1  2  any  (remote)
-  12)  python-sphinx    2.4.0  1  any  (remote)
-  13)  python-sphinx    2.4.1  1  any  (remote)
-  14)  python-sphinx    2.4.2  1  any  (remote)
-  15)  python-sphinx    2.4.3  1  any  (remote)
-  16)  python-sphinx    2.4.4  1  any  (remote)
-  17)  python-sphinx    3.0.0  1  any  (remote)
-  18)  python-sphinx    3.0.1  1  any  (remote)
   19)  python-sphinx    3.0.2  1  any  (remote)
   20)  python-sphinx    3.0.3  1  any  (remote)
   21)  python-sphinx    3.0.4  1  any  (remote)
-  22)  python-sphinx    3.1.0  1  any  (remote)
-  23)  python-sphinx    3.1.1  1  any  (remote)
-  24)  python-sphinx    3.1.2  1  any  (remote)
+  25)  python-sphinx    3.2.0  1  any  (remote)
+  26)  python-sphinx    3.2.0  1  any  (local)

select a package by number: 16
 python-sphinx-2.4.4-1-any                                                                         1711.5 KiB   787 KiB/s 00:02 [##############################################################################] 100%
 python-sphinx-2.4.4-1-any.sig                                                                      566.0   B  0.00   B/s 00:00 [##############################################################################] 100%
loading packages...
warning: downgrading package python-sphinx (3.2.0-1 => 2.4.4-1)
resolving dependencies...
looking for conflicting packages...

Packages (1) python-sphinx-2.4.4-1

Total Installed Size:  14.07 MiB
Net Upgrade Size:      -0.98 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                                                                                                  [##############################################################################] 100%
(1/1) checking package integrity                                                                                                [##############################################################################] 100%
(1/1) loading package files                                                                                                     [##############################################################################] 100%
(1/1) checking for file conflicts                                                                                               [##############################################################################] 100%
(1/1) checking available disk space                                                                                             [##############################################################################] 100%
:: Processing package changes...
(1/1) downgrading python-sphinx                                                                                                 [##############################################################################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
add python-sphinx to IgnorePkg? [y/N] n
[cyrus-imapd]$ makepkg
==> Making package: cyrus-imapd 3.2.2-0 (Mon 17 Aug 2020 01:07:14 PM EDT)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found cyrus-imapd-3.2.2.tar.gz
  -> Found cyrus-imapd-3.2.2.tar.gz.sig
  -> Found vzic-flags.patch
  -> Found imapd.conf.patch
  -> Found cyrus-imapd.service
  -> Found cyrus-imapd.sysusers.conf
  -> Found cyrus-imapd.tmpfiles.conf
  -> Updating cyrus-timezones git repo...
Fetching origin
==> Validating source files with sha512sums...

zork commented on 2020-08-17 17:00 (UTC)

python-sphinx-2 (from aur) does not satisfy python-sphinx<3 depenency:

[zork@black cyrus-imapd]$ makepkg
==> Making package: cyrus-imapd 3.2.2-0 (2020-08-17T18:38:58 CEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Missing dependencies:
  -> python-sphinx<3
==> ERROR: Could not resolve all dependencies.

So I build with -d (after make sure that only python-sphinx is missing).

For 3.2.2 I got an error below:

make  install-data-hook
make[4]: Entering directory '/home/zork/aur/cyrus-imapd/src/cyrus-imapd-3.2.2'
make[4]: Nothing to be done for 'install-data-hook'.
make[4]: Leaving directory '/home/zork/aur/cyrus-imapd/src/cyrus-imapd-3.2.2'
make[3]: Leaving directory '/home/zork/aur/cyrus-imapd/src/cyrus-imapd-3.2.2'
make[2]: Leaving directory '/home/zork/aur/cyrus-imapd/src/cyrus-imapd-3.2.2'
Making install in perl/annotator
make[2]: Entering directory '/home/zork/aur/cyrus-imapd/src/cyrus-imapd-3.2.2/perl/annotator'
Manifying 2 pod documents
Installing /home/zork/aur/cyrus-imapd/pkg/cyrus-imapd/usr/share/perl5/vendor_perl/Cyrus/Annotator/Daemon.pm
Installing /home/zork/aur/cyrus-imapd/pkg/cyrus-imapd/usr/share/perl5/vendor_perl/Cyrus/Annotator/AnnotateInlinedCIDs.pm
Installing /home/zork/aur/cyrus-imapd/pkg/cyrus-imapd/usr/share/perl5/vendor_perl/Cyrus/Annotator/Message.pm
Installing /home/zork/aur/cyrus-imapd/pkg/cyrus-imapd/usr/share/man/man3/Cyrus::Annotator::Message.3pm
Installing /home/zork/aur/cyrus-imapd/pkg/cyrus-imapd/usr/share/man/man3/Cyrus::Annotator::Daemon.3pm
Appending installation info to /home/zork/aur/cyrus-imapd/pkg/cyrus-imapd/usr/lib/perl5/5.32/core_perl/perllocal.pod
make[2]: Leaving directory '/home/zork/aur/cyrus-imapd/src/cyrus-imapd-3.2.2/perl/annotator'
Making install in perl/imap
make[2]: Entering directory '/home/zork/aur/cyrus-imapd/src/cyrus-imapd-3.2.2/perl/imap'
Makefile:374: warning: ignoring prerequisites on suffix rule definition
Makefile:374: warning: ignoring prerequisites on suffix rule definition
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- IMAP.bs blib/arch/auto/Cyrus/IMAP/IMAP.bs 644
Manifying 1 pod document
Manifying 4 pod documents
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
Installing /home/zork/aur/cyrus-imapd/pkg/cyrus-imapd/usr/lib/perl5/5.32/vendor_perl/auto/Cyrus/IMAP/IMAP.so
Installing /home/zork/aur/cyrus-imapd/pkg/cyrus-imapd/usr/lib/perl5/5.32/vendor_perl/Cyrus/IMAP.pm
Installing /home/zork/aur/cyrus-imapd/pkg/cyrus-imapd/usr/lib/perl5/5.32/vendor_perl/Cyrus/IMAP/Shell.pm
Installing /home/zork/aur/cyrus-imapd/pkg/cyrus-imapd/usr/lib/perl5/5.32/vendor_perl/Cyrus/IMAP/Admin.pm
Installing /home/zork/aur/cyrus-imapd/pkg/cyrus-imapd/usr/lib/perl5/5.32/vendor_perl/Cyrus/IMAP/IMSP.pm
Installing /home/zork/aur/cyrus-imapd/pkg/cyrus-imapd/usr/share/man/man1/cyradm.1p
Installing /home/zork/aur/cyrus-imapd/pkg/cyrus-imapd/usr/share/man/man3/Cyrus::IMAP::Shell.3pm
Installing /home/zork/aur/cyrus-imapd/pkg/cyrus-imapd/usr/share/man/man3/Cyrus::IMAP.3pm
Installing /home/zork/aur/cyrus-imapd/pkg/cyrus-imapd/usr/share/man/man3/Cyrus::IMAP::IMSP.3pm
Installing /home/zork/aur/cyrus-imapd/pkg/cyrus-imapd/usr/share/man/man3/Cyrus::IMAP::Admin.3pm
Installing /home/zork/aur/cyrus-imapd/pkg/cyrus-imapd/usr/bin/vendor_perl/cyradm
Appending installation info to /home/zork/aur/cyrus-imapd/pkg/cyrus-imapd/usr/lib/perl5/5.32/core_perl/perllocal.pod
make[2]: Leaving directory '/home/zork/aur/cyrus-imapd/src/cyrus-imapd-3.2.2/perl/imap'
Making install in perl/sieve/managesieve
make[2]: Entering directory '/home/zork/aur/cyrus-imapd/src/cyrus-imapd-3.2.2/perl/sieve/managesieve'
Makefile:363: warning: ignoring prerequisites on suffix rule definition
Makefile:363: warning: ignoring prerequisites on suffix rule definition
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- managesieve.bs blib/arch/auto/Cyrus/SIEVE/managesieve/managesieve.bs 644
Manifying 1 pod document
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
Installing /home/zork/aur/cyrus-imapd/pkg/cyrus-imapd/usr/lib/perl5/5.32/vendor_perl/auto/Cyrus/SIEVE/managesieve/managesieve.so
Installing /home/zork/aur/cyrus-imapd/pkg/cyrus-imapd/usr/lib/perl5/5.32/vendor_perl/Cyrus/SIEVE/managesieve.pm
Installing /home/zork/aur/cyrus-imapd/pkg/cyrus-imapd/usr/share/man/man3/Cyrus::SIEVE::managesieve.3pm
Appending installation info to /home/zork/aur/cyrus-imapd/pkg/cyrus-imapd/usr/lib/perl5/5.32/core_perl/perllocal.pod
make[2]: Leaving directory '/home/zork/aur/cyrus-imapd/src/cyrus-imapd-3.2.2/perl/sieve/managesieve'
make[1]: Leaving directory '/home/zork/aur/cyrus-imapd/src/cyrus-imapd-3.2.2'
/home/zork/aur/cyrus-imapd/PKGBUILD: line 91: perllocal.pod: command not found
==> ERROR: A failure occurred in package_cyrus-imapd().
    Aborting...

pronet commented on 2020-08-17 15:52 (UTC) (edited on 2020-08-17 15:53 (UTC) by pronet)

True. there should be python-sphinx-2 and python-sphinx-3 packages available to have both versions available on a system at the same time without version 3 removing version 2. This is just a quick workaround I did for the current situation.

pgoetz commented on 2020-08-17 15:41 (UTC) (edited on 2020-08-17 16:32 (UTC) by pgoetz)

Just a thought. All this might be considerably more manageable if the documentation (the part with the sphinx dependency) were split off into its own package. This is a fairly normal practice for various reasons.

pronet commented on 2020-08-17 15:35 (UTC) (edited on 2020-08-17 15:47 (UTC) by pronet)

You cannot use -d no deps because it builds a library from python-sphinx-2 that cyrus will use. Once the library is built you dont need to have python-sphinx-2 installed anymore. That is why it must be downgraded, build 3.2 and then you can go back to the current version of python-sphinx. This is the error you will get if python-sphinx-2 is not installed. Could not import extension sphinxlocal.builders.manpage (exception: cannot import name 'NoUri' from 'sphinx.environment'

The best way to do this is to download only cyrus-imap from arch with the download only option, and then replace the PKGBUILD file and build and install. If you dont do the download only you will just have to do two builds. The download only or regular build insure the additional files, such at vzic-flags.patch, etc. are downloaded.

Also here is the PKGBUILD to get 3.2.2.

pkgbase=cyrus-imapd
pkgname=(cyrus-imapd cyrus-imapd-docs)
pkgver=3.2.2
pkgrel=0
pkgdesc="An email, contacts and calendar server"
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
url="https://www.cyrusimap.org/"
license=('BSD')
makedepends=('libsasl' 'icu' 'jansson' 'libical' 'libxml2' 'krb5' 'sqlite'
             'mariadb-libs' 'postgresql-libs' 'libnghttp2' 'brotli' 'shapelib'
             'libldap' 'libcap' 'net-snmp' 'xapian-core' 'perl' 'clamav' 'rsync'
             'python-sphinx<3' 'perl-pod-pom-view-restructured')
source=("https://github.com/cyrusimap/cyrus-imapd/releases/download/${pkgbase}-${pkgver}/${pkgbase}-${pkgver}.tar.gz"{,.sig}
        "vzic-flags.patch"
        "imapd.conf.patch"
        "cyrus-imapd.service"
        "cyrus-imapd.sysusers.conf"
        "cyrus-imapd.tmpfiles.conf"
        "git+https://github.com/cyrusimap/cyrus-timezones.git")
validpgpkeys=('5B55619A9D7040A9DEE2A2CB554F04FEB36378E0')
sha512sums=('SKIP'
            'SKIP'
            'ff1adb55abb059f0c022ae3e375c0a099278d69174bef712b85af40b00fa68a6d49604d09f80195a429ff842813e914557d7aff773231776cbbc5037164c180a'
            '0862ffc8c05208efd4d2fb50a6e3719ebc65fc2d72f8e6404235aa32cc44d8227056a17b78f2726e15ff8e38d473795f837c34bfbe89b694b2298c9baab9d5db'
            '738242e80cec2c25ae6a85a889cc8d35d7c2f43b2b4d64d74f99a230b21024f168a885f1e319aec1aab0e0599e41211478b99dc608a4ba036be90f8d7e23fd96'
            '28612e491371515b414ce6d34554f1c2286624f5b80872e6be7037a2cccba1ed5bd2c4bfed27ed978478debdfb5f3d56aaa30d767f50b125f2ad38e76a37702c'
            '70fedcd78f4e505038e2716a0446e7bb7f7a344faf2ab43c51f47380ff56a9c2407cfbe0f24c006618a901e44ff124a7f6ed19203478a6b852d7bda7771210c5'
            'SKIP')

prepare() { cd "${srcdir}/${pkgbase}-${pkgver}" cp -a "${srcdir}/cyrus-timezones/vzic" tools/ mv tools/vzic/Makefile.vzic tools/vzic/Makefile patch -Np1 < "${srcdir}/vzic-flags.patch" autoreconf }

build() { cd "${srcdir}/${pkgbase}-${pkgver}"

export PERL_MM_OPT="NO_PACKLIST=true" # Work around Cyrus bug #2629 export LDFLAGS="${LDFLAGS/,--as-needed}"

./configure \ --prefix=/usr \ --libexecdir=/usr/lib/cyrus \ --sysconfdir=/etc/cyrus \ --sbindir=/usr/bin \ --enable-xapian \ --enable-autocreate \ --enable-idled \ --enable-nntp \ --enable-murder \ --enable-http \ --enable-calalarmd \ --enable-replication \ --enable-backup \ --with-mysql=yes \ --with-pgsql=yes \ --with-ldap \ --with-pidfile=/run/cyrus-master.pid \ --with-syslogfacility=MAIL

make make -C tools/vzic }

check() { cd "${srcdir}/${pkgbase}-${pkgver}"

make check }

package_cyrus-imapd() { depends=('libsasl' 'icu' 'jansson' 'libical' 'libxml2' 'krb5' 'sqlite' 'mariadb-libs' 'postgresql-libs' 'libnghttp2' 'brotli' 'shapelib' 'libldap' 'libcap' 'net-snmp' 'xapian-core' 'perl') optdepends=('cyrus-imapd-docs: documentation' 'clamav: for cyr_virusscan' 'rsync: for compacting Xapian databases') provides=('imap-server' 'pop3-server') backup=('etc/cyrus/cyrus.conf' 'etc/cyrus/imapd.conf') install="${pkgname}.install"

cd "${srcdir}/${pkgbase}-${pkgver}"

make install INSTALLDIRS=vendor DESTDIR="${pkgdir}"

perllocal.pod is undesired in packages

eval local $(perl -V:installarchlib) rm "${pkgdir}/${installarchlib}/perllocal.pod" rmdir "${pkgdir}/${installarchlib}"

Rename httpd.8 and master.8 so they don't conflict with the identically

# named manpages from postfix and apache mv "${pkgdir}/usr/share/man/man8/httpd.8" \ "${pkgdir}/usr/share/man/man8/httpd.8cyrus" mv "${pkgdir}/usr/share/man/man8/master.8" \ "${pkgdir}/usr/share/man/man8/master.8cyrus"

Install additional utilities

for i in arbitronsort.pl masssievec mkimap mknewsgroups rehash \ translatesieve; do install -Dm755 "tools/${i}" "${pkgdir}/usr/bin/${i}" done # Vzic is needed to convert timezone information for CalDAV. Since Cyrus # includes a variant that has been modified for its own needs, we're # installing it under a different name to avoid conflicts install -Dm755 tools/vzic/vzic \ "${pkgdir}/usr/bin/cyrus-vzic" install -Dm755 tools/vzic/vzic-merge.pl \ "${pkgdir}/usr/bin/cyrus-vzic-merge.pl" # vzic-test.pl and vzic-dump.pl appear to be meant for development/testing

Install additional manpages

for i in arbitronsort.pl synctest dav_reconstruct; do install -Dm644 "man/${i}.1" "${pkgdir}/usr/share/man/man1/${i}.1" done for i in cvt_xlist_specialuse cyradm cyrdump cyr_sequence cyr_userseen \ lmtpproxyd masssievec mkimap mknewsgroups mupdate pop3proxyd proxyd \ ptdump ptexpire ptloader rehash sievec sieved translatesieve; do install -Dm644 "man/${i}.8" "${pkgdir}/usr/share/man/man8/${i}.8" done

Install configuration files

install -Dm644 doc/examples/cyrus_conf/normal.conf \ "${pkgdir}/etc/cyrus/cyrus.conf" install -Dm644 doc/examples/imapd_conf/normal.conf \ "${pkgdir}/etc/cyrus/imapd.conf" patch "${pkgdir}/etc/cyrus/imapd.conf" "${srcdir}/imapd.conf.patch" # Example cyrus.conf and imapd.conf use different socket paths, but they need # to match sed -i 's@/var/imap/socket/@/run/cyrus/socket/@' \ "${pkgdir}/etc/cyrus/cyrus.conf"

Install default directories

install -dm750 -o70 -gmail \ "${pkgdir}/var/lib/cyrus" \ "${pkgdir}/var/spool/cyrus" \ "${pkgdir}/var/spool/sieve"

Install system files

install -Dm644 "${srcdir}/cyrus-imapd.service" \ "${pkgdir}/usr/lib/systemd/system/cyrus-imapd.service" install -Dm644 "${srcdir}/cyrus-imapd.sysusers.conf" \ "${pkgdir}/usr/lib/sysusers.d/cyrus-imapd.conf" install -Dm644 "${srcdir}/cyrus-imapd.tmpfiles.conf" \ "${pkgdir}/usr/lib/tmpfiles.d/cyrus-imapd.conf"

Install Documentation

install -Dm644 -t "${pkgdir}/usr/share/doc/cyrus-imapd/" \ README.md doc/README.* cp -r doc/examples "${pkgdir}/usr/share/doc/cyrus-imapd/examples"

install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING" }

package_cyrus-imapd-docs() { pkgdesc="Documentation for the Cyrus IMAP server" arch=('any')

cd "${srcdir}/${pkgbase}-${pkgver}"

install -dm755 "${pkgdir}/usr/share/doc/cyrus-imapd" cp -r doc/html doc/internal doc/legacy doc/text \ "${pkgdir}/usr/share/doc/cyrus-imapd"

install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING" }

pronet commented on 2020-08-17 15:10 (UTC)

zork - What do you mean by "I had no luck with 3.2 and PKGBUILD in comment below"? Did you get build errors and what were they?

zork commented on 2020-08-17 08:40 (UTC) (edited on 2020-08-17 08:41 (UTC) by zork)

Yesterday I just installed 3.0.13 from this PKGBUILD. I had to install python-sphinx-2 from AUR and run makepkg with -d (nodeps) to satisfy python-sphinx<3 dependency.

Maybe it would be better to add dependency on python-sphinx-2 until cyrus fixes problems with version 3?

I had no luck with 3.2 and PKGBUILD in comment below.

pronet commented on 2020-06-17 17:25 (UTC) (edited on 2020-06-17 17:58 (UTC) by pronet)

If you want cyrus-imap-3.2.1 downgrade python-sphinx to 2.4.4.

After the install of 3.2.1 you can re-upgrade python-sphinx.

This also fixes the issue with sieveshell crashing

Replace the PKGBUILD with:

pkgbase=cyrus-imapd
pkgname=(cyrus-imapd cyrus-imapd-docs)
pkgver=3.2.1
pkgrel=0
pkgdesc="An email, contacts and calendar server"
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
url="https://www.cyrusimap.org/"
license=('BSD')
makedepends=('libsasl' 'icu' 'jansson' 'libical' 'libxml2' 'krb5' 'sqlite'
             'mariadb-libs' 'postgresql-libs' 'libnghttp2' 'brotli' 'shapelib'
             'libldap' 'libcap' 'net-snmp' 'xapian-core' 'perl' 'clamav' 'rsync'
             'python-sphinx<3' 'perl-pod-pom-view-restructured')
source=("https://github.com/cyrusimap/cyrus-imapd/releases/download/${pkgbase}-${pkgver}/${pkgbase}-${pkgver}.tar.gz"{,.sig}
        "vzic-flags.patch"
        "imapd.conf.patch"
        "cyrus-imapd.service"
        "cyrus-imapd.sysusers.conf"
        "cyrus-imapd.tmpfiles.conf"
        "git+https://github.com/cyrusimap/cyrus-timezones.git")
validpgpkeys=('5B55619A9D7040A9DEE2A2CB554F04FEB36378E0')
sha512sums=('8a4c2690fbcd064beb20affee6b074211f05f9d2fa752381eb21cf5597ff09357c781ac92162f1eed7d697a19c804560cc3ae87413d9d7b1a31b57298342a60b'
            'SKIP'
            'ff1adb55abb059f0c022ae3e375c0a099278d69174bef712b85af40b00fa68a6d49604d09f80195a429ff842813e914557d7aff773231776cbbc5037164c180a'
            '0862ffc8c05208efd4d2fb50a6e3719ebc65fc2d72f8e6404235aa32cc44d8227056a17b78f2726e15ff8e38d473795f837c34bfbe89b694b2298c9baab9d5db'
            '738242e80cec2c25ae6a85a889cc8d35d7c2f43b2b4d64d74f99a230b21024f168a885f1e319aec1aab0e0599e41211478b99dc608a4ba036be90f8d7e23fd96'
            '28612e491371515b414ce6d34554f1c2286624f5b80872e6be7037a2cccba1ed5bd2c4bfed27ed978478debdfb5f3d56aaa30d767f50b125f2ad38e76a37702c'
            '70fedcd78f4e505038e2716a0446e7bb7f7a344faf2ab43c51f47380ff56a9c2407cfbe0f24c006618a901e44ff124a7f6ed19203478a6b852d7bda7771210c5'
            'SKIP')

prepare() { cd "${srcdir}/${pkgbase}-${pkgver}" cp -a "${srcdir}/cyrus-timezones/vzic" tools/ mv tools/vzic/Makefile.vzic tools/vzic/Makefile patch -Np1 < "${srcdir}/vzic-flags.patch" autoreconf }

build() { cd "${srcdir}/${pkgbase}-${pkgver}"

export PERL_MM_OPT="NO_PACKLIST=true" # Work around Cyrus bug #2629 export LDFLAGS="${LDFLAGS/,--as-needed}"

./configure \ --prefix=/usr \ --libexecdir=/usr/lib/cyrus \ --sysconfdir=/etc/cyrus \ --sbindir=/usr/bin \ --enable-xapian \ --enable-autocreate \ --enable-idled \ --enable-nntp \ --enable-murder \ --enable-http \ --enable-calalarmd \ --enable-replication \ --enable-backup \ --with-mysql=yes \ --with-pgsql=yes \ --with-ldap \ --with-pidfile=/run/cyrus-master.pid \ --with-syslogfacility=MAIL

make make -C tools/vzic }

check() { cd "${srcdir}/${pkgbase}-${pkgver}"

make check }

package_cyrus-imapd() { depends=('libsasl' 'icu' 'jansson' 'libical' 'libxml2' 'krb5' 'sqlite' 'mariadb-libs' 'postgresql-libs' 'libnghttp2' 'brotli' 'shapelib' 'libldap' 'libcap' 'net-snmp' 'xapian-core' 'perl') optdepends=('cyrus-imapd-docs: documentation' 'clamav: for cyr_virusscan' 'rsync: for compacting Xapian databases') provides=('imap-server' 'pop3-server') backup=('etc/cyrus/cyrus.conf' 'etc/cyrus/imapd.conf') install="${pkgname}.install"

cd "${srcdir}/${pkgbase}-${pkgver}"

make install INSTALLDIRS=vendor DESTDIR="${pkgdir}"

# perllocal.pod is undesired in packages eval local $(perl -V:installarchlib) rm "${pkgdir}/${installarchlib}/perllocal.pod" rmdir "${pkgdir}/${installarchlib}"

# Rename httpd.8 and master.8 so they don't conflict with the identically # named manpages from postfix and apache mv "${pkgdir}/usr/share/man/man8/httpd.8" \ "${pkgdir}/usr/share/man/man8/httpd.8cyrus" mv "${pkgdir}/usr/share/man/man8/master.8" \ "${pkgdir}/usr/share/man/man8/master.8cyrus"

# Install additional utilities for i in arbitronsort.pl masssievec mkimap mknewsgroups rehash \ translatesieve; do install -Dm755 "tools/${i}" "${pkgdir}/usr/bin/${i}" done # Vzic is needed to convert timezone information for CalDAV. Since Cyrus # includes a variant that has been modified for its own needs, we're # installing it under a different name to avoid conflicts install -Dm755 tools/vzic/vzic \ "${pkgdir}/usr/bin/cyrus-vzic" install -Dm755 tools/vzic/vzic-merge.pl \ "${pkgdir}/usr/bin/cyrus-vzic-merge.pl" # vzic-test.pl and vzic-dump.pl appear to be meant for development/testing

# Install additional manpages for i in arbitronsort.pl synctest dav_reconstruct; do install -Dm644 "man/${i}.1" "${pkgdir}/usr/share/man/man1/${i}.1" done for i in cvt_xlist_specialuse cyradm cyrdump cyr_sequence cyr_userseen \ lmtpproxyd masssievec mkimap mknewsgroups mupdate pop3proxyd proxyd \ ptdump ptexpire ptloader rehash sievec sieved translatesieve; do install -Dm644 "man/${i}.8" "${pkgdir}/usr/share/man/man8/${i}.8" done

# Install configuration files install -Dm644 doc/examples/cyrus_conf/normal.conf \ "${pkgdir}/etc/cyrus/cyrus.conf" install -Dm644 doc/examples/imapd_conf/normal.conf \ "${pkgdir}/etc/cyrus/imapd.conf" patch "${pkgdir}/etc/cyrus/imapd.conf" "${srcdir}/imapd.conf.patch" # Example cyrus.conf and imapd.conf use different socket paths, but they need # to match sed -i 's@/var/imap/socket/@/run/cyrus/socket/@' \ "${pkgdir}/etc/cyrus/cyrus.conf"

# Install default directories install -dm750 -o70 -gmail \ "${pkgdir}/var/lib/cyrus" \ "${pkgdir}/var/spool/cyrus" \ "${pkgdir}/var/spool/sieve"

# Install system files install -Dm644 "${srcdir}/cyrus-imapd.service" \ "${pkgdir}/usr/lib/systemd/system/cyrus-imapd.service" install -Dm644 "${srcdir}/cyrus-imapd.sysusers.conf" \ "${pkgdir}/usr/lib/sysusers.d/cyrus-imapd.conf" install -Dm644 "${srcdir}/cyrus-imapd.tmpfiles.conf" \ "${pkgdir}/usr/lib/tmpfiles.d/cyrus-imapd.conf"

# Install Documentation install -Dm644 -t "${pkgdir}/usr/share/doc/cyrus-imapd/" \ README.md doc/README.* cp -r doc/examples "${pkgdir}/usr/share/doc/cyrus-imapd/examples"

install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING" }

package_cyrus-imapd-docs() { pkgdesc="Documentation for the Cyrus IMAP server" arch=('any')

cd "${srcdir}/${pkgbase}-${pkgver}"

install -dm755 "${pkgdir}/usr/share/doc/cyrus-imapd" cp -r doc/html doc/internal doc/legacy doc/text \ "${pkgdir}/usr/share/doc/cyrus-imapd"

install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING" }

starfry commented on 2020-05-17 11:30 (UTC)

Hello, previous maintainer here ;) Finally I get around to upgrading my mail server, currently on 2.5.3. Good to see active maintenance on the package... just debating whether to go 3.0.13 or wait for 3.2. Do you have an ETA for 3.2 package?

J5lx commented on 2020-04-18 13:01 (UTC)

Oh great, Sphinx breaking the build again. It’s actually the fault of the 3.x series in general as it seems. For a mercy, Sphinx version 1 has been added to the community repo in the meantime, so we can simply use that for the time being while I figure out a patch. I’ve updated the package accordingly, thanks for reporting!

J5lx commented on 2020-02-15 18:32 (UTC)

Should be fixed now, I’ve submitted a patch to upstream. Thanks for reporting!

a2h commented on 2020-02-07 08:17 (UTC) (edited on 2020-02-07 08:51 (UTC) by a2h)

Hi. I was getting a cap_setuid erroR when building Cyrus.

It looks like it was flagged here: https://www.bountysource.com/issues/87238742-3-0-13-build-fails-with-libcap-2-29

I fixed it by adding this to the prepare() section after the change of directory

egrep -lRZ 'cap_setuid' . | xargs -0 -l sed -i -e 's/cap_setuid/cap_setuid_fixed/g'

J5lx commented on 2019-11-20 19:27 (UTC)

Damn, I forgot to update the checksum. I’ll fix that immediately, sorry about that!

J5lx commented on 2019-09-10 01:31 (UTC)

Small update: I finally figured out how to make the documentation build with Sphinx 2, so the dependency on Sphinx 1 is now gone and there is no longer any need for that virtualenv hack either. I’m sorry that I could’t get it done any earlier.

J5lx commented on 2019-06-21 21:50 (UTC) (edited on 2019-06-22 06:56 (UTC) by J5lx)

guygma: Thanks for the submission. It’s not my way of doing things (I’d rather do it the way it is now or come up with a patch to make it work with Sphinx 2) but I’ll pin a link to it for those who prefer your solution (I don’t want to pin the PKGBUILD itself because that’d push the upgrade note down by a lot). My primary reason for this is that with your solution, the use of pip will result in lots of downloads during the build phase, and this means that if you’re building packages in a clean environment like a chroot (as you have done yourself), those dependencies can’t be cached and will have to be re-downloaded for every package build that needs them. The way it is now, you might have to install “over 200MB” (according to zork, haven’t checked myself) of python2-sphinx dependencies in whatever your build environment is, however those only need to be downloaded once and can then be re-used for every build that needs them. Using pip, on the other hand, these dependencies will have to be re-downloaded on every build, e.g. (presumably) for the next version or (especially important for me) when implementing and testing changes to the packaging process.

Edit: While I won’t be incorporating this change, I do see that it makes the build process more tedious and I’ll give patching for version 2 another try when I find some time for it next week.

Also, on a different note, if you’re here for JMAP support, I’m afraid you’ll have to be a little more patient, since experimental JMAP support was removed in version 3.0.6 and is now planned to have its full release in a later version. Alternatively, if you can’t stand the wait, you could try an unstable version (3.1.x) or the latest code from the master branch. Right now the --enable-jmap option is simply ignored (as you’ll see in build output: configure: WARNING: unrecognized options: --enable-jmap).

zork commented on 2019-06-21 19:16 (UTC)

guygma: Many thanks for your work! It is great that I do not have to install over 200Mb of python2-sphinx dependencies just to build cyrus. Thanks again!

guygma commented on 2019-06-21 12:59 (UTC) (edited on 2019-06-21 13:14 (UTC) by guygma)

OK, so I have updated the PKGBUILD and managed to build in a clean chroot with all of the options enabled (including xapian). I have included the PKGBUILD below in the hopes it makes it easy for the maintainer to update it if they see fit. Also, those who take care to read it may input the edits themselves on their local copy if they had trouble with the previous version as I did.

I believe I have incorporated the suggestions made by all the recent comments in this thread.

EDIT: I can also confirm that --enable-jmap builds properly, which is fantastic as JMAP functionality was the main reason I am moving from Dovecot to Cyrus.

pkgbase=cyrus-imapd
pkgname=(cyrus-imapd cyrus-imapd-docs)
pkgver=3.0.10
pkgrel=1
pkgdesc="An email, contacts and calendar server"
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
url="https://www.cyrusimap.org/"
license=('BSD')
makedepends=('libsasl' 'icu' 'jansson' 'libical' 'libxml2' 'krb5' 'sqlite'
             'mariadb-libs' 'postgresql-libs' 'libnghttp2' 'brotli' 'shapelib'
             'libldap' 'libcap' 'net-snmp' 'xapian-core' 'perl' 'clamav'
             'python-virtualenv' 'perl-pod-pom-view-restructured'
             'perl-module-install' )
source=("https://www.cyrusimap.org/releases/${pkgbase}-${pkgver}.tar.gz"{,.sig}
        "2750.patch::https://github.com/cyrusimap/cyrus-imapd/pull/2750/commits/ad4d5fb85e1480158ee32c9b0d3d0baeac2c324a.patch"
        "perl-libs.patch"
        "vzic-flags.patch"
        "imapd.conf.patch"
        "cyrus-imapd.service"
        "cyrus-imapd.sysusers.conf"
        "cyrus-imapd.tmpfiles.conf")
validpgpkeys=('5B55619A9D7040A9DEE2A2CB554F04FEB36378E0')
sha512sums=('1ae153a8f181bbe020326bec2dc177b78ef3c442f94e24e89b7a719298d93701006596dd21fa1c3a40afd75f01162b03524cf793dd7438ec7192f9a13f7614d0'
            'SKIP'
            'bc4df5a743689cf674d50f32ce04308a6ac9ee167f62fc25cf30d186f8e79523441062e5043f8eab422d8fd8f1c9b8a658d4b3ebe203a27795b793f477364a67'
            '6c1cec2d2cecc000cfa0a95befba75e303a151c6552148c671ef3b054ae7cce457571e0c8d416bb0b2fc83f86d27d2e477ea0073b8fa8ea295f14f5165aae6d5'
            'ff1adb55abb059f0c022ae3e375c0a099278d69174bef712b85af40b00fa68a6d49604d09f80195a429ff842813e914557d7aff773231776cbbc5037164c180a'
            '0862ffc8c05208efd4d2fb50a6e3719ebc65fc2d72f8e6404235aa32cc44d8227056a17b78f2726e15ff8e38d473795f837c34bfbe89b694b2298c9baab9d5db'
            '738242e80cec2c25ae6a85a889cc8d35d7c2f43b2b4d64d74f99a230b21024f168a885f1e319aec1aab0e0599e41211478b99dc608a4ba036be90f8d7e23fd96'
            '28612e491371515b414ce6d34554f1c2286624f5b80872e6be7037a2cccba1ed5bd2c4bfed27ed978478debdfb5f3d56aaa30d767f50b125f2ad38e76a37702c'
            '70fedcd78f4e505038e2716a0446e7bb7f7a344faf2ab43c51f47380ff56a9c2407cfbe0f24c006618a901e44ff124a7f6ed19203478a6b852d7bda7771210c5')

prepare() {
  cd "${srcdir}/${pkgbase}-${pkgver}"

  patch -Np1 < "${srcdir}/2750.patch"
  patch -Np1 < "${srcdir}/perl-libs.patch"
  patch -Np1 < "${srcdir}/vzic-flags.patch"
  autoreconf
}

build() {
  cd "${srcdir}/${pkgbase}-${pkgver}"

  python -m virtualenv --system-site-packages .
  chmod +x bin/activate
  source bin/activate
  pip install sphinx==1.8.5
  export PERL_MM_OPT="NO_PACKLIST=true"
  # Work around Cyrus bug #2629
  export LDFLAGS="${LDFLAGS/,--as-needed}"

  ./configure \
    --prefix=/usr \
    --libexecdir=/usr/lib/cyrus \
    --sysconfdir=/etc/cyrus \
    --sbindir=/usr/bin \
    --enable-xapian \
    --enable-jmap \
    --enable-autocreate \
    --enable-idled \
    --enable-nntp \
    --enable-murder \
    --enable-http \
    --enable-calalarmd \
    --enable-replication \
    --enable-backup \
    --with-mysql=yes \
    --with-pgsql=yes \
    --with-ldap \
    --with-libcap \
    --with-pidfile=/run/cyrus-master.pid \
    --with-syslogfacility=MAIL

  make
  make -C tools/vzic
}

check() {
  cd "${srcdir}/${pkgbase}-${pkgver}"

  make check
  deactivate
}

package_cyrus-imapd() {
  depends=('libsasl' 'icu' 'jansson' 'libical' 'libxml2' 'krb5' 'sqlite'
           'mariadb-libs' 'postgresql-libs' 'libnghttp2' 'brotli' 'shapelib'
           'libldap' 'libcap' 'net-snmp' 'xapian-core' 'perl')
  optdepends=('cyrus-imapd-docs: documentation'
              'clamav: for cyr_virusscan')
  provides=('imap-server' 'pop3-server')
  backup=('etc/cyrus/cyrus.conf' 'etc/cyrus/imapd.conf')
  install="${pkgname}.install"

  cd "${srcdir}/${pkgbase}-${pkgver}"

  make install INSTALLDIRS=vendor DESTDIR="${pkgdir}"

  # perllocal.pod is undesired in packages
  eval local $(perl -V:installarchlib)
  rm "${pkgdir}/${installarchlib}/perllocal.pod"
  rmdir "${pkgdir}/${installarchlib}"

  # Rename httpd.8 and master.8 so they don't conflict with the identically
  # named manpages from postfix and apache
  mv "${pkgdir}/usr/share/man/man8/httpd.8" \
    "${pkgdir}/usr/share/man/man8/httpd.8cyrus"
  mv "${pkgdir}/usr/share/man/man8/master.8" \
    "${pkgdir}/usr/share/man/man8/master.8cyrus"

  # Install additional utilities
  for i in arbitronsort.pl masssievec mkimap mknewsgroups rehash \
           translatesieve; do
    install -Dm755 "tools/${i}" "${pkgdir}/usr/bin/${i}"
  done
  # Vzic is needed to convert timezone information for CalDAV. Since Cyrus
  # includes a variant that has been modified for its own needs, we're
  # installing it under a different name to avoid conflicts
  install -Dm755 tools/vzic/vzic \
    "${pkgdir}/usr/bin/cyrus-vzic"
  install -Dm755 tools/vzic/vzic-merge.pl \
    "${pkgdir}/usr/bin/cyrus-vzic-merge.pl"
  # vzic-test.pl and vzic-dump.pl appear to be meant for development/testing

  # Install additional manpages
  for i in arbitronsort.pl synctest dav_reconstruct; do
    install -Dm644 "man/${i}.1" "${pkgdir}/usr/share/man/man1/${i}.1"
  done
  for i in cvt_xlist_specialuse cyradm cyrdump cyr_sequence cyr_userseen \
           lmtpproxyd masssievec mkimap mknewsgroups mupdate pop3proxyd proxyd \
           ptdump ptexpire ptloader rehash sievec sieved translatesieve; do
    install -Dm644 "man/${i}.8" "${pkgdir}/usr/share/man/man8/${i}.8"
  done

  # Install configuration files
  install -Dm644 doc/examples/cyrus_conf/normal.conf \
    "${pkgdir}/etc/cyrus/cyrus.conf"
  install -Dm644 doc/examples/imapd_conf/normal.conf \
    "${pkgdir}/etc/cyrus/imapd.conf"
  patch "${pkgdir}/etc/cyrus/imapd.conf" "${srcdir}/imapd.conf.patch"
  # Example cyrus.conf and imapd.conf use different socket paths, but they need
  # to match
  sed -i 's@/var/imap/socket/@/run/cyrus/socket/@' \
    "${pkgdir}/etc/cyrus/cyrus.conf"

  # Install default directories
  install -dm750 -o70 -gmail \
    "${pkgdir}/var/lib/cyrus" \
    "${pkgdir}/var/spool/cyrus" \
    "${pkgdir}/var/spool/sieve"

  # Install system files
  install -Dm644 "${srcdir}/cyrus-imapd.service" \
    "${pkgdir}/usr/lib/systemd/system/cyrus-imapd.service"
  install -Dm644 "${srcdir}/cyrus-imapd.sysusers.conf" \
    "${pkgdir}/usr/lib/sysusers.d/cyrus-imapd.conf"
  install -Dm644 "${srcdir}/cyrus-imapd.tmpfiles.conf" \
    "${pkgdir}/usr/lib/tmpfiles.d/cyrus-imapd.conf"

  # Install Documentation
  install -Dm644 -t "${pkgdir}/usr/share/doc/cyrus-imapd/" \
    README.md doc/README.*
  cp -r doc/examples "${pkgdir}/usr/share/doc/cyrus-imapd/examples"

  install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
}

package_cyrus-imapd-docs() {
  pkgdesc="Documentation for the Cyrus IMAP server"
  arch=('any')

  cd "${srcdir}/${pkgbase}-${pkgver}"

  install -dm755 "${pkgdir}/usr/share/doc/cyrus-imapd"
  cp -r doc/html doc/internal doc/legacy doc/text \
    "${pkgdir}/usr/share/doc/cyrus-imapd"

  install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
}

J5lx commented on 2019-06-17 20:22 (UTC) (edited on 2019-06-17 20:24 (UTC) by J5lx)

Yes, it should, but sometimes dependencies get overlooked. As you can see, both I and another user already noted the missing dependency in the comment section of perl-pod-pom back in march, however the maintainer still hasn’t taken action.

On another note, please make sure you have a basic understanding of how installing packages from AUR works. Since you seemingly weren’t aware of the issue with perl-pod-pom and thought it was a problem with this package, I’m suspecting you are using some AUR helper to install these packages. However, it is pretty dangerous to use those tools without an understanding of what exactly they are doing, since the packages on the AUR are created by other users and there is no guarantee they won’t do malicious things to your system. The AUR wiki article should be a good starting point for learning more. If you do know all that already, though, I guess you’ll be safe; I’m just trying to be helpful :)

Edit: Well, looks like someone was faster than me. I shouldn’t try to work on too many things at the same time I guess ^^

zork commented on 2019-06-17 20:02 (UTC)

guygma: yes, but the problem two level depth in cyrus-imapd dependency tree. cyrus-imapd PKGBUILD is fine.

guygma commented on 2019-06-17 20:00 (UTC)

Ok, I will try that... but shouldn’t these things be dependencies defined in the PKGBUILD? I was not at all thinking a set of packages was missing.

zork commented on 2019-06-17 19:38 (UTC)

guygma: pacman -S perl-module-install

See https://aur.archlinux.org/packages/perl-pod-pom/ This is a depenency of perl-pod-pom-view-restructured.

guygma commented on 2019-06-17 19:32 (UTC)

This is breaking for me due to a perl error:

Can't locate inc/Module/Install.pm in @INC (you may need to install the inc::Module::Install module) (@INC contains: /usr/lib/perl5/5.30/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/5.30/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/5.30/core_perl /usr/share/perl5/core_perl) at Makefile.PL line 2. BEGIN failed--compilation aborted at Makefile.PL line 2. ==> ERROR: A failure occurred in build().

Can anyone make sense of this and/or are others experiencing it? It is not a path resolution issue

J5lx commented on 2019-05-08 13:20 (UTC) (edited on 2019-05-08 14:00 (UTC) by J5lx)

I just updated the package to fix all the issues you reported. I'll have to look into upstreaming some of those patches sometime, but for now at least everything should work again. I tried fixing the compatibility issues with Sphinx 2 but that turned out to trickier than I first thought, so for the time being we'll indeed need to build with Sphinx 1. While old versions of the python-sphinx package might work for that purpose, I also turned 1.8.5-1 into the AUR package python-sphinx1 which can be updated should other updates break Sphinx 1.

In April the start of the summer semester kinda messed up my organisation, hence the long wait. Sorry about that! If there are any other issues left, let me know and I should be able to get them resolved much faster now.

Edit: TheGoliath, I noticed I didn't address your comment about the missing perl-module-install. I couldn't reproduce that issue in this package, but I know perl-pod-pom has an issue like that which the maintainer has yet to fix. Might you be referring to that package rather than this one?

zork commented on 2019-05-05 14:22 (UTC) (edited on 2019-05-05 14:31 (UTC) by zork)

To build it now two things need to be done:

  1. Apply patch from this commit:

    https://github.com/cyrusimap/cyrus-imapd/pull/2750/commits/ad4d5fb85e1480158ee32c9b0d3d0baeac2c324a

  2. run makepkg in venv with sphinx-1.8.5 installed: python -m venv /tmp/venv; source /tmp/venv/bin/activate; pip install sphinx==1.8.5; makepkg;

jjulian commented on 2019-04-29 14:00 (UTC)

Filed an issue upstream, TheGoliath: https://github.com/cyrusimap/cyrus-imapd/issues/2749

J5lx commented on 2019-03-16 02:24 (UTC) (edited on 2019-07-14 19:39 (UTC) by J5lx)

I just updated this package to Cyrus 3.0.9 and will push that update in a moment. Since Cyrus 3.0 is a major new version to begin with, I also used the opportunity to make some major changes to this package as well, mostly in order to adhere to certain conventions or as a matter of housekeeping. In doing so I have tried to bring the package back into a good shape after that long-time lack of maintenance, but if there’s something you are unhappy with or if you have further suggestions for improvement, please let me know. Since the changes are so unusually extensive, here’s a rundown of them, how they impact the upgrade procedure (if so) and some reasoning behind them.

  • The most important bit first: Please stop Cyrus before upgrading – there are changes in both this package and Cyrus itself that could otherwise prevent a clean upgrade.
  • Please also read through the upgrade guide before performing the upgrade.
  • Before 3.0, the Cyrus documentation suggested using /var/imap and /var/spool/imap as the config directory and location for partitions, respectively. In 3.0, most materials, including the example config files, point to /var/lib/cyrus and /var/spool/cyrus instead. Therefore, I have changed the default paths in this package as well, however there is no automatic migration, so if you want to migrate to the new directories you will have to do so manually. Of course you can keep using the previous directories as well if you want.
  • Previously, the cyrus user was assigned a random non-system uid (>=1000). Now, it uses a fixed uid and gid of 70, which has been assigned to it for a long time. The id is updated automatically, however you will have to adjust the permissions of paths owned by that user manually, including the previously mentioned /var/imap and /var/spool/imap.
  • The systemd unit has been renamed from cyrus-master.service to cyrus-imapd.service, to make the name more predictable and consistent with other services. cyrus-imapd.service is also the name used by every other distribution I could find, and is even referred to in Cyrus’s own documentation. However this change means that you will have to re-enable the service if it was enabled before.

Additionally, the following changes have also been made, but usually these should not impact the upgrade procedure:

  • The /etc/conf.d/cyrus-master configuration file has been removed. It wasn’t even being used before, and I believe most people won’t need to adjust the command-line parameters anyway. If you still need to do so, you can create a drop-in file for the systemd unit.
  • I’ve completely overhauled the build configuration. In the process, I’ve decided to enable a number of features which weren’t enabled by default. This means that the package has now more dependencies than before, however many of them are likely to be installed on a (mail) server anyway – for example, sqlite, postgresql-libs and mariadb-libs are also needed for postfix and opendkim, among others, while libnghttp2, krb5 and libldap are directly or indirectly required by the ubiquitous curl package. I tried to make a sensible selection, but I’m open to suggestions. I decided against splitting individual components out, but I’m also open to discussing this decision as well.
  • Speaking of split packages, there is now one containing the Cyrus documentation, which was completely overhauled in 3.0.
  • The package no longer conflicts with imap-server and pop3-server. I believe all files which could warrant such a conflict (particularly imapd and pop3d) currently reside in Cyrus’s own libexec directory, but let me know if I overlooked something.
  • !makeflags has been removed from options. I tried building with multiple simultaneous jobs and couldn’t find any problems. Again, let me know if I was mistaken.
  • The install file has been rewritten from scratch. User creation is now handled by systemd-sysusers. The state directories are no longer initialised automatically – this should now be done manually by running mkimap as cyrus:mail (invoke it as sudo runuser -u cyrus -g mail mkimap /etc/cyrus/imapd.conf, for example). They are also no longer set to update synchronously on ext[234] file systems, since this was only ever meant for systems using ext2 which is so ancient that I’m not going to explicitly support it. The configuration files are no longer chowned to cyrus and made read-only to everyone else, as is normally the case for such configuration files.
  • Perl files are now installed into vendor_perl rather than site_perl, as per Perl package guidelines.

jcelerier commented on 2019-01-02 11:38 (UTC)

hi, here (and also according to https://downforeveryoneorjustme.com/cyrusimap.org) the website is down. Anyone else has a mirror ?

cptr13 commented on 2018-12-16 21:50 (UTC)

FTp address needs to be edited, OLD-VERSIONS/ needs to be added to the ftp URL

pgoetz commented on 2018-10-27 13:32 (UTC)

@TheGoliath

Hi -

Sure, you can take it. At first I was waiting for the 3.x series to stabilize, but lately I just haven't had time, and I agree that it desperately needs to get done. The only reason I took it over was the last package maintainer dropped the ball on keeping it Arch compatible (just like I have <:( ).

How do I hand it over to you? Just disown and let you grab it?

bluntroller commented on 2018-09-30 00:08 (UTC)

@pgoetz: Just drop it - it doesn't compile at all.

pgoetz commented on 2017-09-23 16:44 (UTC)

Yep. I've been monitoring the 3.x releases closely via the cyrus-devel and info-cyrus lists, and all the releases so far have been a bit too unstable for my tastes; especially given that I would likely be testing the release on my production IMAP server. 3.0.4 is probably ready for prime time, though. Need to get on the ASAP or turn the package maintenance over to someone else.

aspeer commented on 2017-09-23 13:30 (UTC) (edited on 2017-09-26 16:13 (UTC) by aspeer)

This should be updated to the latest stable version 3.0.4. Here is a patch : https://pastebin.com/6X7XaWUw (edit: it breaks the systemd service though, may need a bit more work to put everything where it should be)

pgoetz commented on 2017-05-26 22:08 (UTC)

Hi Markus - It sounds like you've tested this, so I can certainly make this change. When I checked with the cyrus mailing list about this issue the answer I got was that cyrus 2.5.x is incompatible with openssl 1.1, and I didn't pursue it further, since installing the compatibility openssl 1.0 package solves the problem without violating the Arch rule of not modifying upstream if at all avoidable. Question: Are you (100% - epsilon) certain there are no other compatibility problems, and if so, where does this certainty come from? Seems more prudent to just get 3.0.1 packaged as soon as possible.

markuschaaf commented on 2017-05-26 21:38 (UTC)

I don't see why I have to ask this, but would you be so very kind to just modify PKGBUILD? There is AFAIK no incompatibility between openssl-1.1 and cyrus-imap-2.5. Openssl now happens to include <sched.h> (a posix system header), which creates a name clash with an unlucky chosen identifier in some cyrus files. Renaming that identifier (that has no external visibility) solves the problem without collateral damage. How is installing an older version of openssl better advise? If the upstream maintainers eventually fix this, the sed command will do nothing.

pgoetz commented on 2017-05-26 13:35 (UTC) (edited on 2017-05-26 13:37 (UTC) by pgoetz)

Hi - Sorry, I just took over maintenance of this package, but haven't had time to build a new version yet -- will try and so that in the next couple of days. Meanwhile, here is the very simple fix for this issue for the time being. After upgrading your system and before rebooting (if you run a firewall, you generally must reboot every time the kernel is upgraded or weird things will start to happen), install this package: # pacman -S openssl-1.0 Your cyrus install will continue to work with no interruptions or further intervention. I've tested this on 2 different mail servers. If you've already rebooted and your cyrus install is now broken, no worries. Just install the openssl-1.0 package and restart cyrus-master. Everything should be in order again.

markuschaaf commented on 2017-05-25 22:57 (UTC)

Who is the current maintainer of this package? Comments and metadata leave me confused. Nevertheless a (works for me) fix to the openssl problem is: > prepare() { > for f in $pkgname-$pkgver/imap/*.[hc] ; do sed -i 's/\<struct *sched_param\>/&_/g' "$f" ; done > }

pgoetz commented on 2017-05-17 15:49 (UTC)

@CarstenF: confirmed with the cyrus list that this version of cyrus is no longer compatible with Arch due to the upgrade to openssl-1.1.0.e-1-x86_64.pkg.tar.xz Unfortunately, something needs to be done ASAP.

pgoetz commented on 2017-05-17 14:07 (UTC)

More specifically, the upgrade to openssl 1.1.0.e-1 appears to have broken the cyrus 2.5.10 build process so after compiling it no longer appears to be able to use SSL at all.

pgoetz commented on 2017-05-17 13:42 (UTC)

@CarstenF: Just tried to rebuild cyrus-imapd 2.5.10-1 and it appears to not be playing nice with the current version of libssl.so, libssl.so.1.1. Maybe it's time to update the package? Do you need help with this?

pgoetz commented on 2015-12-15 14:29 (UTC)

@CarstenF: thanks for taking on the maintenance of this package. There's probably no need for a co-maintainer unless you get swamped the way starfry did. I use both Cyrus and dovecot in production and like Cyrus 100x better. Thanks largely to FastMail, the product has been developing rapidly over the last couple of years. You might want to give it a try again some time.

CarstenF commented on 2015-12-15 14:18 (UTC)

@pgoetz Thanks for your comment. No mkimap was not in the package. But I have updated it now. And now it is included. If anybody want to be a co maintainer. Feel free to ask. I only use cyrus for some test setups. I use dovecot in production. Sincerely yours Carsten Feuls

pgoetz commented on 2015-12-14 17:57 (UTC)

Looks like someone else adopted and updated before I had time to deal with this. Excellent. Question: did javitonino's issue with mkimap being missing from the package get resolved?

starfry commented on 2015-11-30 10:51 (UTC)

@pgoetz disowned so that you can adopt. Thanks for stepping in.

pgoetz commented on 2015-11-25 16:46 (UTC)

starfry: thanks for speaking up. I can take over the package if no one else wants to do it, and am happy to turn it back over to you if and when you'd like to be the maintainer again.

starfry commented on 2015-11-25 16:26 (UTC)

I have personal commitments that will prevent me from updating pacakges for a while. If someone wants to take this package over then I'll pass the baton.... Otherwise, I will get around to it as I use this myself, but I can't say when that will be.

pgoetz commented on 2015-11-23 11:18 (UTC)

@javitonino Can you post a link to where mkimap is mentioned in the documentation? I can't find it. I know I've done at least one from scratch installation of cyrus-imapd since switching to Arch and did not use the mkimap command.

javitonino commented on 2015-11-22 20:59 (UTC)

@pgoetz Yep, mkimap is still in upstream tarball, but it is not installed by make install. It is still mentioned as required in the install guide (doc/install-configure.html) but I guess they expect it to be run from the tarball and avoid installing it.

pgoetz commented on 2015-11-20 22:27 (UTC)

@javitonino: The tools can be found in /usr/lib/cyrus/bin; however I don't know anything about mkimap, which is not one of the tools in this folder. You don't actually need to initialize spool directories, as far as I know; so maybe this was taken out of the toolset upstream? I would check with the cyrus-info mailing list or go to the documentation site: https://docs.cyrus.foundation/imap/ to find out for sure.

pgoetz commented on 2015-11-20 22:24 (UTC)

Hi - This package was flagged out of date 2015-09-13 -- over 2 months ago. Normally I wouldn't care, but I'm pretty sure there is a bug in version 2.5.3 that is causing me grief with users with large collections of email. Any chance this package could be upgraded to 2.5.6 ASAP? Thanks!!!

javitonino commented on 2015-06-30 14:22 (UTC)

Is there any reason why the tools (tools/*) are no longer distributed with this package? It happened during the update to 2.5 and removes mkimap from the package, which is needed to initialize the spool directories.

javitonino commented on 2015-04-30 23:16 (UTC)

Updated cyrus-imapd-ldap to match. Seems to work fine as an split package.

starfry commented on 2015-04-24 09:04 (UTC)

updated 2.5.1, kept original design of without LDAP (for the time being at least).

pgoetz commented on 2015-03-04 09:47 (UTC)

cyrus-imapd v. 2.5 has been released. In addition to CalDAV/CardDAV support, I think there are at least 900 bug fixes/updates that have been ported from the FastMail branch.

pgoetz commented on 2015-03-02 12:01 (UTC)

I rather like the idea of having a separate cyrus-imapd-ldap version. This is a limited use context for most Arch users (so why clutter up the basic package?), and it's not that much of a maintenance headache to have 2 similar versions. BTW, note that Cyrus 2.5 is about to be released.

starfry commented on 2015-02-28 10:46 (UTC)

@javitonino I apologise for not getting back to you quicker but it was/is on my do to list. I'll be doing some package building in the upcoming weeks and can look at adding ldap to cyrus-imapd. I'm just wondering how much weight the dependency will add to installs where it isn't required. But I will take a look at it...

javitonino commented on 2015-02-25 10:31 (UTC)

I have uploaded cyrus-imapd-ldap, which adds LDAP support to this package. This way is more modular, but merging it in this package may be more simple (no need to install two packages).

javitonino commented on 2015-02-19 23:50 (UTC)

Hi, I am trying to pack Kolab for Arch, and it uses cyrus-imapd as its LDA. However, I need LDAP support to make it work. Would you consider adding it to this package? It can be done just by adding libldap as a dependency and passing "--with-ldap=/usr" to the configure script. Thanks

pgoetz commented on 2014-10-01 17:30 (UTC)

Ignore my comment regarding /etc/sasldb2 -- this *is* used by cyrus-imapd. I always use cyrus -> saslauthd -> PAM for authentication, so don't actually use sasldb2. I would recommend avoiding this and just go with the PAM solution.

pgoetz commented on 2014-10-01 16:50 (UTC)

The only file in /usr/share/doc/cyrus-imapd is a README which states, in part ------------------- For the real README file, please see doc/readme.html. * To install the software, please read doc/install.html (but please read doc/readme.html first!). * To see the changes since previous versions, check doc/changes.html, and if upgrading look at doc/install-upgrade.html as well. ------------------- Any reason why the docs aren't included with this package? In nothing else, there should be an auxilliary doc package to go with this one (although cyrus documentation is minimal, and takes up hardly any space.

pgoetz commented on 2014-09-30 17:34 (UTC)

> However /etc/sasldb2 is still in berkeley-hash format I'm guessing this file is created by cyrus-sasl, and not cyrus?

mrechte commented on 2014-03-28 13:24 (UTC)

I checked some of my db files like /usr/lib/cyrus/bin/cyr_dbtool /var/imap/mailboxes.db skiplist show, to confirm they are already using skiplist format (so conversion has been made automatically). However /etc/sasldb2 is still in berkeley-hash format The question is how to specify auxprop format to use skiplist rather than berekeley ? I found that cvt_cyrusdb can be use to convert from one db format to another.

pgoetz commented on 2014-03-17 21:41 (UTC)

> what makes drop bdb support. What would be the replacement for it? skiplists. There was a long discussion about this on the cyrus mailing list several years ago (e.g. ~ 2010-09-28). BDB files are somewhat unstable and were causing all kinds of problems (e.g. filling up mail log files with junk like this: IOERROR: opening /var/lib/cyrus/user_deny.db: No such file or directory At that time it was decided the default would change to skiplist. I guess they finally decided to drop support for bdb. OTOH, I thought the old bdb files would be converted automatically to skiplists? BTW, you can't base anything on the Cyrus documentation. This is horribly out of date and generally quite inaccurate. The only place to find correct information is on the cyrus mailing list: info-cyrus@lists.andrew.cmu.edu Yes, I agree: cyrus would be a lot more popular if it had good documentation.

mrechte commented on 2014-02-16 19:50 (UTC)

I checked the diff in libsasl, they are very few but I can't see what makes drop bdb support. What would be the replacement for it ? Cyrus-imap doc still recommends bdb http://cyrusimap.org/docs/cyrus-sasl/2.1.25/install.php (unless this is a new 2.1.26 undocumented feature)...

starfry commented on 2014-02-16 19:11 (UTC)

Hi, U'm sorry but I don't know why the Arch libsasl package has switched away from bdb. I have done a very quick search and I have found this "The Cyrus IMAP configure process attempts to automatically detect and use the latest Berkeley DB technology available on the system. This may, however, not be the same version on your production systems. Since database conversions between versions of the Berkeley DB technology are particularly difficult and therefor NOT considered fully supported, we recommend you do NOT use Berkeley DB." http://www.cyrusimap.org/~vanmeeuwen/cyrus-imapd-2.4-docs/Deployment_Guide/html/sect-Deployment_Guide-Supported_Platforms_and_System_Requirements.html Right now, I haven't got the time to update the cyrus-imap package but I might try and find the time in the next week or two. Alternatively drop an updated PKGBUILD yourself, but I fear this has serious implications for those already running cyrus-imap with a bdb (like me). I am not sure what's involved in upgrading. One for the "to do" list...

mrechte commented on 2014-02-16 09:21 (UTC)

Hello, Since libsasl upgrade (2.1.26-6 -> 2.1.26-7) , sasldb auxiliary property plugin (the default one using Brekeley DB) no longer works. I opened a ticket for that, https://bugs.archlinux.org/task/38920 but it was closed abruptly. I don't understand the explanation given. I had to revert to libsasl 2.1.26-2. Any idea ? Thanks

starfry commented on 2013-11-20 11:44 (UTC)

No idea. Probably because it was like that when I adopted the package. Next time I update the PKGBUILD I will remove this if it isn't necessary.

zork commented on 2013-11-20 11:13 (UTC)

Why PKGBUILD is replacing default makepkg CFLAGS with -fPIC? -FPIC is added anyway by configure and this override removes all optimalizations.

starfry commented on 2013-06-20 15:21 (UTC)

Updated PKGBUILD for pacman 4.1 conventions: uses srcdir/pkgdir and the new package() function. Also removed the new-redundant rc file.

mrechte commented on 2013-05-19 10:07 (UTC)

Hello. I don't know what changed, but it seems $startdir/pkg is not the same than $pkgdir. I had to make several changes to PKGBUILD in order to build OK. The updated script is here: http://pastebin.com/mTybKZAB

starfry commented on 2013-03-17 12:20 (UTC)

Just uploaded new PKGBUILD that includes systemd unit (thanks @mrechte) and I've also removed tcp_wrappers. I checked out the mail group query and it looks to me like cyrus is in the "mail" group (PKGBUILD has --with-cyrus-group=mail in it).

smerik commented on 2012-12-07 09:57 (UTC)

As of 2012-12-01 version 2.4.17 has been released

mrechte commented on 2012-11-22 07:03 (UTC)

From a fresh install, I also noticed that both postfix and cyrus were not members of mail group, preventing postfix to acccess the lmtp socket.

mrechte commented on 2012-11-21 15:26 (UTC)

I suggest the following unit file, but note that /etc/conf.d/cyrus-master becomes useless. Please also note that tcp_wrapper is no longer supported on Arch and therefore such dependancie should be removed from PKGBUILD. $ cat /usr/lib/systemd/system/cyrus-master.service [Unit] Description=implementation of IMAP servers by the Cargegie Mellon University Computer Services Department After=network.target [Service] Type=forking ExecStart=/usr/lib/cyrus/bin/master -d ExecReload=/bin/kill -HUP $MAINPID [Install] WantedBy=multi-user.target

mrechte commented on 2012-10-16 15:18 (UTC)

That would be great if you could provide systemd files :)

commented on 2012-03-12 17:46 (UTC)

PID has been fixed.

commented on 2012-01-06 15:18 (UTC)

2.4.13-1: Install a Cyrus+Postfix setup, no major issue. Just have to fix the /etc/rc.d/cyrus-master script the '/etc/rc.d/cyrus-master stop' is failing for me because the PID was not good, I fix it with: "PID=`pgrep -f /usr/lib/cyrus/bin/master`" If I remember correctly the /lib/ is missing in the path. Sorry I am new to archlinux/pacman, I don't know (yet) how to submit this change myself in AUR (just hand fix it for my local install)

commented on 2011-09-09 15:41 (UTC)

2.4.11-1: Added tcp_wrappers as a dependency. Changed file locations.

starfry commented on 2011-08-01 21:15 (UTC)

I believe this also depends on tcp_wrappers (for libwrap.so.0) which has been deprecated and moved from Core (now in AUR).

mrechte commented on 2011-07-22 09:07 (UTC)

Since DB update form 5.1 to 5.2, package needs to be recompiled.

commented on 2011-07-04 04:28 (UTC)

2.4.9-2: Perl upgraded to 5.14, need recompile. Also fixed the source address issue.

commented on 2011-06-30 12:52 (UTC)

Hi, The source address for cyrus-imapd-2.4.9.tar.gz seems to be wrong. It should be ftp://ftp.cyrusimap.org/cyrus-imapd/cyrus-imapd-2.4.9.tar.gz

mrechte commented on 2011-05-13 09:53 (UTC)

Warning: since the replacement of heimdal by krb5, package needs recompilation. The log was filled up (eventually /avr partition became full) with tons of messages like: May 13 10:52:20 linux2 master[1565]: service lmtpunix pid 2698 in READY state: terminated abnormally

mrechte commented on 2011-04-18 12:48 (UTC)

Hello. I slightly updated the PKGBUILD to work with 2.4.8 version: url="http://www.cyrusimap.org/" .. source=(ftp://ftp.cyrusimap.org/cyrus-imapd/cyrus-imapd-2.4.8.tar.gz .. md5sums=('b55930293787a42d571a47f69aaacf28' ... It compiles and install fine. However there is a problem in the location where perl extensions are installed. To make them work I had to manually do: cd /usr/lib/perl5/vendor_perl cp -r current/i686-linux-thread-multi/Cyrus . cd auto cp -r ../current/i686-linux-thread-multi/auto/Cyrus . Being new to ArchLinux (and a perl nut), I am not (yet) able to fully understand the PKGBUILD script. May be somebody could assist to adapt it. Thanks

tychoish commented on 2011-04-01 13:20 (UTC)

arg. copypaste fail, here's a better pastebin: http://epoxie.net/12015

tychoish commented on 2011-04-01 12:58 (UTC)

I've updated the PKGBUILD (link below) for the latest version of Cyrus imapd http://pastebin.com/WUzHUVyF