1. 587번 포트 사용 이유
- 정부의 스팸메일 근절 정책에 따라 유동IP에서는 25번 포트를 제한하고 있습니다.
따라서 유동IP를 사용하고 있다면 기존의 25번 포트 대신 587번 포트를 이용해서 메일을 보내야 합니다.
2. 587번 포트 열기
- /etc/mail/sendmail.mc 파일에서 아래 부분과 같이 수정합니다. 약 123번째 라인에 위치하고 있습니다.
[root@localhost /root]# vim /etc/mail/sendmail.mc [root@localhost /root]#
111 dnl # 112 dnl # The following causes sendmail to only listen on the IPv4 loopback address 113 dnl # 127.0.0.1 and not on any other network devices. Remove the loopback 114 dnl # address restriction to accept email from the internet or intranet. 115 dnl # 116 DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, Name=MTA')dnl 117 dnl # 118 dnl # The following causes sendmail to additionally listen to port 587 for 119 dnl # mail from MUAs that authenticate. Roaming users who can't reach their 120 dnl # preferred sendmail daemon due to port 25 being blocked or redirected find 121 dnl # this useful. 122 dnl # 123 DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea')dnl <--- 주석 해제! 124 dnl # 125 dnl # The following causes sendmail to additionally listen to port 465, but 126 dnl # starting immediately in TLS mode upon connecting. Port 25 or 587 followed 127 dnl # by STARTTLS is preferred, but roaming clients using Outlook Express can't 128 dnl # do STARTTLS on ports other than 25. Mozilla Mail can ONLY use STARTTLS 129 dnl # and doesn't support the deprecated smtps; Evolution <1.1.1 uses smtps 130 dnl # when SSL is enabled-- STARTTLS support is available in version 1.1.1. 131 dnl # 132 dnl # For this to work your OpenSSL certificates must be configured |
|
4. sendmail.cf 파일에 변경사항 적용
[root@localhost /etc/mail]# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf |
5. sendmail 재시작
[root@localhost /etc/mail]# /etc/rc.d/init.d/sendmail restart sm-client를 종료 중: [ OK ] sendmail 를 종료 중: [ OK ] sendmail (을)를 시작합니다: [ OK ] sm-client를 시작합니다: [ OK ] [root@localhost /etc/mail]# [root@localhost /root]# netstat -nlpt Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:993 0.0.0.0:* LISTEN 364/dovecot tcp 0 0 0.0.0.0:995 0.0.0.0:* LISTEN 364/dovecot tcp 0 0 0.0.0.0:587 0.0.0.0:* LISTEN 11173/sendmail tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 364/dovecot tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN 364/dovecot tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 7377/httpd tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 1766/vsftpd tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1730/sshd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 11173/sendmail [root@localhost /etc/mail]# |
출처: http://jumals.tistory.com/98 [주말인터넷]
댓글