2014년 2월 4일 화요일

java sendmail에서 smtp 포트를 587포트로 변경하기

sendmail에서 smtp 포트를 587포트로 변경하기

sendmail 에서 submission port를 변경 하는 방법을 아래와 같이 알려드립니다.

1. sendmail 폴더 이동

# cd /etc/mail/

2. sendmail.mc 내용 수정

# vi sendmail.mc dnl 주석해제 변경전) dnl DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea')dnl 변경후) DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea')dnl m4 sendmail.mc > sendmail.cf

3. 센드메일 리스타트

# /etc/init.d/sendmail restart Shutting down sendmail: [  OK  ] Starting sendmail: [  OK  ]

4. Listen 포트들중 587 포트를 확인

# netstat -anp | grep LISTEN  

5. How to enable port 587 (submission) in postfix

Some internet access providers have port 25 disabled in their routers to prevent spam. If you run your own mailserver in a datacenter, you might have to enable the submission port (587) in postfix to be able to send emails from your local email client to your own mailserver. To enable port 587, edit the file /etc/postfix/master.cf vi /etc/postfix/master.cf and remove the # in front of the line: #submission inet n – n – – smtpd so that it looks like this: submission inet n – n – – smtpd and restart postfix: /etc/init.d/postfix restart
Be Sociable, Share!

댓글 없음:

댓글 쓰기