Tiny Core Linux 9.0で最新のDovecotをインストール、TCZ化

  • 投稿日:
  • 更新日:2018/05/12
  • by
  • カテゴリ:

先日はTiny Core Linux 9.x用にPostfixのtczパッケージを作りました。

メールが送れたら、受け取れないとね!

ということで、今回はDovecotです。

post.jpg

完成品はこちら

手順はどうでもいいからクレクレタコラな人は、こちらをどうぞ。

dovecot-2.3.1-for-tinycore-9.x.tar.gzダウンロード

9.xでコンパイルとインストール

Dovecotのダウンロードページから最新版をダウンロードします。今回はDovecot-2.3.1.tar.gzを使いました。

$ tar vxfz dovecot-2.3.1.tar.gz
$ cd dovecot-2.3.1

コンパイル環境の準備をします。

$ tce-load -wil compiletc squashfs-tools openssl-dev
$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking Whether to enable hardening... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for library containing strerror... none required
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking how to run the C preprocessor... gcc -E
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for grep that handles long lines and -e... /usr/local/bin/grep
checking for egrep... /usr/local/bin/grep -E
checking for ANSI C header files... yes
checking for inline... inline
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/local/bin/sed
checking for fgrep... /usr/local/bin/grep -F
checking for ld used by gcc... /usr/local/bin/ld
checking if the linker (/usr/local/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/local/bin/nm -B
checking the name lister (/usr/local/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 32768
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... no
checking how to convert i686-pc-linux-gnu file names to i686-pc-linux-gnu format... func_convert_file_noop
checking how to convert i686-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/local/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/local/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/local/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/local/bin/ld
checking if the linker (/usr/local/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/local/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/local/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for ld used by gcc... /usr/local/bin/ld
checking if the linker (/usr/local/bin/ld) is GNU ld... yes
checking for shared library run path origin... done
checking for iconv... yes
checking for working iconv... no
checking for iconv declaration...
extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
checking for strings.h... (cached) yes
checking for stdint.h... (cached) yes
checking for unistd.h... (cached) yes
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking sys/uio.h usability... yes
checking sys/uio.h presence... yes
checking for sys/uio.h... yes
checking sys/sysmacros.h usability... yes
checking sys/sysmacros.h presence... yes
checking for sys/sysmacros.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking libgen.h usability... yes
checking libgen.h presence... yes
checking for libgen.h... yes
checking sys/quota.h usability... yes
checking sys/quota.h presence... yes
checking for sys/quota.h... yes
checking sys/fs/ufs_quota.h usability... no
checking sys/fs/ufs_quota.h presence... no
checking for sys/fs/ufs_quota.h... no
checking ufs/ufs/quota.h usability... no
checking ufs/ufs/quota.h presence... no
checking for ufs/ufs/quota.h... no
checking jfs/quota.h usability... no
checking jfs/quota.h presence... no
checking for jfs/quota.h... no
checking quota.h usability... no
checking quota.h presence... no
checking for quota.h... no
checking sys/fs/quota_common.h usability... no
checking sys/fs/quota_common.h presence... no
checking for sys/fs/quota_common.h... no
checking mntent.h usability... yes
checking mntent.h presence... yes
checking for mntent.h... yes
checking sys/mnttab.h usability... no
checking sys/mnttab.h presence... no
checking for sys/mnttab.h... no
checking sys/event.h usability... no
checking sys/event.h presence... no
checking for sys/event.h... no
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/mkdev.h usability... no
checking sys/mkdev.h presence... no
checking for sys/mkdev.h... no
checking linux/dqblk_xfs.h usability... yes
checking linux/dqblk_xfs.h presence... yes
checking for linux/dqblk_xfs.h... yes
checking xfs/xqm.h usability... no
checking xfs/xqm.h presence... no
checking for xfs/xqm.h... no
checking execinfo.h usability... yes
checking execinfo.h presence... yes
checking for execinfo.h... yes
checking ucontext.h usability... yes
checking ucontext.h presence... yes
checking for ucontext.h... yes
checking malloc_np.h usability... no
checking malloc_np.h presence... no
checking for malloc_np.h... no
checking sys/utsname.h usability... yes
checking sys/utsname.h presence... yes
checking for sys/utsname.h... yes
checking sys/vmount.h usability... no
checking sys/vmount.h presence... no
checking for sys/vmount.h... no
checking for sys/utsname.h... (cached) yes
checking glob.h usability... yes
checking glob.h presence... yes
checking for glob.h... yes
checking linux/falloc.h usability... yes
checking linux/falloc.h presence... yes
checking for linux/falloc.h... yes
checking ucred.h usability... no
checking ucred.h presence... no
checking for ucred.h... no
checking sys/ucred.h usability... no
checking sys/ucred.h presence... no
checking for sys/ucred.h... no
checking whether C compiler handles -Werror -Wunknown-warning-option... no
checking whether C compiler handles -pie... yes
checking whether C compiler handles -fstack-protector-strong... yes
checking whether C compiler handles -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2... yes
checking for how to force completely read-only GOT table... -Wl,-z -Wl,relro -Wl,-z -Wl,now
checking for linker option to include whole archive... -Wl,--whole-archive
checking for library containing inet_aton... none required
checking for library containing gethostbyname... none required
checking for library containing socket... none required
checking for library containing gethostent... none required
checking for library containing fdatasync... none required
checking for cap_init in -lcap... no
checking sys/random.h usability... yes
checking sys/random.h presence... yes
checking for sys/random.h... yes
checking for getrandom... yes
checking whether getrandom is declared... yes
checking for arc4random... no
checking for fcntl... yes
checking for flock... yes
checking for lockf... yes
checking for inet_aton... yes
checking for sigaction... yes
checking for getpagesize... yes
checking for madvise... yes
checking for strcasecmp... yes
checking for stricmp... no
checking for vsyslog... yes
checking for writev... yes
checking for pread... yes
checking for uname... yes
checking for unsetenv... yes
checking for setrlimit... yes
checking for setproctitle... no
checking for seteuid... yes
checking for setreuid... yes
checking for setegid... yes
checking for setresgid... yes
checking for getmntinfo... no
checking for setpriority... yes
checking for quotactl... yes
checking for getmntent... yes
checking for kqueue... no
checking for kevent... no
checking for backtrace_symbols... yes
checking for walkcontext... no
checking for dirfd... yes
checking for clearenv... yes
checking for malloc_usable_size... yes
checking for glob... yes
checking for fallocate... yes
checking for posix_fadvise... yes
checking for getpeereid... no
checking for getpeerucred... no
checking for inotify_init... yes
checking for timegm... yes
checking for struct sockpeercred... no
checking for library containing clock_gettime... none required
checking for typeof... yes
checking whether we can use epoll... yes
checking whether we can use inotify... "yes"
checking whether we have glibc... yes
checking whether posix_fallocate() works... yes
checking whether OS supports plugin dependencies... yes
checking size of int... 4
checking size of long... 4
checking size of void *... 4
checking size of long long... 8
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for _Bool... yes
checking for uoff_t... no
checking type of off_t... long long
checking whether size_t is signed... no
checking type of size_t... unsigned int
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking for uintmax_t... yes
checking for uint_fast32_t... yes
checking for socklen_t... yes
checking for /dev/urandom... yes
checking for tm_gmtoff... yes
checking how large time_t values gmtime() accepts... 32
checking type of time_t... long
checking if we can use C99 static in array sizes... yes
checking if we can use C99-like flexible array members... yes
checking for struct iovec... yes
checking whether dev_t is struct... no
checking whether RLIMIT_AS exists... yes
checking whether RLIMIT_NPROC exists... yes
checking whether RLIMIT_CORE exists... yes
checking whether PR_SET_DUMPABLE exists... yes
checking Linux compatible mremap()... yes
checking whether shared mmaps get updated by write()s... yes
checking whether fd passing works... yes
checking for sendfile in -lsendfile... no
checking Linux compatible sendfile()... yes
checking FreeBSD compatible sendfile()... no
checking if unsetenv returns int... yes
checking if we should use _XPG6 macro for crypt()... yes
checking for crypt... no
checking for crypt in -lcrypt... yes
checking if struct stat has st_?tim timespec fields... yes
checking if struct stat has st_?timespec fields... no
checking if statvfs.f_mntfromname exists... no
checking if statfs.f_mntfromname exists... no
checking if struct dqblk.dqb_curblocks exists... no
checking if struct dqblk.dqb_curspace exists... yes
checking if Q_QUOTACTL ioctl exists... no
checking for C99 vsnprintf()... yes
checking for an implementation of va_copy()... yes
checking for an implementation of __va_copy()... yes
checking whether va_lists can be copied by value... yes
checking for dlopen... no
checking for dlopen in -ldl... yes
checking for SSL... yes
checking if OpenSSL version is 1.0.1 or newer... true
checking if OpenSSL version is 1.0.2 or better... true
checking whether SSL_clear_options exists... yes
checking whether CRYPTO_set_mem_functions has new style parameters... no
checking whether SSL_CTX_set1_curves_list exists... yes
checking whether SSL_CTX_set_min_proto_version exists... no
checking for SSL_CIPHER_get_kx_nid in -lssl... no
checking for ERR_remove_thread_state in -lssl... yes
checking for OPENSSL_thread_stop in -lssl... no
checking for OPENSSL_cleanup in -lssl... no
checking for SSL_get_current_compression in -lssl... yes
checking for SSL_get_servername in -lssl... yes
checking for SSL_COMP_free_compression_methods in -lssl... yes
checking for RSA_generate_key_ex in -lssl... yes
checking for ASN1_STRING_get0_data in -lssl... no
checking for HMAC_CTX_new in -lssl... no
checking for EVP_MD_CTX_new in -lssl... no
checking for OBJ_length in -lssl... no
checking for EVP_PKEY_get0_RSA in -lssl... no
checking for EVP_PKEY_CTX_new_id in -lssl... yes
checking for EC_KEY_new in -lssl... yes
checking whether we will be linking in Lua... no
checking for getspnam... yes
checking shadow.h usability... yes
checking shadow.h presence... yes
checking for shadow.h... yes
checking for pam_start in -lpam... no
checking for auth_userokay... no
checking for LIBSODIUM... no
checking whether byte ordering is bigendian... no
checking for IPv6... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking bzlib.h usability... no
checking bzlib.h presence... no
checking for bzlib.h... no
checking lzma.h usability... no
checking lzma.h presence... no
checking for lzma.h... no
checking lz4.h usability... no
checking lz4.h presence... no
checking for lz4.h... no
./configure: ./configure.lineno: line 26851: rpcgen: not found
checking for library containing quota_open... no
checking for sb_stemmer_new in -lstemmer... no
checking for special_textcat_Init in -lexttextcat... no
checking for special_textcat_Init in -ltextcat... no
checking sys/apparmor.h usability... no
checking sys/apparmor.h presence... no
checking for sys/apparmor.h... no
checking for pandoc... no
checking for valgrind... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating doc/man/Makefile
config.status: creating doc/wiki/Makefile
config.status: creating doc/example-config/Makefile
config.status: creating doc/example-config/conf.d/Makefile
config.status: creating src/Makefile
config.status: creating src/lib/Makefile
config.status: creating src/lib-sql/Makefile
config.status: creating src/lib-auth/Makefile
config.status: creating src/lib-charset/Makefile
config.status: creating src/lib-compression/Makefile
config.status: creating src/lib-dcrypt/Makefile
config.status: creating src/lib-dict/Makefile
config.status: creating src/lib-dict-backend/Makefile
config.status: creating src/lib-dict-extra/Makefile
config.status: creating src/lib-dns/Makefile
config.status: creating src/lib-fs/Makefile
config.status: creating src/lib-fts/Makefile
config.status: creating src/lib-http/Makefile
config.status: creating src/lib-oauth2/Makefile
config.status: creating src/lib-imap/Makefile
config.status: creating src/lib-imap-storage/Makefile
config.status: creating src/lib-imap-client/Makefile
config.status: creating src/lib-imap-urlauth/Makefile
config.status: creating src/lib-index/Makefile
config.status: creating src/lib-lda/Makefile
config.status: creating src/lib-ldap/Makefile
config.status: creating src/lib-lua/Makefile
config.status: creating src/lib-mail/Makefile
config.status: creating src/lib-master/Makefile
config.status: creating src/lib-ntlm/Makefile
config.status: creating src/lib-program-client/Makefile
config.status: creating src/lib-otp/Makefile
config.status: creating src/lib-dovecot/Makefile
config.status: creating src/lib-sasl/Makefile
config.status: creating src/lib-settings/Makefile
config.status: creating src/lib-smtp/Makefile
config.status: creating src/lib-ssl-iostream/Makefile
config.status: creating src/lib-old-stats/Makefile
config.status: creating src/lib-test/Makefile
config.status: creating src/lib-storage/Makefile
config.status: creating src/lib-storage/list/Makefile
config.status: creating src/lib-storage/index/Makefile
config.status: creating src/lib-storage/index/imapc/Makefile
config.status: creating src/lib-storage/index/pop3c/Makefile
config.status: creating src/lib-storage/index/maildir/Makefile
config.status: creating src/lib-storage/index/mbox/Makefile
config.status: creating src/lib-storage/index/dbox-common/Makefile
config.status: creating src/lib-storage/index/dbox-multi/Makefile
config.status: creating src/lib-storage/index/dbox-single/Makefile
config.status: creating src/lib-storage/index/cydir/Makefile
config.status: creating src/lib-storage/index/raw/Makefile
config.status: creating src/lib-storage/index/shared/Makefile
config.status: creating src/anvil/Makefile
config.status: creating src/auth/Makefile
config.status: creating src/config/Makefile
config.status: creating src/doveadm/Makefile
config.status: creating src/doveadm/dsync/Makefile
config.status: creating src/lda/Makefile
config.status: creating src/log/Makefile
config.status: creating src/lmtp/Makefile
config.status: creating src/dict/Makefile
config.status: creating src/director/Makefile
config.status: creating src/dns/Makefile
config.status: creating src/indexer/Makefile
config.status: creating src/ipc/Makefile
config.status: creating src/imap/Makefile
config.status: creating src/imap-hibernate/Makefile
config.status: creating src/imap-login/Makefile
config.status: creating src/imap-urlauth/Makefile
config.status: creating src/login-common/Makefile
config.status: creating src/master/Makefile
config.status: creating src/pop3/Makefile
config.status: creating src/pop3-login/Makefile
config.status: creating src/submission/Makefile
config.status: creating src/submission-login/Makefile
config.status: creating src/replication/Makefile
config.status: creating src/replication/aggregator/Makefile
config.status: creating src/replication/replicator/Makefile
config.status: creating src/stats/Makefile
config.status: creating src/old-stats/Makefile
config.status: creating src/util/Makefile
config.status: creating src/plugins/Makefile
config.status: creating src/plugins/acl/Makefile
config.status: creating src/plugins/imap-acl/Makefile
config.status: creating src/plugins/autocreate/Makefile
config.status: creating src/plugins/expire/Makefile
config.status: creating src/plugins/fs-compress/Makefile
config.status: creating src/plugins/fts/Makefile
config.status: creating src/plugins/fts-lucene/Makefile
config.status: creating src/plugins/fts-solr/Makefile
config.status: creating src/plugins/fts-squat/Makefile
config.status: creating src/plugins/last-login/Makefile
config.status: creating src/plugins/lazy-expunge/Makefile
config.status: creating src/plugins/listescape/Makefile
config.status: creating src/plugins/mail-filter/Makefile
config.status: creating src/plugins/mail-log/Makefile
config.status: creating src/plugins/mailbox-alias/Makefile
config.status: creating src/plugins/notify/Makefile
config.status: creating src/plugins/notify-status/Makefile
config.status: creating src/plugins/push-notification/Makefile
config.status: creating src/plugins/pop3-migration/Makefile
config.status: creating src/plugins/quota/Makefile
config.status: creating src/plugins/quota-clone/Makefile
config.status: creating src/plugins/imap-quota/Makefile
config.status: creating src/plugins/replication/Makefile
config.status: creating src/plugins/snarf/Makefile
config.status: creating src/plugins/old-stats/Makefile
config.status: creating src/plugins/imap-old-stats/Makefile
config.status: creating src/plugins/trash/Makefile
config.status: creating src/plugins/virtual/Makefile
config.status: creating src/plugins/welcome/Makefile
config.status: creating src/plugins/zlib/Makefile
config.status: creating src/plugins/imap-zlib/Makefile
config.status: creating src/plugins/mail-crypt/Makefile
config.status: creating src/plugins/var-expand-crypt/Makefile
config.status: creating src/plugins/apparmor/Makefile
config.status: creating src/plugins/charset-alias/Makefile
config.status: creating stamp.h
config.status: creating dovecot-config.in
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands

Install prefix . : /usr/local
File offsets ... : 64bit
I/O polling .... : epoll
I/O notifys .... : inotify
SSL ............ : yes (OpenSSL)
GSSAPI ......... : no
passdbs ........ : static passwd passwd-file shadow checkpassword
CFLAGS ......... : -std=gnu99 -g -O2 -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -fno-builtin-strftime -Wstrict-aliasing=2 -I/usr/local/include
: -pam -bsdauth -sia -ldap -vpopmail -sql
userdbs ........ : static prefetch passwd passwd-file checkpassword
: -ldap -vpopmail -sql
SQL drivers .... :
: -pgsql -mysql -sqlite -cassandra
Full text search : squat
: -lucene -solr
$

あとは、make & make installです。

$ make
$ sudo make install

これで現在の環境内にインストールされます。

tczを作成する

問題はここから。tcz化しなければなりません。

$ vi /mnt/sda1/tce/optional/dovecot.tcz.list

dovecot.tcz.listは以下のようにします。

usr/local/tce.installed/dovecot
usr/local/bin/doveadm
usr/local/bin/doveconf
usr/local/bin/dsync
usr/local/etc/dovecot/README
usr/local/lib/dovecot/auth/lib20_auth_var_expand_crypt.a
usr/local/lib/dovecot/auth/lib20_auth_var_expand_crypt.la
usr/local/lib/dovecot/auth/lib20_auth_var_expand_crypt.so
usr/local/lib/dovecot/auth/libauthdb_imap.a
usr/local/lib/dovecot/auth/libauthdb_imap.la
usr/local/lib/dovecot/auth/libauthdb_imap.so
usr/local/lib/dovecot/doveadm/libdoveadm_mail_crypt_plugin.a
usr/local/lib/dovecot/doveadm/libdoveadm_mail_crypt_plugin.la
usr/local/lib/dovecot/doveadm/libdoveadm_mail_crypt_plugin.so
usr/local/lib/dovecot/doveadm/lib10_doveadm_quota_plugin.a
usr/local/lib/dovecot/doveadm/lib10_doveadm_quota_plugin.la
usr/local/lib/dovecot/doveadm/lib10_doveadm_quota_plugin.so
usr/local/lib/dovecot/doveadm/lib20_doveadm_fts_plugin.a
usr/local/lib/dovecot/doveadm/lib20_doveadm_fts_plugin.la
usr/local/lib/dovecot/doveadm/lib20_doveadm_fts_plugin.so
usr/local/lib/dovecot/doveadm/lib10_doveadm_expire_plugin.a
usr/local/lib/dovecot/doveadm/lib10_doveadm_expire_plugin.la
usr/local/lib/dovecot/doveadm/lib10_doveadm_expire_plugin.so
usr/local/lib/dovecot/doveadm/lib10_doveadm_acl_plugin.a
usr/local/lib/dovecot/doveadm/lib10_doveadm_acl_plugin.la
usr/local/lib/dovecot/doveadm/lib10_doveadm_acl_plugin.so
usr/local/lib/dovecot/old-stats/libold_stats_mail.a
usr/local/lib/dovecot/old-stats/libold_stats_mail.la
usr/local/lib/dovecot/old-stats/libold_stats_mail.so
usr/local/lib/dovecot/old-stats/libstats_auth.a
usr/local/lib/dovecot/old-stats/libstats_auth.la
usr/local/lib/dovecot/old-stats/libstats_auth.so
usr/local/lib/dovecot/lib20_charset_alias_plugin.a
usr/local/lib/dovecot/lib20_charset_alias_plugin.la
usr/local/lib/dovecot/lib20_charset_alias_plugin.so
usr/local/lib/dovecot/lib20_var_expand_crypt.a
usr/local/lib/dovecot/lib20_var_expand_crypt.la
usr/local/lib/dovecot/lib20_var_expand_crypt.so
usr/local/lib/dovecot/libfs_compress.a
usr/local/lib/dovecot/libfs_compress.la
usr/local/lib/dovecot/libfs_compress.so
usr/local/lib/dovecot/lib30_imap_zlib_plugin.a
usr/local/lib/dovecot/lib30_imap_zlib_plugin.la
usr/local/lib/dovecot/lib30_imap_zlib_plugin.so
usr/local/lib/dovecot/lib20_zlib_plugin.a
usr/local/lib/dovecot/lib20_zlib_plugin.la
usr/local/lib/dovecot/lib20_zlib_plugin.so
usr/local/lib/dovecot/lib99_welcome_plugin.a
usr/local/lib/dovecot/lib99_welcome_plugin.la
usr/local/lib/dovecot/lib99_welcome_plugin.so
usr/local/lib/dovecot/lib20_virtual_plugin.a
usr/local/lib/dovecot/lib20_virtual_plugin.la
usr/local/lib/dovecot/lib20_virtual_plugin.so
usr/local/lib/dovecot/lib11_trash_plugin.a
usr/local/lib/dovecot/lib11_trash_plugin.la
usr/local/lib/dovecot/lib11_trash_plugin.so
usr/local/lib/dovecot/libfs_mail_crypt.a
usr/local/lib/dovecot/libfs_crypt.a
usr/local/lib/dovecot/lib05_mail_crypt_acl_plugin.a
usr/local/lib/dovecot/lib10_mail_crypt_plugin.a
usr/local/lib/dovecot/libfs_mail_crypt.la
usr/local/lib/dovecot/libfs_mail_crypt.so
usr/local/lib/dovecot/libfs_crypt.la
usr/local/lib/dovecot/libfs_crypt.so
usr/local/lib/dovecot/lib05_mail_crypt_acl_plugin.la
usr/local/lib/dovecot/lib05_mail_crypt_acl_plugin.so
usr/local/lib/dovecot/lib10_mail_crypt_plugin.la
usr/local/lib/dovecot/lib10_mail_crypt_plugin.so
usr/local/lib/dovecot/lib95_imap_old_stats_plugin.a
usr/local/lib/dovecot/lib95_imap_old_stats_plugin.la
usr/local/lib/dovecot/lib95_imap_old_stats_plugin.so
usr/local/lib/dovecot/lib90_old_stats_plugin.a
usr/local/lib/dovecot/lib90_old_stats_plugin.la
usr/local/lib/dovecot/lib90_old_stats_plugin.so
usr/local/lib/dovecot/lib05_snarf_plugin.a
usr/local/lib/dovecot/lib05_snarf_plugin.la
usr/local/lib/dovecot/lib05_snarf_plugin.so
usr/local/lib/dovecot/lib20_replication_plugin.a
usr/local/lib/dovecot/lib20_replication_plugin.la
usr/local/lib/dovecot/lib20_replication_plugin.so
usr/local/lib/dovecot/lib05_pop3_migration_plugin.a
usr/local/lib/dovecot/lib05_pop3_migration_plugin.la
usr/local/lib/dovecot/lib05_pop3_migration_plugin.so
usr/local/lib/dovecot/lib11_imap_quota_plugin.a
usr/local/lib/dovecot/lib11_imap_quota_plugin.la
usr/local/lib/dovecot/lib11_imap_quota_plugin.so
usr/local/lib/dovecot/lib20_quota_clone_plugin.a
usr/local/lib/dovecot/lib20_quota_clone_plugin.la
usr/local/lib/dovecot/lib20_quota_clone_plugin.so
usr/local/lib/dovecot/lib10_quota_plugin.a
usr/local/lib/dovecot/lib10_quota_plugin.la
usr/local/lib/dovecot/lib10_quota_plugin.so
usr/local/lib/dovecot/lib20_mailbox_alias_plugin.a
usr/local/lib/dovecot/lib20_mailbox_alias_plugin.la
usr/local/lib/dovecot/lib20_mailbox_alias_plugin.so
usr/local/lib/dovecot/lib20_mail_log_plugin.a
usr/local/lib/dovecot/lib20_mail_log_plugin.la
usr/local/lib/dovecot/lib20_mail_log_plugin.so
usr/local/lib/dovecot/lib10_mail_filter_plugin.a
usr/local/lib/dovecot/lib10_mail_filter_plugin.la
usr/local/lib/dovecot/lib10_mail_filter_plugin.so
usr/local/lib/dovecot/lib20_push_notification_plugin.a
usr/local/lib/dovecot/lib20_push_notification_plugin.la
usr/local/lib/dovecot/lib20_push_notification_plugin.so
usr/local/lib/dovecot/lib20_notify_status_plugin.a
usr/local/lib/dovecot/lib20_notify_status_plugin.la
usr/local/lib/dovecot/lib20_notify_status_plugin.so
usr/local/lib/dovecot/lib15_notify_plugin.a
usr/local/lib/dovecot/lib15_notify_plugin.la
usr/local/lib/dovecot/lib15_notify_plugin.so
usr/local/lib/dovecot/lib20_listescape_plugin.a
usr/local/lib/dovecot/lib20_listescape_plugin.la
usr/local/lib/dovecot/lib20_listescape_plugin.so
usr/local/lib/dovecot/lib02_lazy_expunge_plugin.a
usr/local/lib/dovecot/lib02_lazy_expunge_plugin.la
usr/local/lib/dovecot/lib02_lazy_expunge_plugin.so
usr/local/lib/dovecot/lib10_last_login_plugin.a
usr/local/lib/dovecot/lib10_last_login_plugin.la
usr/local/lib/dovecot/lib10_last_login_plugin.so
usr/local/lib/dovecot/lib21_fts_squat_plugin.a
usr/local/lib/dovecot/lib21_fts_squat_plugin.la
usr/local/lib/dovecot/lib21_fts_squat_plugin.so
usr/local/lib/dovecot/lib20_fts_plugin.a
usr/local/lib/dovecot/lib20_fts_plugin.la
usr/local/lib/dovecot/lib20_fts_plugin.so
usr/local/lib/dovecot/lib20_expire_plugin.a
usr/local/lib/dovecot/lib20_expire_plugin.la
usr/local/lib/dovecot/lib20_expire_plugin.so
usr/local/lib/dovecot/lib20_autocreate_plugin.a
usr/local/lib/dovecot/lib20_autocreate_plugin.la
usr/local/lib/dovecot/lib20_autocreate_plugin.so
usr/local/lib/dovecot/lib02_imap_acl_plugin.a
usr/local/lib/dovecot/lib02_imap_acl_plugin.la
usr/local/lib/dovecot/lib02_imap_acl_plugin.so
usr/local/lib/dovecot/lib01_acl_plugin.a
usr/local/lib/dovecot/lib01_acl_plugin.la
usr/local/lib/dovecot/lib01_acl_plugin.so
usr/local/lib/dovecot/libdovecot-dsync.a
usr/local/lib/dovecot/libdovecot-dsync.la
usr/local/lib/dovecot/libdovecot-dsync.so
usr/local/lib/dovecot/libdovecot-dsync.so.0
usr/local/lib/dovecot/libdovecot-dsync.so.0.0.0
usr/local/lib/dovecot/libdovecot-login.a
usr/local/lib/dovecot/libdovecot-login.la
usr/local/lib/dovecot/libdovecot-login.so
usr/local/lib/dovecot/libdovecot-login.so.0
usr/local/lib/dovecot/libdovecot-login.so.0.0.0
usr/local/lib/dovecot/libdovecot-lda.a
usr/local/lib/dovecot/libdovecot-lda.la
usr/local/lib/dovecot/libdovecot-lda.so
usr/local/lib/dovecot/libdovecot-lda.so.0
usr/local/lib/dovecot/libdovecot-lda.so.0.0.0
usr/local/lib/dovecot/libdovecot-sql.a
usr/local/lib/dovecot/libdovecot-sql.la
usr/local/lib/dovecot/libdovecot-sql.so
usr/local/lib/dovecot/libdovecot-sql.so.0
usr/local/lib/dovecot/libdovecot-sql.so.0.0.0
usr/local/lib/dovecot/libdovecot-storage.a
usr/local/lib/dovecot/libdovecot-storage.la
usr/local/lib/dovecot/libdovecot-storage.so
usr/local/lib/dovecot/libdovecot-storage.so.0
usr/local/lib/dovecot/libdovecot-storage.so.0.0.0
usr/local/lib/dovecot/libdovecot-compression.a
usr/local/lib/dovecot/libdovecot-compression.la
usr/local/lib/dovecot/libdovecot-compression.so
usr/local/lib/dovecot/libdovecot-compression.so.0
usr/local/lib/dovecot/libdovecot-compression.so.0.0.0
usr/local/lib/dovecot/libdovecot-fts.a
usr/local/lib/dovecot/libdovecot-fts.la
usr/local/lib/dovecot/libdovecot-fts.so
usr/local/lib/dovecot/libdovecot-fts.so.0
usr/local/lib/dovecot/libdovecot-fts.so.0.0.0
usr/local/lib/dovecot/libdovecot.a
usr/local/lib/dovecot/libdovecot.la
usr/local/lib/dovecot/libdovecot.so
usr/local/lib/dovecot/libdovecot.so.0
usr/local/lib/dovecot/libdovecot.so.0.0.0
usr/local/lib/dovecot/libdcrypt_openssl.a
usr/local/lib/dovecot/libdcrypt_openssl.la
usr/local/lib/dovecot/libdcrypt_openssl.so
usr/local/lib/dovecot/libssl_iostream_openssl.a
usr/local/lib/dovecot/libssl_iostream_openssl.la
usr/local/lib/dovecot/libssl_iostream_openssl.so
usr/local/lib/dovecot/dovecot-config
usr/local/libexec/dovecot/quota-status
usr/local/libexec/dovecot/decode2text.sh
usr/local/libexec/dovecot/xml2text
usr/local/libexec/dovecot/old-stats
usr/local/libexec/dovecot/stats
usr/local/libexec/dovecot/doveadm-server
usr/local/libexec/dovecot/maildirlock
usr/local/libexec/dovecot/gdbhelper
usr/local/libexec/dovecot/script-login
usr/local/libexec/dovecot/script
usr/local/libexec/dovecot/rawlog
usr/local/libexec/dovecot/replicator
usr/local/libexec/dovecot/aggregator
usr/local/libexec/dovecot/director
usr/local/libexec/dovecot/config
usr/local/libexec/dovecot/log
usr/local/libexec/dovecot/lmtp
usr/local/libexec/dovecot/dovecot-lda
usr/local/libexec/dovecot/deliver
usr/local/libexec/dovecot/submission
usr/local/libexec/dovecot/submission-login
usr/local/libexec/dovecot/pop3
usr/local/libexec/dovecot/pop3-login
usr/local/libexec/dovecot/imap-urlauth-worker
usr/local/libexec/dovecot/imap-urlauth
usr/local/libexec/dovecot/imap-urlauth-login
usr/local/libexec/dovecot/imap
usr/local/libexec/dovecot/imap-login
usr/local/libexec/dovecot/imap-hibernate
usr/local/libexec/dovecot/ipc
usr/local/libexec/dovecot/indexer-worker
usr/local/libexec/dovecot/indexer
usr/local/libexec/dovecot/dns-client
usr/local/libexec/dovecot/dict
usr/local/libexec/dovecot/checkpassword-reply
usr/local/libexec/dovecot/auth
usr/local/libexec/dovecot/anvil
usr/local/sbin/dovecot


Dovecot 2.3あたりより仕様が変わり、dovecotというグループを作っておかないとうまく動作しなくなりました。

tce.installedで作っておきます。

$ vi /usr/local/tce.installed/dovecot

中身は以下のようにします。

addgroup -g 91 dovecot
adduser -g "Dovecot daemon,,," -h /noexist -S -D -H -G dovecot -s /bin/false -u 101 dovenull
adduser -g "dovecot daemon,,," -h /noexist -S -D -H -G dovecot -s /bin/false -u 102 dovecot

パッケージを作るために、必要なファイルを一か所に集めます。

$ chmod a+x /usr/local/tce.installed/dovecot
$ cd /tmp/
$ mkdir pkg
$ cd pkg
$ (cd /;tar cf - `cat /mnt/sda1/tce/optional/dovecot.tcz.list`) | tar vxf -

stripし、パッケージを作成します。

$ strip usr/local/bin/*
$ strip usr/local/sbin/*
$ strip usr/local/libexec/dovecot/*
strip:usr/local/libexec/dovecot/decode2text.sh: File format not recognized
$ cd ..
$ mksquashfs pkg dovecot.tcz
Parallel mksquashfs: Using 1 processor
Creating 4.0 filesystem on dovecot.tcz, block size 4096.
[===========================================================-] 11309/11309 100%

Exportable Squashfs 4.0 filesystem, gzip compressed, data block size 4096
compressed data, compressed metadata, compressed fragments, no xattrs
duplicates are removed
Filesystem size 25748.77 Kbytes (25.15 Mbytes)
57.47% of uncompressed filesystem size (44804.90 Kbytes)
Inode table size 23744 bytes (23.19 Kbytes)
44.91% of uncompressed inode table size (52868 bytes)
Directory table size 2389 bytes (2.33 Kbytes)
35.29% of uncompressed directory table size (6769 bytes)
Number of duplicate files found 1
Number of inodes 237
Number of files 204
Number of fragments 19
Number of symbolic links 18
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 15
Number of ids (unique uids + gids) 2
Number of uids 1
tc (1001)
Number of gids 1
staff (50)
$ ls -al dovecot.tcz
-rw-r--r-- 1 tc staff 26370048 May 1 15:17 dovecot.tcz
$ cp dovecot.tcz /mnt/sda1/tce/optional

これでtczファイルは完成です。

最後に、dovecot.tcz.depファイルを作成しておきます。

$ vi /mnt/sda1/tce/optional/dovecot.tcz.dep

内容は、Dovecotが依存するパッケージのリストで、以下のようになります。

openssl.tcz

あとは自動起動のために/mnt/sda1/tce/onboot.lstにdovecot.tczのエントリを追加しておくと良いでしょう。

起動はdovecotコマンドで行います。

$ sudo dovecot

起動を確認するには、syslogを見るといいでしょう。

おまけ: SSL設定の移行

私の場合、これまでsslを使っていたのですが、新バージョンに移行した際に、以下のようなメッセージがsyslogに出力され、そのままでは動作しませんでした。

May  1 15:20:19 mynewserver mail.info dovecot: master: Dovecot v2.3.1 (8e2f634) starting up for imap (core dumps disabled)
May 1 15:21:39 mynewserver mail.err dovecot: imap-login: Error: Failed to initialize SSL server context: Couldn't parse DH parameters: error:0906D06C:PEM routines:PEM_read_bio:no start line: Expecting: DH PARAMETERS: user=<>, rip=xxx.xxx.xxx.xxx, lip=yyy.yyy.yyy.yyy, session=<ABCDEFGHIJKL>
May 1 15:21:39 mynewserver mail.crit dovecot: auth: Fatal: No passdbs specified in configuration file. PLAIN mechanism needs one
May 1 15:21:39 mynewserver mail.err dovecot: master: Error: service(auth): command startup failed, throttling for 2 secs

DHパラメータが必要なようですので、次のコマンドでdh.pemを生成します。

$ dhparam -out /usr/local/etc/dovecot/dh.pem 4096

最後の数値は鍵の強度なので安全性やコンピュータの処理能力を考えてご自由に。

あとは、configuration file (/usr/local/etc/dovecot/dovecot.conf)に設定を追加しておきます。

具体的には、以下の行を追加すればokです。

ssl_dh = </usr/local/etc/dovecot/dh.pem

こちらもよく読まれています