Centos5에서 Sendmail 구성하기

[![image.png](http://wiki.igoni.kr/uploads/images/gallery/2026-02/scaled-1680-/8Y5image.png)](http://wiki.igoni.kr/uploads/images/gallery/2026-02/8Y5image.png)
perplexity에서 생성한 AI이미지
  1. Sendmail 패키지 설치 shell $> yum install -y sendmail sendmail-cf
  2. Sendmail 설정


    1. 발송 시 인증을 이용한 메일 발송으로 변경 shell $> vi /etc/mail/sendmail.mc ... TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN’)dnl ... define('confAUTH_MECHANISMS', 'EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 (생략)' ... 2. 외부에서 25번 포트 접속 허용하기 shell $> vi /etc/mail/sendmail.mc ... DAEMON_OPTIONS('Port=smtp, Name=MTA')dnl ... 3. 발송하는 호스트명 지정 Python $> vi /etc/mail/sendmail.mc LOCAL_DOMAIN('실제_발송할_도메인명')dnl 4. Sendmail 버전 숨기기 shell $> vi /etc/mail/sendmail.mc define('confSMTP_LOGIN_MSG')dnl 5. Sendmail 서비스 활성화 및 시작 shell $> chkconfig sendmail on $> chkconfig saslauthd on $> /etc/init.d/sendmail start $> /etc/init.d/saslauthd start

    3. 포트 확인 shell $> netstat -antp Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 19466/sendmail 4. 접속 테스트 shell $> telnet localhost 25 mail from:발신계정 rcpt to:수신계정 data send test . quit (수신계정으로 메일 수신되는지 확인)







작성일: 2026년 7월 15일 ,  마지막 업데이트: 2026년 7월 15일