sendmail 의 발신자 서버를 localhost 로 설정하지 않는 방법 질문.

cococo의 이미지

제목 그대로입니다.

사실은 서버를 호스팅해서 사용중인데, 일부 계정이 메일 전송이 안되다는 이야기가 있어서
호스팅 업체에 이야기 해 봤더니 업체 쪽에서 원인 찾아보고

"다음daum 쪽에 메일 전송이 안 되었었는데, 원인이 메일 서버 설정이었어요.
보내는 쪽의 메일 서버를 localhost에서 domain name을 명시적으로 설정해 줬습니다."

라는 답변을 받았습니다.

근데, 위의 "보내는 쪽의 메일 서버를 localhost에서 domain name을 명시적으로 설정" 은 어찌 하는 건가요? 그냥 제가 궁금해서요.

인터넷 뒤져보니까 대충 sendmail.cf 를 고치면 된다고 하는데, 어느 줄이 맞는 건지 모르겠습니다.

sendmail.cf
...
85 # my LDAP cluster
86 # need to set this before any LDAP lookups are done (including classes)
87 #D{sendmailMTACluster}$m
88
89 Cwlocalhost
90 # file containing names of hosts for which we receive email
91 Fw/etc/mail/local-host-names
92
93 # my official domain name
94 # ... define this only if sendmail cannot automatically determine your domain
95 #Dj$w.Foo.COM
...

여기서, Dj$w.Foo.COM 을 변경( 예를들어 Cwaaa.bbbb.co.kr ) 하는게 맞나요?
아시는 분들 답변 한 마디 주시면 감사하겠습니다.

이상입니다. 좋은 하루 되시기 바랍니다.

shint의 이미지

- 메일이 가는지는 둘다 해보면. 전송되는지 확인할 수 있을 거 같습니다.
- 되는거 따라하시는게 편합니다.
- 성공하신분 찾아보고 물어보시는게 좋습니다.

- 성공한 서비스 sendmail.cf 파일을 구해서 비교해보거나. 인터넷에서 찾아보세요.
슈퍼 유저 코리아.
리눅스 서버관리 실무 바이블 v3.0. 저자 박성수
리눅스 보안 관리 실무. 저자 홍석범
https://www.linux.co.kr/home/lecture/?leccode=390

필요하신 정보를 얻을 수 있을지도 모릅니다.

하튼.
sendmail.cf로 구글. 네이버에서 검색해보면. 이런 내용이 나옵니다.

