vi /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 s92 localhost.localdomain localhost
211.63.89.91 s91.sist.co.kr s91
211.63.89.93 s93.sist.co.kr s93
211.63.89.110 s110.sist.co.kr s110
211.63.89.92 s92.sist.co.kr s92
211.63.89.92 sist.co.kr
211.63.89.92 aa.com
211.63.89.92 bb.co.kr
211.63.89.92 cc.net
211.218.150.200 naver.com a
220.95.223.8 empas.com b
211.109.6.249 korea.com c

:: 네임서버 설정
vi /etc/resolv.conf
#system's default domain
domain sist.co.kr

#hostname search sequence
search sist.co.kr naver.com empas.com daum.net
nameserver 211.63.89.92
nameserver 211.63.64.11
nameserver 168.126.63.1

:: 이메일 로컬호스트 도메인
vi /etc/mail/local-host-names
# local-host-names - include all aliases for your machine here.
sist.co.kr
aa.com
bb.co.kr
cc.net

:: 포워딩
vi /etc/mail/virtusertable
webmaster@sist.co.kr blue10
webmaster@aa.com blue9
webmaster@bb.co.kr blue8
webmaster@cc.net blue7

[root@s92 /etc/mail]# makemap hash /etc/mail/virtusertable.db < /etc/mail/virtusertable

:: sendmail.cf가 초기화 되어 있지 않으면 아래와 같이 설정
[root@s92 /etc/mail]# m4 sendmail.mc > sendmail.cf

:: 중계
[root@s92 /etc/mail]# vi access
localhost.localdomain RELAY
localhost RELAY
127.0.0.1 RELAY
sist.co.kr RELAY
aa.com OK
#아래것들은 중계안함
bb.co.kr REJECT
cc.net DISCARD

[root@s92 /etc/mail]# makemap hash /etc/mail/access.db < /etc/mail/access

'Server' 카테고리의 다른 글

Authoritative-only Name Server  (0) 2017.01.06
호스트네임을 이용한 DNS 서버 셋팅하기  (0) 2017.01.06
프로세스 죽이기 - kill, killall, pkill  (0) 2016.12.31
xinetd 데몬과 standalone 데몬  (0) 2016.12.31
Quota 설정하기  (0) 2016.12.31

+ Recent posts