- 펌 -

1) /etc/sendmail.cw 작성
이곳에는 메일 계정에 사용할 도메인을 추가시킨다.
ex)
aaa.co.kr
ns.aaaco.kr
www.aaa.co.kr

2) /etc/sendmail.cf 작성
이곳에서는 메일 계정에 사용할 도메인을 인식시켜주고 각각의 메일이 가는 경로를
지정하여 주는 스크립트 루트도 관리를 한다.

##################
# local info #
##################

Cwlocalhost
# file containing names of hosts for which we receive email
Fw/etc/sendmail.cw

----------------------------------------------------------------------

# Virtual user table (maps incoming users)
Kvirtuser btree /etc/domainaliases.db

# Access list database (for spam stopping)
Kaccess hash -o /etc/mail/access

이런식으로 작성을 한다.

]#vi /etc/mail/access 를 열어 자신의 IP를 RELAY 시킨다.
211.61.185 Relay

그런다음 sendmail을 제 시작한다.
/etc/rc.d/init.d/sendmail restart

3) 이메일 계정추가시 업데이트를 시켜주는 스크립트를 작성한다.
]#/usr/local/bin/domainaliases 화일을 편집한다.

#! /bin/sh
echo Updated the file 'domainaliases.db'
makemap btree /etc/domainaliases.db < /etc/domainaliases

편집후 chmod 755 domainaliases

다음으로는 /etc/ 밑에 두개의 화일을 작성한다.
touch domainaliases
touch domainaliases.db

사용 또는 서비스할 이메일과 이메일 계정을 연결시킨다.
]# vi /etc/domainaliases
aaa@aaa.com aaa
bbb@bbb.com webmaster@blackstar.co.kr
.......

작성후 데이타 베이스를 업데이크 시켜준다.
]#/usr/local/bin/domainaliases


여기까지하면 SMTP 설정은 모두 끝났다.
다음은 메일 계정으로 날라온 메일을 로컬로 받아볼수 있게하는 프로토콜인
POP3 를 설치하도록 하자.

4) qpopper를 다운 받자
http://www.eudora/qpopper 에서 다운을 받을 수 있다.

]#tar xvf qpopper3.1.tar
]#cd qpopper3.1
]#./configure --enable-specialauth)
]#make
이때 만들어진 popper/popper 를 /usr/sbin/로 이동
]# vi /etc/services
pop-3 110/tcp 의 주석해제
]# vi /etc/inetd.conf
pop-3 stream tcp nowait root /usr/sbin/popper popper -s
]#/etc/rc.d/init.d/inetd restart

마지막으로 reboot 또는 /usr/sbin/popper 를 실행한다.
POP3 가 정상적으로 실행되는지 테스트 해본다.

]# telnet localhost 110
>user xxx
>pass xxx

이상이 없으면 모든것이 정상적으로 된것이다.

이제 아웃룩이나 아웃룩 익스프레스같은 MUA (Mail user agent)를 이용하여 메일을
보내고 받아보자.

모든것이 잘 되면 성공

+ Recent posts