[ubuntu, 우분투] sendmail 설치

by digipine posted Nov 02, 2017
?

Shortcut

PrevPrev Article

NextNext Article

ESCClose

Larger Font Smaller Font Up Down Go comment Print

sendmail 데몬 설치

sudo apt-get install sendmail

 

설정 변경

sudo nano /etc/mail/sendmail.mc

 

FEATURE(`no_default_msa')dnl
dnl DAEMON_OPTIONS(`Family=inet6, Name=MTA-v6, Port=smtp, Addr=::1')dnl
DAEMON_OPTIONS(`Family=inet,  Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl
dnl DAEMON_OPTIONS(`Family=inet6, Name=MSP-v6, Port=submission, M=Ea, Addr=::1')dnl
DAEMON_OPTIONS(`Family=inet,  Name=MSP-v4, Port=submission, M=Ea, Addr=127.0.0.1')dnl

 

127.0.0.1을  0.0.0.0 으로 변경

 

cd /etc/mail/

sudo m4 sendmail.mc

 

config 파일 생성

 

sudo nano /etc/mail/access

아래 내용 추가

192.168.0                       RELAY

 

sendmail 데몬 재시작

sudo service sendmail restart
 * Restarting Mail Transport Agent (MTA) sendmail                                                                                              [ OK ] 

 

메일 전송 테스트

telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 kdn.ktguide.com ESMTP Sendmail 8.14.4/8.14.4/Debian-2ubuntu2.1; Fri, 2 Oct 2015 23:35:31 -0700; (No UCE/UBE) logging access from: localhost(OK)-localhost [127.0.0.1]

 

HELO localhost
250 kdn.ktguide.com Hello localhost [127.0.0.1], pleased to meet you

 

 

mail from:karlmicro@gmail.com
250 2.1.0 karlmicro@gmail.com... Sender ok
rcpt to:siseong@gmail.com
250 2.1.5 siseong@gmail.com... Recipient ok
data
354 Enter mail, end with "." on a line by itself
test mail 1234
.
250 2.0.0 t936ZV1j013678 Message accepted for delivery
quit

 

이메일 전송 확인합니다.

스팸 메일로 분류되어 스팸함에 들어가 있을 것입니다.

 
TAG •

Articles

1 2 3 4 5