3. 추가적인 작업들
3.1 sendmail.cw의 생성
/etc/mail/sendmail.cw에 Mail을 받을 수 있는 Host 이름을 적습니다. 이곳에 적은 이름으로 Mail이 들어오면 더 이상 다른 곳으로 Mail을 보내지 않고 MDA(Mail Delivery Agent, Mail을 MTA에게서 받아 Mail Box에 저장하는 Program)로 전달합니다. 보통 FQDN(Fully Qualified Domain Name)을 적고 만일 여러개의 Host 이름을 사용한다면 모두 적어줘야 합니다.
/ $ cd /etc/mail
mail $ cat sendmail.cw
hostname.domain.com
hostname2.domain.com
3.2 Directory Mode변환
sendmail 8.9.x 에서는 보안상 몇 가지 Directory의 Mode를 검사해서 적당하지 않다면 sendmail자체가 실행이 안됩니다. 따라서 아래와 같이 입력해 주어야 합니다. 자세한 내용은 Don't Blame Sendmail and Enhanced File Security를 참고하시기 바랍니다.
/ $ chmod go-w / /etc /etc/mail /usr /var /var/spool /var/spool/mqueue
/ $ chown root / /etc /etc/mail /usr /var /var/spool /var/spool/mqueue
이것 외에도 유저Directory에 Group이 쓰기 가능하거나, other가 쓰기 가능하다면 .forward가 작동하지 않습니다. 만일 일반 사용자의 .forward File이 작동하지 않으면 그 사용자 홈 Directory의 Mode를 확인하시기 바랍니다.
3.3 /etc/hosts File
참고로 /etc/hosts File의 형태가 대부분 아래와 같이 되어있습니다.
/ $ cat /etc/hosts
127.0.0.1 localhost
155.230.28.125 khaki loghost
155.230.28.115 purple
하지만 이 File을 아래와 같이 수정하시기 바랍니다. (차이점은 아시겠죠? ^^)
/ $ cat /etc/hosts
127.0.0.1 localhost
155.230.28.125 khaki.ce.kyungpook.ac.kr khaki loghost
155.230.28.115 purple.ce.kyungpook.ac.kr purple
3.4 Test
이렇게 설정을 모두 마치셨다면 다음과 같이 해서 Error Message가 없는지를 확인해 보시기 바랍니다.
/ $ /usr/lib/sendmail -bi
이 때 Error Message가 없어야 합니다. 만일 Error Message 가 났다면 /var/log/syslog File의 뒷부분을 보시기 바랍니다. 만일 별 문제가 없다면 이제 sendmail을 다시 띄우시면 됩니다.
3.5 Daemon 띄우기
/ $ /usr/lib/sendmail -bd -q1h
그리고 반드시 /var/log/syslog 를 확인하시고, Mail을 보내고 받는 Test를 지금 바로 해 주세요. 그리고 /var/log/syslog 에 Error Message 가 있는지도 살펴 보시기 바랍니다.
'Operating System > Linux' 카테고리의 다른 글
| Sendmail (Virtual Host) (0) | 2007/06/20 |
|---|---|
| Sendmail (난 Spam이 싫어요) (0) | 2007/06/20 |
| Sendmail (Third Party Relay) (0) | 2007/06/20 |
| Sendmail (sendmail.cf에 관한 얘기) (0) | 2007/06/20 |
| Sendmail (한글지원) (0) | 2007/06/19 |
| Sendmail (추가적인 작업들) (0) | 2007/06/19 |
| Sendmail (Compile & Installation) (0) | 2007/06/19 |
| Sendmail (Sendmail이란?) (0) | 2007/06/19 |
| Linux Security How-To (FAQ/결론) (0) | 2007/06/18 |
| Linux Security How-To (색인) (0) | 2007/06/18 |
| Linux Security How-To (보안 관련 자료) (0) | 2007/06/18 |