聲明:任何形式的摘抄必須保留上述作者和http地址
在新版本的Solaris 8_x86 無法使用
Virtual User Table,所以決定安裝新版的 Sendmail-8.11.0。
ftp site (ftp.sendmail.org)
下載 sendmail.8.11.0.tar.gz
把檔案放在 /usr/local/
gzip -d sendmail.8.11.0.tar.gz 把
gz 檔解開
tar -vxf sendmail.8.11.0.tar 把
tar 檔解開
設定 mc 檔
% cd /usr/local/sendmail.8.11.0/cf/cf
% cp generic-solaris2.mc config.mc
% vi config.mc 或 pico config.mc 更改mc 檔內容
config.mc 檔內容如下
divert(-1)
#
# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
# All rights reserved. # Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
# The Regents of the University of California. All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of # the sendmail
distribution.
#
#
#
# This is a generic configuration file for SunOS 5.x (a.k.a. Solaris 2.x)
# It has support for local and SMTP mail only. If you want to
# customize it, copy it to a name appropriate for your environment
# and do the modifications there.
#
divert(0)dnl
VERSIONID(`$Id: generic-solaris2.mc,v 8.11 1999/02/07 07:26:03 gshapiro Exp
$')
OSTYPE(solaris2)dnl
DOMAIN(generic)dnl
加入 FEATURE(`virtusertable', `dbm /etc/mail/virtusertable')dnl
( 啟動 Virtual Domain & Virtual User,資料存放在 /etc/mail/virtusertable
)
加入 FEATURE(`use_cw_file')
( 用來設定 E-mail Domain,可超過一個或以上 ) ( 注意:舊的設定檔為 /etc/mail/sendmail.cw,新版本改為
/etc/mail/local-host-names )
加入 FEATURE(`access_db', `dbm /etc/mail/access')dnl
( 用來設定你不想接收的 E-mail Address, Domain 彧 ip addess )
加入 FEATURE(relay_hosts_only)
( 限制E-mail 使者 ip addess Range。如果你從未試過設定 /etc/mail/relay-domains,那就不要加入
FEATURE(relay_hosts_only)。因為要在 /etc/mail/relay-domains 加入每個使用者的 IP 位置或 Range才可以用mail
Server send E-mail ,當然如果你不加入 FEATURE(relay_hosts_only),任何人都可以使用〔包括 E-mail
Bomb 的使用者或你不認識的人〕。)
MAILER(local)dnl
MAILER(smtp)dnl
% sh Build config.cf (
會利用 config.mc 產生一個 config.cf 檔,在安裝時 confg.cf 會變成 /etc/mail/sendmail.cf )
安裝 sendmail
% /etc/init.d/sendmail stop ( 停止 sendmail 運作 )
% cp /etc/mail/sendmail.cf /etc/mail/sendmail.cf.old (
先把 /etc/mail/sendmai.cf 作備份 )
% cp /usr/local/sendmail.8.11.0/cf/cf/config.cf /etc/mail/sendmail.cf
% cd sendmail.8.11.0/sendmail
% sh Build
% mkdir /usr/share/man/cat8
% mkdir /usr/share/man/cat5
% mkdir /usr/share/man/cat1
% sh Build install
安裝 makemap 和其他 lib
% cd /usr/local/sendmail.8.11.0
% sh Build
% sh Build install
啟動 sendmail
% cd /etc/mail
% vi relay-domains 或 pico relay-domains ( 設定送件者的 ip address。)( Example )( 203.46.8 是指可接受
203.46.8.0 至 203.46.8.255 的使用者送出郵件 )
% vi local-host-names 或 pico local-host-names 把所有 domain
放在 local-host-names 裏 ( Example )
。在舊版為 sendmail.cw
% newaliases ( 讀入 /etc/mail/aliases 的設定 )
% makemap dbm /etc/mail/access < /etc/mail/access ( 讀入
/etc/mail/access 的設定 ) ( 你不想接收的 E-mail Address Example )
% makemap dbm /etc/mail/virtusertable
< /etc/mail/virtusertable ( 讀入 /etc/mail/virtusertable
的設定 )
% /etc/init.d/sendmail stop ( 停止 sendmail 運作 )
% /etc/init.d/sendmail start ( 啟動 sendmail 運作 ) |