root権限で、(su スーパーユーザー)
# cd /etc/mail
# cp aliases /etc/
# newaliases
sendmail.defの設定
簡単に設定できる sendmail.def を使用し、設定ファイル sendmaile.cf を作成します。
TurboLinux WS7.0の場合、設定ファイル sendmail.def は以下のディレクトリにあります。
/var/src/CF-3.7Wp12/sendmail.def
の設定
### Standard sendmail.cf for sendmail 8.9 or later ### DEFAULT_RELAYは、 |
/usr/src/CF-3.7Wp12/sendmail.cfの編集################################ # SMTP processing restrictions # ################################ ## ## upon SMTP authentication ## # CONFIG: clients to be allowed to connect this server C{HostAllow} 127.0.0.1 #C{HostAllow} 12.34.56 #F{HostAllow} -o /etc/mail/allow # CONFIG: clients to be rejected to connect this server #C{HostDeny} 23.45.67 #F{HostDeny} -o /etc/mail/deny # CONFIG: acceptable (no further checking) clients C{LocalIP} 127.0.0.1 C{LocalIP} 192.168.0 C{LocalIP} 192.168.1 ----追加(IPマスカレードクライアント) C{LocalDom} localhost |
sendmail.cf の作成
# cd /var/src/CF-3.7Wp12
# make sendmail.cf
sendmail.cf を /etc にコピー
# cp sendmail.cf /etc
# /usr/sbin/turboservice ------turboserviceの起動
sendmail を選択(カーソル↓)
s ------sキー入力で、sendmailデーモンがスタート
escで終了
sendmail.cf の確認
# sendmail -v -d0 < /dev/null
# sendmail -v ken < /dev/null
内部ユーザーに向けてテストメール発信
# sendmail -v ken@hosoyama.dyn.to
< /dev/null
インターネット経由で内部ユーザーに発信
以上でエラーが出なければ、設定終了
ipop3dの設定
# /etc/xinetd.confの設定
# Simple configuration file for xinetd
defaults # Don't remove following line. The directory
"/etc/xinetd.d" includes includedir /etc/xinetd.d defaults(すべてのサービスに対して共通)の設定を行ない instances 起動するサービスの最大数を指定
|
# /etc/xinetd.d/pop-3の設定
# default: off # description: POP-3 Mail Server # securlevel: 30 service pop-3 { disable = no socket_type = stream protocol = tcp wait = no user = root server = /usr/sbin/ipop3d }
disable
サービスの起動有無を指定 |
/etc/hosts.denyの設定
# ALL: ALL: とりあえず、すべてのアクセスを禁止し保存する。(ディフォルトのままでよかった) |
/etc/hosts.allowの設定
# ALL : 127.0.0.1:allow pop3とsshのアクセスを内部ネットワークからのみ許可し保存する。 |
# ps -aux | grep inet
xinetdのプロセス番号を確認
# kill -HUP プロセス番号
xinetdを再起動
メールクライアントの設定
受信メールサーバー(POP)名 サーバーマシン名(ドメイン部はいらない)
送信メールサーバー(SMTP)名 同上
以上で、LAN内のマシンからインターネットメールの送受信が可能になります。
TOP