Citadel? Courier? Cyrus? Dovecot? - I just want to backup my emails

Jan 01, 2026 Last reply: 5 months ago 73 Replies

From a brief look at Cyrus, it seemed potentially quite complicated. Dovecot was just more approachable.

Yes, debian has it and openSuSE has it. And I can confirm that compiling from scratch is not as easy as it looked like. I tried to create a package for Mageia, based on the original tarball, but there are plenty of dependencies not visible during configure/make/makeinstall. It compiled and built, but the result was not funtional. Creating a new rpm out of that failed as well.

Trying to "swipe" the source rpm from other distros is also far from trivial because most of them are based on tarball 3.15 ... 3.17, which is

6 years or older. So, the current version 3.21 makes some patches obsolete and instead new dependencies are to be expected.

First I also thought of this text-based set of tools as being an easy job to build a package, but it turned out that this is not the case.

Best reagards,

Markus

On Debian and derivatives, if you want to build your own version of a package, a quick “apt-get build-dep «package»” will get you all of the dependencies for the standard version of that package. Which should be most, if not all, of what you need.

Oh yes, thanks - always worth a trial!

Best regards, Markus

Well I built GNU Mailutils 3.21 from source with all the functionality you require and noted the following dependencies:

readline-dev, libunistring-dev, gnutls38-dev, tcp_wrappers-dev, libltdl, libtool-dev, libgsasl-dev

At least libgsasl-dev probably isn't needed for your use since I only added that to enable SMTP authentication using putmail. IMAP authentication using movemail was working before that. Some others might be surplus to requirements too.

It _does_ tell you better than some what dependencies it's using, although I agree the docs aren't so clear about the old "what does this dependency do for _me_?" problem, which is hardly unique to this project.

******************************************************************* GNU Mailutils configured with the following settings:

Default mailbox scheme ........ mbox Use PAM ....................... no Use -ltdl ..................... yes Use DBM ....................... no Use GNU TLS ................... yes Use GSASL ..................... yes Use GSSAPI .................... no Use TCP wrappers .............. yes Pthread support ............... yes Readline support .............. yes Libunistring support .......... yes MySQL support ................. no PostgreSQL support ............ no LDAP support .................. no Radius support ................ no Support for virtual domains ... yes

IPv6 support .................. yes

Interfaces:

Guile ......................... no C++ ........................... no Python ........................ no

Mailbox formats:

IMAP .......................... yes POP ........................... yes MH ............................ yes maildir ....................... yes dotmail ....................... yes

Mailers:

SMTP .......................... yes Sendmail ...................... yes

Utilities to build:

Servers ....................... pop3d imap4d comsat mda lmtpd Clients ....................... putmail frm mail sieve messages readmsg dotlock movemail mimeview decodemail mh

*******************************************************************
[..]

Interesting, thank you!

Well, these are the BUILD dependencies - are there RUNTIME requirements also?

Best regards,

Markus

"local databases" - is this mysql or text based databases?

B.t.w.: Saving emails as text files lets me hope that after upgrade of the imap service or even OS upgrade one day, the old backups stay usable?

I am asking this because I once got into big trouble when I had to move multiple mysql databases to a new machine with new OS and new version of mysqld. - Nothing worked and I had to use mysql-dump to export the data as text-dump on the old system and import them into the new one. After that, the permission system also had to be set up from scratch because of different data format...

Best regards,

Markus

Using the dump format is how you’re supposed to do it. Been there, done that, had to download and run an old MySQL binary to go back and do the dump the proper way (thankfully old binaries are available for just such a purpose).

mysqldump lets you include table permissions with the “--system=users” option.

