"Sendmail 설정 (메일 발송)"의 두 판 사이의 차이

49번째 줄: 49번째 줄:
mail from: root@zetawiki.com
mail from: root@zetawiki.com
250 2.1.0 root@zetawiki.com... Sender ok
250 2.1.0 root@zetawiki.com... Sender ok
rcpt to: opcore@gmail.com
rcpt to: ******@gmail.com
250 2.1.5 opcore@gmail.com... Recipient ok
250 2.1.5 ******@gmail.com... Recipient ok
data
data
354 Enter mail, end with "." on a line by itself
354 Enter mail, end with "." on a line by itself

2015년 2월 25일 (수) 09:37 판

Crystal Clear action info.png 작성 중인 문서입니다.
sendmail 설정

1 사전 작업

2 sendmail.mc 수정

[root@zetawiki ~]# cp /etc/mail/sendmail.mc /etc/mail/sendmail.mc.original
[root@zetawiki ~]# vi /etc/mail/sendmail.mc
[root@zetawiki ~]# diff /etc/mail/sendmail.mc.original /etc/mail/sendmail.mc
52,53c52,53
< dnl TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
< dnl define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
---
> dnl #TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
> dnl #define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
116c116
< DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
---
> DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, Name=MTA')dnl

3 sendmail.cf 생성

[root@zetawiki ~]# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

4 서비스 재시작

[root@zetawiki ~]# service sendmail restart
Shutting down sm-client:                                   [  OK  ]
Shutting down sendmail:                                    [  OK  ]
Starting sendmail:                                         [  OK  ]
Starting sm-client:                                        [  OK  ]

5 메일 발송 테스트

[root@zetawiki ~]# telnet localhost 25
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 zetawiki.com ESMTP Sendmail 8.14.4/8.14.4; Wed, 25 Feb 2015 09:30:26 +0900
mail from: root@zetawiki.com
250 2.1.0 root@zetawiki.com... Sender ok
rcpt to: ******@gmail.com
250 2.1.5 ******@gmail.com... Recipient ok
data
354 Enter mail, end with "." on a line by itself
hello, sendmail test.
.
250 2.0.0 t1P0UQNG027816 Message accepted for delivery
quit
221 2.0.0 zetawiki.com closing connection
Connection closed by foreign host.
[root@zetawiki ~]#

6 같이 보기

7 참고 자료