질문&답변
클라우드/리눅스에 관한 질문과 답변을 주고 받는 곳입니다.
리눅스 분류

sendmail 설정 질문 릴레이

작성자 정보

  • 임근식 작성
  • 작성일

컨텐츠 정보

본문

 

침착하게 아래 내용 읽어보시고 다시 시도해보시기 바랍니다.
요즘 페도라 코어 5 test2 까지 나왔지만, 전 아직 서버용으로는
레드햇 7.3을 사용중입니다. ㅡ.ㅡ;; ( 물론 데스크탑에서는 페도라 3을 사용중입니다만.)

sendmail Version : 8.10.X
OS : Redhat 7.3


★1. /etc/mail/sendmail.mc파일에 다음의 내용을 기술하도록 한다.

divert(-1)
dnl This is the macro config file used to generate the /etc/sendmail.cf
dnl file. If you modify thei file you will have to regenerate the
dnl /etc/sendmail.cf by running this macro config through the m4
dnl preprocessor:
dnl
dnl        m4 /etc/sendmail.mc > /etc/sendmail.cf
dnl
dnl You will need to have the sendmail-cf package installed for this to
dnl work.
**[디렉토리 수정구역]********************************************************
include(`/usr/lib/sendmail-cf/m4/cf.m4')
위의 라인의 path 를 주의하자. RH 7.x 의 경우에는 아마 m4 file 의 위치가
/usr/share/sendmail-cf/m4/cf.m4 에 위치할 것이다. 경로를 확인하기 바란다.
*****************************************************************************

define(`confDEF_USER_ID',``8:12'')
OSTYPE(`linux')
undefine(`UUCP_RELAY')
undefine(`BITNET_RELAY')
define(`confAUTO_REBUILD')
**[인증 메카니즘 삽입부분]***************************************************
dnl #
dnl # These are the allowed auth mechanisms. To allow relaying for a user
dnl # that uses one of them, you must set TRUST_AUTH_MECH.
define(`confAUTH_MECHANISMS', `LOGIN PLAIN DIGEST-MD5 CRAM-MD5')dnl
dnl # These are the SMTP auth mechanisms which, if used,
dnl # sendmail will allow relaying for.
TRUST_AUTH_MECH(`LOGIN PLAIN DIGEST-MD5 CRAM-MD5')dnl
dnl #
*****************************************************************************
define(`confTO_CONNECT', `1m')
define(`confTRY_NULL_MX_LIST',true)
define(`confDONT_PROBE_INTERFACES',true)
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')
........ 이하 생략....................


★2.  m4 /etc/mail/sendmail.mc > /etc/sendmail.cf


★3. SMTP AUTH 기능을 위해 sendmail.conf 파일이 확인/수정
#>cat /usr/lib/sasl/sendmail.conf
pwcheck_method:pam
shadow를 설정하는 분들도 있는데, 인증 모듈인 pam을 사용할 것이다.

★4. /etc/rc.d/init.d/sendmail restart

★5. 이제 아웃룩에서 [인증필요]를 체크하면, /etc/mail/access에서 사용할 IP를
  적지 않아도 자유롭게 이용할수 있게 된다.

★6. Send Mail 아웃룩에서 사용가능하게 수정

Redhat7.2에선 보안이 강화되어서 그런지 local에선 잘되도 외부에서
접근하면 않되는것들이 많은데, sendmail도 같은 경우고요..

#>vi/etc/sendmail.cf
찾을 내용 => O DaemonPortOptions=Port=smtp,Addr=127.0.0.1, Name=MTA
변경 후 => O DaemonPortOptions=Port=smtp,Name=MTA

#>vi /etc/mail/access <--- 메일 중계 기능을 담당(sendmail중계)
youdomain.pe.kr   RELAY
210.118.56     RELAY <-- OutLook을 사용할 허가 IP영역을 할당★

#>makemap hash /etc/mail/access < /etc/mail/access

#>/etc/rc.d/init.d/sendmail restart
이렇게 하면 access에서 설정한 IP에서만 아웃룩 메일보내기가 작동됩니다.

이제 테스트 해보도록 합니다.
#>/usr/sbin/mailstats 
  => esmtp가 나온는지 확인 할것.

#>telnet youdomain.pe.kr 25
 ehlo localhost

250-ENHANCEDSTATUSCODES
250-8BITMIME
250-SIZE
250-DSN
250-ONEX
250-ETRN
250-XUSR
250-AUTH LOGIN PLAIN   <--- 이부분이 인증을 요구하는 부분(참조1)
250 HELP

 

관련자료

댓글 0
등록된 댓글이 없습니다.

공지사항


뉴스광장


  • 현재 회원수 :  60,138 명
  • 현재 강좌수 :  36,201 개
  • 현재 접속자 :  249 명