Generally (but I don't promise that it always works) if you have the dev package installed in order to meet the build requirements you not need anything more at runtime.

There are non-dev packages that meet *only* the runtime requirements for people who don't need to meet the build requirements, but if you have the dev packages you don't need those as well.

B.t.w.,

how do you install all the files retrieved from compiling the tarball from scratch, if you want to avoid building a deb or rpm?

Meaning, do you let "make install" write directly to the filesystem, or do you pack all that files in one tar.gz and then use "alien" to transform it into a deb or rpm?

Best regards,

Markus

That’s usually how it’s done. All the well-behaved build scripts default to putting things in /usr/local, where they don’t clobber stuff handled by your system standard package manager.

Sure, all of those with "-dev" removed, except libtool. You can probably use whatever version of the gnutls package for your distro is the latest.

readline, libunistring, gnutls, tcp_wrappers, libltdl, libgsasl

Although you can build it without some of those, such as libgsasl as mentioned before. Of course exact package names will differ between distros, especially with the "lib" prefixes.

"ldd `which movemail`" is a quick way to see all the libraries used by the executable, however it will show additional libraries used by the direct dependenies, without distinction. Another way is using "readelf -d `which movemail` | grep NEEDED", which just gives you the immediate dependencies, but then in this case you get a bunch of "libmu_*" Mailutils libraries which then also need to be checked with "ldd" or "readelf", and that gets confusing. Also those tools won't show any libraries or executables that are loaded after the program has started. Then you have to work out which packages the libraries belong to, for which the method is specific to your distro or package format.

Anyway in this case you can just go from the list I gave you above.

If you want to install to the system then of course "make install", if you want to make a package or just a tar file that can be unpacked to "/" on similar systems, DESTDIR is useful:

sudo make DESTDIR=/tmp/mailutils install-strip

That installs everything into equivalent directories under /tmp/mailutils as when you do a "make install", with debugging info stripped to avoid wasting space. You should still run it as root so that the file permissions are set correctly. Then you can make a package or tar archive from the contents of that directory for installing to other systems running the same distro.

Note occasionally programs won't support "DESTDIR" and will then install to "/" anyway, and also some won't understand "install-strip" so you must use "install" instead, then run "strip" on the binaries manually. But Mailutils supports both, as, it seems, do all GNU projects.

Hi, regarding Mageia Linux I am working on, I get

needed: available in distro:

readline lib64readline-devel libunistring lib64unistring-devel gnutls lib64gnutls-devel tcp_wrappers tcp_wrappers (no devel, executables in /usr/sbin: safe_finger; tcpd; tcpdchk; tcpdmatch; try-from) libltdl lib64ltdl-devel libgsasl lib64gsasl-devel

So, except "tcp_wrappers", the package seems to be builable?

Thanks a lot!

Good to know, thank you all!

Dovecot is now installed on my machnine, and maybe someone can point me in the right direction:

I just want to have the chance to install one mailbox on dovecot to test with GNU Mailutils and ImapSync. But I am not sure what is needed in addition to the base install (ssl, ...) to connect to this service, having the necessary rights to create mailboxes and set passwords via doveadm.

Thanks for any hint!

[snip]

Yep, and tcp_wrappers looks to be optional, so you can probably ignore that:

"The tcp-wrappers statements provides an alternative way to control accesses to the resources served by GNU Mailutils. This statement is enabled if Mailutils is compiled with TCP wrappers library libwrap."

formatting link

OK, thanks. I see that lib64wrap-devel and libwrap-devel are there. Do you think it is sufficient to just install one of them as dependency?

Probably the lib64 one. The configure script shows the features enabled like I posted before. So if it's found tcp_wrappers/libwrap then you'll get the same as me:

"Use TCP wrappers .............. yes"

If not:

"Use TCP wrappers .............. no"

Either way I expect it'll do everything you need, since I think it's just for the IMAP and POP servers that are also part of Mailutils.

True, building can get hairy. I recently built MEGAcmd (sync tool for mega.nz) for arm64 on my Pi (CM3+ which is the equivalent of a 3B+, so quad core and 1 GB of RAM). Should be easy? But their whatsit build thingy uses architecture based rules but didn't have a rule for arm64. My fumbling with it went nowhere at first but I then managed to somehow inelegantly force it to do arm64. Also they've gone this silly OpenEmbedded kind of way that they want to download the source for and build all dependencies for it. But that part actually worked out of the box as the deps were much smaller than their actual code. Best part, all the deps used other build systems that didn't need fiddling with.

Last but not least, 1 GB of RAM is a piddly amount these days. I added 2 GB of swap to get this to compile since 1 GB wasn't enough.

Setting up a VM or cross compilation for one app didn't feel like worth doing.

Hello all,

I try to set up a simple Dovecot instance on a raspberry where I can create one mailbox and use this for testing purposes with GNU Mailutils and ImapSync.

Therefore I installed Dovecot out of the box and created a user ("cyrus").

For now, it seems to run. While, only the non-encrypting protocols are used (no pop3s, no imaps):

PORT STATE SERVICE

22/tcp open ssh 25/tcp open smtp 80/tcp open http 110/tcp open pop3 119/tcp open nntp 143/tcp open imap 406/tcp open imsp 631/tcp open ipp 8008/tcp open http

When I try to log into Dovecot, it asks for password (based on /etc/shadow as it looks like), but then Dovecot asks for some imap password:

[502 root@rpi-inst ~]# cyradm -u cyrus localhost Password: IMAP Password: Login failed: authentication failure at /usr/lib/arm-linux- gnueabihf/perl5/5.32/Cyrus/IMAP/Admin.pm line 134. cyradm: cannot authenticate to server as cyrus

Can anyone please give some advice how to get a mailbox set up, so that I can test with?

Thank you!

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required