개발은 핵찜이야/리눅스
리눅스 메일서버 설치
주인정
2012. 4. 13. 16:31
1. Sendmail 설치
http://www.sendmail.org
2. Sendmail RPM 패키지 설치확인
#> rpm -qa | grep sendmail
3. 센드메일 서버 구축
step1. /etc/mail/local-host-names 파일안에 메일 서버에서 이용될 호스트이름을 입력
#> cat > /etc/mail/local-host-names
mail.super.com
mail2.super.com
step2. /etc/sysconfig/sendmail 파일에 다음 옵션들이 들어 있는지를 확인한다.
#> cat /etc/sysconfig/sendmail
DAEMON= yes
QUEUE=1h
step3. 센드메일 데몬을 재시작
#>service sendmail restart
step4. 센드메일 서버 데몬이 동작하는지 TPC 25번 포트로 접속하기
#> telnet localhost 25
step5. 방화벽설정 tcp 25 포트 열여있는지 확인
step6. 외부 메일에서 메일서버로 메일을 보내본다.
step7. 외부로 부터 메일이 왔는지 확인
#> ls -l /var/spool/mail/해당사용자계정파일
4. 센드메일 서버 설정
a. 메일 호스트 도메인 지정파일(local-host-names)
b. 메일 릴레이 기능
#>vi /etc/mail/access
호스트 또는 네트워크 주소 허용여부
localhost.localdomail RELAY
localhost RELAY
mail.super.com RELAY
192.168.0.1 RELAY
메일릴레이 거부시 REJECT 사용