運用ネタ(FreeBSD) spamdの起動に失敗する件

Pocket

SpamAssassinをportupgradeでバージョンアップするとspamdの起動に失敗する
事例。

# portupgrade p5-Mail-SpamAssassin-3.3.2_1

***********************************************
*__        ___    ____  _   _ ___ _   _  ____ *
*\ \      / / \  |  _ \| \ | |_ _| \ | |/ ___|*
* \ \ /\ / / _ \ | |_) |  \| || ||  \| | |  _ *
*  \ V  V / ___ \|  _ <| |\  || || |\  | |_| |*
*   \_/\_/_/   \_\_| \_\_| \_|___|_| \_|\____|*
*                                             *
*You must install rules before starting spamd!*
***********************************************
*************************************************************************
*           _  _____ _____ _____ _   _ _____ ___ ___  _   _             *
*          / \|_   _|_   _| ____| \ | |_   _|_ _/ _ \| \ | |            *
*         / _ \ | |   | | |  _| |  \| | | |  | | | | |  \| |            *
*        / ___ \| |   | | | |___| |\  | | |  | | |_| | |\  |            *
*       /_/   \_\_|   |_| |_____|_| \_| |_| |___\___/|_| \_|            *
*                                                                       *
*       See /usr/local/share/doc/p5-Mail-SpamAssassin/INSTALL,          *
*       and /usr/local/share/doc/p5-Mail-SpamAssassin/UPGRADE,          *
*       or http://spamassassin.org/dist/INSTALL and                     *
*       http://spamassassin.org/dist/UPGRADE BEFORE enabling            *
*       this version of SpamAssassin for important information          *
*       regarding changes in this version.                              *
*                                                                       *
*       SpamAssassin may require additional configuration in            *
*       /usr/local/etc/mail/spamassassin/init.pre depending on          *
*       the options you have installed.  Otherwise, annoying            *
*       (but harmless) error messages may result.  Read the             *
*       files listed above.                                             *
*                                                                       *
*************************************************************************
You may wish to run sa-update now to obtain the latest rules.

NOTE:  FREEBSD users: If you are updating from a version prior to 3.20.
sa-update now places state files in /var/db/spamassassin and not
/var/lib/spamassassin.  This is to be consistant with Freebsd file
directory conventions.

If you run sa-compile, you will notice that files are in
/var/db/spamassassin/compiled/<perlversion>/<version> instead of
/var/db/spamassassin/compiled/<version>.
No attempts have been made to move old versions over. You must recompile.

If you are running with spamd, you must add the following to rc.conf:
spamd_enable="YES"

Security Note:  If you did NOT deselected AS_ROOT, spamd will be running
as root. To change this, also add this to rc.conf:
spamd_flags="-u spamd -H /var/spool/spamd"
===> Correct pkg-plist sequence to create group(s) and user(s)
===>   Compressing manual pages for p5-Mail-SpamAssassin-3.3.2_1
===>   Running ldconfig
/sbin/ldconfig -m /usr/local/lib
===>   Registering installation for p5-Mail-SpamAssassin-3.3.2_1
===>  Cleaning for p5-Mail-SpamAssassin-3.3.2_1
--->  Cleaning out obsolete shared libraries
[Updating the pkgdb <format:bdb_btree> in /var/db/pkg ... - 232 packages 
found (

とりあえず、起動してみる。

# sh /usr/local/etc/rc.d/sa-spamd start
Starting spamd.
child process [70179] exited or timed out without signaling production 
of a PID file: exit 255 at /usr/local/bin/spamd line 2642.
sa-spamd: WARNING: failed to start spamd

起動に失敗したので、上の方で言われたとおり sa-update を実行してみる。

# ls /var/db/spamassassin/
3.003001

# sa-update
# ls /var/db/spamassassin/
3.003001        3.003002

/var/db/spamassassin/ 配下に新しいディレクトリが生成された。
気をよくして、再度起動してみる。

# sh /usr/local/etc/rc.d/sa-spamd start
Starting spamd.

# ps ax | grep spamd
70201  ??  Ss     0:07.64 /usr/local/bin/spamd -c -d -r /var/run/spamd/
spamd.pi
70202  ??  S      0:00.01 spamd child (perl)
70203  ??  S      0:00.01 spamd child (perl)
70205   0  S+     0:00.00 grep spamd

これでよかったらしい。

この記事にコメントする

Powered by WordPress, WP Theme designed by WSC Project. ログイン