Centos5에서 Sendmail 구성하기
| [](http://wiki.igoni.kr/uploads/images/gallery/2026-02/8Y5image.png) |
| perplexity에서 생성한 AI이미지 |
- Sendmail 패키지 설치
shell $> yum install -y sendmail sendmail-cf - Sendmail 설정3. 포트 확인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('실제_발송할_도메인명')dnl4. Sendmail 버전 숨기기shell $> vi /etc/mail/sendmail.mc define('confSMTP_LOGIN_MSG')dnl5. Sendmail 서비스 활성화 및 시작shell $> chkconfig sendmail on $> chkconfig saslauthd on $> /etc/init.d/sendmail start $> /etc/init.d/saslauthd startshell $> 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/sendmail4. 접속 테스트shell $> telnet localhost 25 mail from:발신계정 rcpt to:수신계정 data send test . quit (수신계정으로 메일 수신되는지 확인)
작성일: 2026년 7월 15일
,
마지막 업데이트: 2026년 7월 15일