[Dovecot] Simplest (static?) build & config for loopback access?
I am installing Dovecot for the sole purpose of maintaining a local mail store that I could 1) manage with any client; 2) keep duplicated on several machines, using Unison; 3) hopefully, index using Spotlight (http://article.gmane.org/gmane.mail.mh-e.user/1308 ...). In particular, I have no intention to allow connections from anywhere but localhost.
I've followed the instructions at http://wiki.dovecot.org/HowTo/Rootless and it all seems to work quite well, but I'm not sure about 3 things:
Initially Dovecot would not respond to Thunderbird ("Could not connect to server localhost; the connection was refused"). Eventually, a "Trying ::1..." in the telnet log (see below) made me find hidden pref "network.dns.disableIPv6" and set it to FALSE. Which solves the problem -- but is this really needed, or have I done something wrong?
The Dovecot I built on OS X 10.4 appears to work fine when copied on another Mac running 10.5. Now, I'd love to avoid installing developer tools on both machines, but I fear this an illusion (some libraries are changing under us, e.g. libiconv.2.2.0.dylib --> libiconv.2.4.0.dylib). Does this mean I should try a static build? If so, what are the flags and how do I go about specifying a minimal set of libraries to include for my purposes?
Probably offtopic here, but has anyone seen a better way to index mail in Spotlight than just as plain text? E.g. to hook up Apple's importer (Mail.mdimporter in /System/Library/Spotlight) or Thunderbird's (https://bugzilla.mozilla.org/show_bug.cgi?id=290057), which I guess can better deal with quoted-printable and other encodings?
Thanks in advance; I include my compilation and config data below. Francois Z.
mini:~ fz$ curl -O http://www.dovecot.org/releases/1.1/dovecot-1.1.2.tar.gz mini:~ fz$ tar xzf dovecot-1.1.2.tar.gz mini:~ fz$ cd dovecot-1.1.2 mini:~/dovecot-1.1.2 fz$ ./configure --prefix=$HOME/sw mini:~/dovecot-1.1.2 fz$ make mini:~/dovecot-1.1.2 fz$ make install mini:~ fz$ cd mini:~ fz$ sw/sbin/dovecot Warning: fd limit 256 is lower than what Dovecot can use under full load (more than 640). Either grow the limit or change login_max_processes_count and max_mail_processes settings mini:~ fz$ telnet localhost 10143 Trying ::1... Connected to localhost. Escape character is '^]'.
- OK Dovecot ready. . login fz ******** . OK Logged in. . list "" *
- LIST (\HasNoChildren) "." "Drafts"
- LIST (\HasNoChildren) "." "Trash"
- LIST (\HasNoChildren) "." "INBOX" . OK List completed. . logout
- BYE Logging out . OK Logout completed. Connection closed by foreign host. mini:~ fz$ sw/sbin/dovecot -n
1.1.2: /Volumes/Home/FZ/sw/etc/dovecot.conf
Warning: fd limit 256 is lower than what Dovecot can use under full load (more than 640). Either grow the limit or change login_max_processes_count and max_mail_processes settings log_path: /Volumes/Home/FZ/Library/Logs/Dovecot/error.log info_log_path: /Volumes/Home/FZ/Library/Logs/Dovecot/info.log listen: localhost:10143 ssl_disable: yes disable_plaintext_auth: no login_dir: /Volumes/Home/FZ/sw/var/run/dovecot/login login_executable: /Volumes/Home/FZ/sw/libexec/dovecot/imap-login login_user: fz login_chroot: no mail_location: maildir:~/Library/Maildir auth default: user: fz passdb: driver: passwd-file args: /Volumes/Home/FZ/sw/etc/dovecot.passwd userdb: driver: passwd mini:~ fz$
- The Dovecot I built on OS X 10.4 appears to work fine when copied on another Mac running 10.5. Now, I'd love to avoid installing developer tools on both machines, but I fear this an illusion (some libraries are changing under us, e.g. libiconv.2.2.0.dylib --> libiconv.2.4.0.dylib). Does this mean I should try a static build? If so, what are the flags and how do I go about specifying a minimal set of libraries to include for my purposes?
Sorry to insist, but... Anyone?
I guess I'm confused by this line in ./configure --help:
--enable-static[=PKGS] build static libraries [default=yes]
Does this mean that my build has (by default) all libraries statically linked, so that there is no problem at all?
Francois Z.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Sat, 16 Aug 2008, fz.2003@klacto.net wrote:
I guess I'm confused by this line in ./configure --help:
--enable-static[=PKGS] build static libraries [default=yes]
This will just build static _libraries_, I guess; there is no configure switch for static application. But you can try:
CFLAGS=-static ./configure
This should propagate the "-static" flag to all make's. However, I supposet that nobody tried something like this, yet, if this procedure works with the plugins for instance.
Bye,
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFIqRh4VJMDrex4hCIRAueKAJsE1Nyemb/C+LuIU8mVU84HbB6uDwCfcqUQ qq07xAaGpMI8PznXoMcbSms= =s+15 -----END PGP SIGNATURE-----
Steffen Kaiser wrote:
--enable-static[=PKGS] build static libraries [default=yes]
This will just build static _libraries_, I guess; there is no configure switch for static application.
You're right; I've since remembered that the Mac has an analog of ldd (otool -L), which confirms that everything is linked dynamically:
mini:~/sw fz$ otool -L \
lib/dovecot/*.so
lib/dovecot/*/*.so
libexec/dovecot/*
sbin/dovecot*
| sort | uniq /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.5) /usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.2) /usr/lib/libcrypto.0.9.7.dylib (compatibility version 0.9.7, current version 0.9.7) /usr/lib/libiconv.2.dylib (compatibility version 5.0.0, current version 5.0.0) /usr/lib/libpam.1.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libssl.0.9.7.dylib (compatibility version 0.9.7, current version 0.9.7) /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
If I'm reading the libtool man page correctly, this should remain binary compatible on any system where the libraries have higher 'compatibility version' numbers. Which seems to be the case going from OS X 10.4 to 10.5 -- running otool -L on the latter gives the same numbers as above except
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0,
current version 111.0.0) /usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.4) /usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
I hope my understanding here is correct; else I'll try your suggestion below, for which I'm grateful. (For my use as I described it, I guess I could in fact build '-without' most of these libraries...?) Thanks,
Francois Z.
But you can try:
CFLAGS=-static ./configure
This should propagate the "-static" flag to all make's. However, I supposet that nobody tried something like this, yet, if this procedure works with the plugins for instance.
On Fri, 2008-08-15 at 10:16 -0400, FZiegler wrote:
- Initially Dovecot would not respond to Thunderbird ("Could not connect to server localhost; the connection was refused"). Eventually, a "Trying ::1..." in the telnet log (see below) made me find hidden pref "network.dns.disableIPv6" and set it to FALSE. Which solves the problem -- but is this really needed, or have I done something wrong?
So localhost tried to use ::1 instead of 127.0.0.1? With Dovecot v1.0 if you set
listen = [::]
It listens for IPv6 and may also listen for IPv4 (don't know about OSX). With v1.1 you could have made sure Dovecot listens on both:
listen = *, [::]
- The Dovecot I built on OS X 10.4 appears to work fine when copied on another Mac running 10.5. Now, I'd love to avoid installing developer tools on both machines, but I fear this an illusion (some libraries are changing under us, e.g. libiconv.2.2.0.dylib --> libiconv.2.4.0.dylib). Does this mean I should try a static build? If so, what are the flags and how do I go about specifying a minimal set of libraries to include for my purposes?
No idea about this. configure doesn't directly support this.
participants (4)
-
fz.2003@klacto.net
-
FZiegler
-
Steffen Kaiser
-
Timo Sirainen