sendmail 설정> 외부로 보내는 메일을 25번포트말고 587포트로 보내려면?(완료)

netkwak의 이미지

프로바이더가 25번포트를 제한하고 있어서,
서버에서 외부로 메일을 보내지 못하네요 ㅠㅠ

기본적으로 사용하는 25번포트 말고, 587포트를 이용해서 외부로 메일을 보내려면 어떤 설정을 바꿔야 하나요?

고수님들 답변 부탁드립니다.

academic의 이미지

sendmail.mc 샘플에 보면 아래와 같은 부분이 있습니다.

dnl # The following causes sendmail to additionally listen to port 587 for
dnl # mail from MUAs that authenticate. Roaming users who can't reach their
dnl # preferred sendmail daemon due to port 25 being blocked or redirected find
dnl # this useful.
dnl #
dnl DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea')dnl

아래 부분을 추가하면 될 것 같은데요.

DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea')dnl

--
academic은 제 고등학교 때 동아리 이름입니다.
academic, 아주 가끔은 저도 이랬으면 좋겠습니다.

----
academic은 제 고등학교 때 동아리 이름입니다.
academic, 아주 가끔은 저도 이랬으면 좋겠습니다.

netkwak의 이미지

말씀해 주신대로 수정하고, 재시작한다음에

# telnet localhost 587

해보니, 로칼서버의 sendmail 접속이 되네요.

그리고, 수동으로 외부메일서버에 접속도 잘 됩니다.

# telnet xxx.xxx.xxx.xxx 587

그런데, 여전히 sendmail데몬을 통해서 외부로 메일을 보내는건 안되네요 ㅠㅠ

아래는 메일로그입니다.
sendmail[25004]: mBJ4tKSq024005: to=watch@xxx.xxx.com, delay=00:17:02, xdelay=00:04:00, mailer=esmtp, pri=151509, relay=xxx.xxx.com. [xxx.xxx.xxx.xxx], dsn=4.0.0, stat=Deferred: Connection timed out with xxx.xxx.com.

무슨 방법이 없을까요?

송효진의 이미지

서버가 막혔다는게 아니고, 그 서버를 이용하고자 하는 이메일 클라이언트가 막혔다는거겠죠?
서버 iptables 에 -t nat -A PREROUTING -p tcp -m tcp --dport 587 -j REDIRECT --to-ports 25
요렇게 하면 됩니다.
서버가 막힌거면 메일 못보냅니다.
받는쪽이 25를 쓰니까요.

emerge money
http://wiki.kldp.org/wiki.php/GentooInstallSimple - 명령어도 몇개 안되요~
http://xenosi.de/

netkwak의 이미지

로컬 서버와 라우터의 포트는 이상없이 열려있습니다.

ISP측에서 25번을 막아 놨고,
sendmail데몬이 25번 포트를 통해서 메일을 보내기에...
메일이 보내지지 않고 있습니다 ㅠㅠ

송효진의 이미지

그러니까...서버 자체가 '로컬'에 있고, 25가 막혔다는 거군요.
방법 없습니다.
25 가 안막힌 환경의 '서버' 가 필요합니다.
그러면 그 '서버' 에 587 로 연결하여 서버는 25로 메일을 전달해 줄 수 있습니다.

emerge money
http://wiki.kldp.org/wiki.php/GentooInstallSimple - 명령어도 몇개 안되요~
http://xenosi.de/

송효진의 이미지

connection timeout 이면 xxx.xxx.com 에 ping 은 가는지 telnet 25 는 열리는지부터 확인해 봐야 할것 같습니다.
dns 설정 문제일수도 있겠네요.

emerge money
http://wiki.kldp.org/wiki.php/GentooInstallSimple - 명령어도 몇개 안되요~
http://xenosi.de/

netkwak의 이미지

말씀하신 내용은 처음에 확인해봤습니다.

# telnet xxx.xxx.xxx.xxx 25
Trying xxx.xxx.xxx.xxx...
telnet: connect to address xxx.xxx.xxx.xxx: Connection timed out
telnet: Unable to connect to remote host: Connection timed out

# telnet xxx.xxx.xxx.xxx 587
Trying xxx.xxx.xxx.xxx...
Connected to www.xxx.com (xxx.xxx.xxx.xxx).
Escape character is '^]'.
220 xxx.xxx.com ESMTP

bh의 이미지

그래서 Gmail 이 필요한거죠...

(netkwak님의 MTA) -> (구글 MTA) -> 인터넷으로...

구글MTA 의 587 포트로 스마트호스트 설정하심 해결되지요.. ;;

도움문서가 필요하다면.. 구글을.. ;;

http://www.google.com/search?hl=en&q=Sendmail+smtp.gmail.com&btnG=Google+Search

--
이 아이디는 이제 쓰이지 않습니다.

netkwak의 이미지

스마트호스트가 정답이었군요.
정말 감사드립니다 (__)

링크 걸어주신거로 검색해서,

http://www.phinesolutions.com/sendmail-gmail-smtp-relay-howto.html

이 설명대로 설정했더니, 제대로 보내지네요.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.