2012/08/07

メールが配送されなくなった。

Postfixを2.7から2.8にアップグレードしたら、メールが配送されなくなりました。

原因は、/etc/mail/aliases ファイルが読めなくなったこと。

 

以下は/var/log/mail.logから、1行目の「error」が元凶をしめす。

Aug  7 03:10:08 stem postfix/local[6104]: error: unsupported dictionary type: btree
Aug  7 03:10:08 stem postfix/local[6104]: warning: btree:/etc/mail/aliases is unavailable. unsupported dictionary type: btree
Aug  7 03:10:08 stem postfix/local[6104]: warning: btree:/etc/mail/aliases: lookup of 'root' failed
Aug  7 03:10:08 stem postfix/local[6104]: F2B7915F402B: to=<root@**********>, orig_to=<root>, relay=local, delay=1.7, delays=1.7/0/0/0.02, dsn=4.3.0, status=deferred (alias database unavailable)

つまり、/etc/postfix/main.cf内の


alias_maps = btree:/etc/mail/aliases


が読めないらしい。2.7では読んでくれてたんだけど。。。


 


これはGentoo Linuxの固有の設定ですが、ビルドオプションとして、USEフラグは、


「hardened pam ssl」


しか指定しなかった。この場合にサポートするファイルタイプを調べた。


#postconfi –m



# postconf -m
cidr
environ
fail
internal
memcache
pcre
proxy
regexp
static
tcp
texthash
unix

 


こんな状態でbtree も hash もありません。


 


先ほどのUSEフラグに「berkdb」を追加してビルドすることで、


 



# postconf -m
btree
cidr
environ
fail
hash
internal
memcache
pcre
proxy
regexp
static
tcp
texthash
unix

 


btreeとhashが追加されました。


 


これで問題解決です。