---------------------------------------------------------------------
a : The origination date in ARPANET format
b : The current date in ARPANET format
c : hop count
d : the date in UNIX format
e : SMTP entry message
f : sender(from) address
g : sender name relative to the recipient
h : recipient host
i : queue ID
j : official domainname of this site
l : format of the UNIX Form line
m : domainname
n : name of the daemon ( for error messages)
o : the set of "separators" in named
p : sendmail process ID
q : Default format for sender names
r : Protocol used
s : Sender`s host name
t : A numeric representation of the current time
u : The recipient user
v : version number of sendmail
w : host name of this site
x : full name of the sender
z : home directory of the recipient
http://blog.naver.com/PostView.nhn?blogId=20cjy00&logNo=80004268982&redirect=Dlog&widgetTypeCall=true
http://kslovee.tistory.com/entry/sendmail-%EC%84%A4%EC%B9%98-%EB%B0%8F-%EA%B8%B0%EB%B3%B8%EC%84%A4%EC%A0%951

f가 보내는 메일이라고 합니다.
s가 보내는 호스트 이름이라고 합니다.
j는 공인 도메인 이름이라고 합니다.
q가 보내는 이름에 기본 포맷이라고 합니다.

문법은 잘 모르겠네요. ㅇ_ㅇ;;

---------------------------------------------------------------------
http://asiamaster.nuri.cc/xe/?document_srl=469&mid=mailboard&sort_index=readed_count&order_type=desc

---------------------------------------------------------------------
http://hackereyes.tistory.com/entry/%ED%8E%8C-sendmail-%EA%B5%AC%EC%B6%95%EB%B0%8F-%EC%84%A4%EC%A0%95

---------------------------------------------------------------------
http://blog.naver.com/aaduki?Redirect=Log&logNo=10174584108

> vi /etc/mail/sendmail.cf
vi편집기에서 /Cw 입력
#Cwlocalhost 가 나오는데, #지우고
Cw도메인이름 (ex : Cwnaver.com) 입력.

3. /etc/mail/local-host-names 설정.
> vi /etc/mail/local-host-names
공란에 적었던 도메인이름 입력
(ex:naver.com)

4. /etc/mail/access 파일 설정
> vi /etc/mail/access
마지막라인에 Connect:도메인이름 RELAY 입력
(ex:Connect:naver.com RELAY)
vi 편집기 저장후(:wq)
> makemap hash access < access

---------------------------------------------------------------------
http://cafe.naver.com/linuxlog/434
시간 에러

---------------------------------------------------------------------
http://cafe.naver.com/netack/151
21. Queue Relay 설정
R$* $#error $@ 5.7.1 $: "550 Relaying denied"

위 라인이 주석(#) 처리가 되면 /etc/mail/access 파일에 설정된 것이 전혀 유효아지 않게 되어 스팸메일의 온상지가 될 수 있으므로 반드시 주석이 없게 하도록 유의...

---------------------------------------------------------------------
http://blog.naver.com/20cjy00?Redirect=Log&logNo=80004268982
예: Dj$s.$m
이것은 j 에 w 와 m 매크로의 concatenated 변수를 할당한다는 의미이다.
만약, w(hostname) 이 hyundai3 이고 m 이 svc.hei.co.kr 이면. j 는 hyundai3.svc.hei.co.kr 이 된다.

내용은 이거 같은데... 뭐가 맞는지는 모르겠네요.

---------------------------------------------------------------------
http://blog.daum.net/iamwhoi/5740198
Sendmail 에 대한 설정

---------------------------------------------------------------------
http://cafe.naver.com/saneducationcenter/2027
sendmail -C your-file.cf -v your-email-address 솔라리스10에서 sendmail 구성하기

---------------------------------------------------------------------
http://cafe.naver.com/junixrhce/81
vi /etc/mail/local-host-names
127.0.0.1
localhost
서버의 호스트 이름을 추가한다.

---------------------------------------------------------------------
http://blog.naver.com/966138?Redirect=Log&logNo=60005057946
Kaccess hash -o /etc/mail/access
메일 수신자 데이터 베이스 파일을 정의하고 있다.

---------------------------------------------------------------------
http://cafe.naver.com/netack/151
1. 로컬호스트 도메인(최종수신지로의 설정 위해) 내용을 담는 파일 지정
Fw/etc/mail/local-host-names
(구버전의 경우 /etc/sendmail.cw )

2. 가상메일 설정 파일 지정
Kvirtuser hash -o /etc/mail/virtusertable

3. 메일 접근/차단 목록 파일 설정
Kaccess hash -o /etc/mail/access

---------------------------------------------------------------------
http://kin.naver.com/qna/detail.nhn?d1id=1&dirId=10302&docId=104380739&qb=c2VuZG1haWwuY2Y=&enc=utf8&section=kin&rank=5&search_sort=0&spq=1
vi /etc/trusted-users
신뢰된 사용자만 보내는 방법

---------------------------------------------------------------------
왜 이렇게 복잡하고 정리가 안되는지 참 이해가 안갑니다. ㅡ_ㅡ;;

저라면...
- 메일을 그냥 만들래요.
- 전문가를 찾아보고 물어 볼겁니다.
- 모든 사이트에 방법을 다 해볼겁니다.
- 모든 책을 찾아서 해볼겁니다.

혼자서 힘들면. 여러 사람이랑 같이 테스트 해보세요. ㅇ_ㅇ;;
사람 없으면. 같이 사장도 해야져. ㅡ_ㅡ;; 교육을 보내주던지...
하나씩 모두 따라해보고. 확인하다보면. 잘 알게 될지도 모르겠네요. ㅇ_ㅇ;;

----------------------------------------------------------------------------
젊음'은 모든것을 가능하게 만든다.

매일 1억명이 사용하는 프로그램을 함께 만들어보고 싶습니다.
정규 근로 시간을 지키는. 야근 없는 회사와 거래합니다.

각 분야별. 좋은 책'이나 사이트' 블로그' 링크 소개 받습니다. shintx@naver.com

cococo의 이미지

성공한 설정 정보를 얻으려면
담당자1 -> 담당자 2 -> 담당자 3 을 통해 정보를 요청해야 해서 여기에 질문했던 건데,
느리긴 해도 sendmail.cf 파일을 얻는 게 확실할 것 같네요.

shint님. 답글 감사드립니다.

academic의 이미지

sendmail.cf 를 직접 고치는 것은 실수의 여지도 많고 해서 바람직하지 않다고 알고 있습니다.

그래서 보통은 sendmail.mc 파일을 고치고 sendmail.cf 파일은 자동 생성하죠.

다른 사이트의 설정을 참조하려면 sendmail.mc 파일을 참조하는게 나으리라 봅니다.

사족. "보내는 쪽의 메일 서버를 localhost에서 domain name을 명시적으로 설정"했다는 건 sendmail 설정에서 하는 것이 아니라 그냥 서버의 hostname을 localhost에서 도메인 이름으로 바꿔줬다는 얘기 아닐까요?

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

cococo의 이미지

sendmail 설정 관련 이야기 감사드립니다.

담당자 쪽은 연락이 안되서 포기...하고 있었는데, 다시 한 번 확인해 봐야 겠네요.

서버의 hostname 을 확인해 봤는데, 도메인 이름으로 설정되어 있지는 않습니다....만, 이상한 이름 ( server123 뭐 이런거. 도메인 형식이 아니에요. ) 으로 설정되어 있더군요.

그럼, 모두들 좋은 하루 되시기 바랍니다.

hawk1223의 이미지

테스트 해 보았을 때, 다음 메일서버는 도메인 검사를 하지 않는 것 같습니다.

정확한 발송 안됨의 원인은 다음으로 발송한 메일 maillog 상의 smtp 응답 코드 확인을 해 보셔야 될 것 같습니다.

$ nslookup -type=MX hanmail.net

Non-authoritative answer:
hanmail.net mail exchanger = 10 mx3.hanmail.net.
hanmail.net mail exchanger = 10 mx4.hanmail.net.
hanmail.net mail exchanger = 10 mx1.hanmail.net.
hanmail.net mail exchanger = 10 mx2.hanmail.net.

Authoritative answers can be found from:
hanmail.net nameserver = ns2.daum.net.
hanmail.net nameserver = ns1.daum.net.

$ telnet mx3.hanmail.net 25
Trying 211.110.65.14...
Connected to mx3.hanmail.net (211.110.65.14).
Escape character is '^]'.
220 rmail-vm8.mail.daum.net ESMTP welcome to HanMail.Net(tm) ready
helo localhost
250 rmail-vm8.mail.daum.net Hello [XXX.YYY.ZZZ.AAA], pleased to meet you

$ telnet mx3.hanmail.net 25
Trying 211.110.65.14...
Connected to mx3.hanmail.net (211.110.65.14).
Escape character is '^]'.
220 rmail-vm79.mail.daum.net ESMTP welcome to HanMail.Net(tm) ready
ehlo localhost
250-rmail-vm79.mail.daum.net Hello [XXX.YYY.ZZZ.AAA], pleased to meet you
250-SIZE 71680000
250 ENHANCEDSTATUSCODES

댓글 달기

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
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.