up

前へ| 次へ

sendmail 設定 その2

authinfo and authinfo.db 作成

順序は これが最後の方になるのでしょうが 注目度からまず これを最初に やっつけておきましょう。

# cd /etc/mail
# ls -l | sed 1d
-r--r--r--    1 bin      bin          5657 Jan 20 22:43 helpfile
-r--r--r--    1 root     bin         57590 Jan 20 22:56 sendmail.cf
-rw-------    1 root     bin             0 Jan 20 22:43 statistics
-r--r--r--    1 root     bin         41443 Jan 20 22:56 submit.cf

まだまだ 作成するものが有るということです。

# vi authinfo
# cat authinfo
AuthInfo:987.954.302.997 "U:onasakeuser@mail.server.Big.desu" \
"I:onasakeuser@mail.server.Big.desu" "P:h1i2mi3tu4nok5igou" "R:nyanta.no-ip.info" "M:CRAM-MD5"
# makemap hash authinfo < authinfo /* データベース に 変更します  */

aliases と aliases.db

aliases は とりあえず /etc に 有るもので 代用しましょう

# cp ../aliases .
# newaliases
/etc/mail/aliases: 15 aliases, longest 10 bytes, 162 bytes total

local-host-names

これは もう作るしか無い

# vi local-host-names

access と access.db

これも もう作るしか無い

# vi access 
# makemap hash /etc/mail/access < /etc/mail/access 

というわけで 一式作成しますが 予備の サーバ ということで 実働の もの から コピー した方が 速い と思います。

# ls -l | sed 1d
-rw-r--r--    1 fdopstm  users     1320832 Jan 20 23:19 access
-rw-r-----    1 root     root      2633728 Jan 20 23:21 access.db
-rw-r--r--    1 root     root          842 Jan 20 23:11 aliases
-rw-r-----    1 root     smmsp       12288 Jan 20 23:12 aliases.db
-rw-r--r--    1 root     root          135 Jan 20 23:02 authinfo
-rw-r-----    1 root     root        12288 Jan 20 23:02 authinfo.db
-r--r--r--    1 bin      bin          5657 Jan 20 22:43 helpfile
-rw-r--r--    1 root     root          106 Jan 20 23:10 local-host-names
-r--r--r--    1 root     bin         57590 Jan 20 22:56 sendmail.cf
-rw-------    1 root     bin             0 Jan 20 22:43 statistics
-r--r--r--    1 root     bin         41443 Jan 20 22:56 submit.cf

今回 ”access”は 実働のものを コピー しました。

pop

”pop”も 有効にしておこう

# sed -e '/^#/d' /etc/hosts.allow | uniq
ALL : LOCAL
# grep pop /etc/inetd.conf | sed -e '/^#/d'
pop3    stream  tcp     nowait  root    /usr/sbin/tcpd  ipop3d
pop3s   stream  tcp     nowait  root    /usr/sbin/tcpd  ipop3d
# cp hosts.allow 19990414_hosts.allow 
# vi hosts.allow 
# diff -s hosts.allow 19990414_hosts.allow 
12d11
< ipop3d : 192.168.24.5,192.168.24.6,192.168.24.7,192.168.24.8,192.168.24.9,192.168.24.11

起動

さて 起動させないと いけないので

# cd /etc/rc.d/
# cp rc.M 20090120_rc.M_01
# vi rc.M
# diff -s rc.M 20090120_rc.M_01
313,323d312
< # Start the sendmail daemon ; Add Tue Jan 20 20:59:35 JST 2009 
< if [ -x /usr/sbin/sendmail ]; then
<    echo "Starting sendmail daemon (/usr/sbin/sendmail -L mta-daemon -bd -q15m)..."
<    echo "Starting sendmail daemon (/usr/sbin/sendmail -L msa-queue -Ac -q15m)... "
<    /usr/sbin/sendmail -L mta-daemon -bd -q15m
<    /usr/sbin/sendmail -L msa-queue -Ac -q15m
< fi
< 
< 

再起動で確認しよう

# ps ax | grep send | grep -v grep
  272 ? S  0:00 sendmail: accepting connections           
  275 ? S  0:00 sendmail: Queue runner@00:15:00 for /var/spool/clientmqueue
# cat /var/log/maillog 
Jan 20 21:09:54 sv mta-daemon[272]: starting daemon (8.14.1): SMTP+queueing@00:15:00
Jan 20 21:09:54 sv msa-queue[275]: starting daemon (8.14.1): queueing@00:15:00

後は mew 何ぞ 設定して 送受信の 確認をすれば 良い事になります。

にゃんたろう 拝!

2009年 1月20日 (火) 21:02:47 JST 作成


前へ| 次へ

up

Copyright © 2004.-2009. nyantarou All Rights Reserved.