[sendmail] localhost로 오는 메일을 다른 메일 서버로 보낼려고

tinywolf의 이미지

ns.sorii.com과 home.sorii.com의 root로 오는 메일들을 메일서버인 mail.sorii.com으로 보내기 위해서..

ns와 home 각 서버의 aliases에다가
root: root@mail.sorii.com
을 추가 했습니다.

ns.sorii.com의 메일은 정상적으로 잘 보내집니다. (RedHat9)
Mar 7 20:55:37 ns sendmail[2119]: i27BtZc6002118: to=root@mail.sorii.com, ctladdr=<root@ns.sorii.com> (0/0), delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=30829, relay=mail.sorii.com. [218.235.99.64], dsn=2.0.0, stat=Sent (i27Btbba032422 Message accepted for delivery)

그런데 home.sorii.com은 메일이 안보내지면서 로그에는 다음과 같이 찍힙니다. (wowLinux파란7.3R2)
Mar 8 03:16:51 home sm-msp-queue[2185]: i22J23So017574: to=root@mail.sorii.com, ctladdr=root (0/0), delay=4+23:14:48, xdelay=00:00:00, mailer=relay, pri=10830052, relay=home.sorii.com., dsn=4.0.0, stat=Deferred: Connection refused by home.sorii.com.

mailer와 relay항목 부분이 서로 틀린걸로 봐서 저부분을 뭔가를 해주어야할 듯한데..
음... 모르겠습니다...

ns.sorii.com
떠있는 데몬 = ypserv(slave),ypbind,sendmail(localhost만),named -> MX레코드가 mail.sorii.com으로 되어 있음.
home.sorii.com
떠있는 데몬 = ypserv(master),httpd,proftpd,sendmail(localhost만)
mail.sorii.com
떠있는 데몬 = ypbind,sendmail(SMTP인증)

ns는 아마 자신 도메인의 MX레코드가 있으니 제대로 사용하는 것같은데..
home은 알 수가 없으니 저러는 것일까요?

dgkim의 이미지

우선은 그림부터 그리고 시작해 보겠습니다.

+---------------------+      +---------------------+     +---------------------+
|  Hostname: ns       |      |  Hostname: home     |     |  Hostname: mail     |
+---------------------+      +---------------------+     +---------------------+
|  ns IN  a.b.c.d     |      |  home IN a.b.c.e    |     |  mail IN a.b.c.f    |
|  ns IN MX 10 mail   |      |  home IN MX 10 mail |     |                     |
+---------------------+      +---------------------+     +---------------------+
|  ps: sendmail       |      |  ps: sendmail       |     |  ps: sendmail       |
|  Cw: localhost      |      |  Cw: localhost      |     |  Cw: mail           |
+---------------------+      +---------------------+     +---------------------+

위와 같은 구성이 맞는지 모르겠네요..

그렇다면 수정해야 할 내용은..

DNS에서

다음과 같이 정리해 주시고

$ORIGIN sorii.com

ns      IN      A               a.b.c.d
        IN      MX      10      mail

home    IN      A               a.b.c.e
        IN      MX      10      mail

mail    IN      A               a.b.c.f

ns와 home에서는 sendmail을 죽이고 테스트해보시면 되겠네요..

근데 약간 이상한게..

sorii.com에 대한 MX를 mail로 해서 하나만 사용하시면 되지 않나요?

ID@ns와 ID@home을 굳이 사용하실 필요가 있나요?

그리고 각각이 다 따로 된 서버인지..

그리고 각각의 hosts와 A 레코드는 정상적인지...

dgkim의 이미지

답변하고 다시보니

home서버에 이상한게 많이 있네요.

우선 로그메시지의 프로세스가 sendmail로 뜨지 않고

sm-msp-queue로 뜨네요..

그리고 접속 대상이 home으로 나오네요..

tinywolf의 이미지

다음은 ns의 sorii.com.zone설정이구요..

$TTL 86400
@       IN      SOA     ns.sorii.com.   root.sorii.com (
                        5       ; serial
                        28800   ; refresh
                        7200    ; retry
                        604800  ; expire
                        86400   ; ttl
                        )

        IN      A       211.233.5.48
        IN      NS      ns.sorii.com.
        IN      MX      10      mail.sorii.com.

ns      IN      A       218.235.99.62
home    IN      A       218.235.99.63
mail    IN      A       218.235.99.64
wireless        IN      A       218.235.99.75
lan     IN      A       218.235.99.76

www     IN      CNAME   @
ftp     IN      CNAME   home
proxy   IN      CNAME   home
*       IN      CNAME   home

root로 오는 LogWatch나 백신의 결과 메일 등의 메일을 mail로 받기 위해서 질문드린겁니다..
그리고 log가 sendmail이 아닌건.. sendmail을 재시작 할 때마다 큐에 있고 못 보낸 메일을 보내는 시도를 하는 것이라서 그런 것같습니다.
제가 root로 메일을 만들어 보내는 것은 아니고..
postmaster나 ftp, root 등으로 오는 여러가지 정보 메일들이 보내지지 않아서 큐에 쌓여있습니다.

ㅡ_ㅡ;

dgkim의 이미지

DNS에는 문제가 없어 보이네요.

그러면 각 서버별로

다음의 결과를 올려주시겠습니까?

cat /etc/sendmail.cf | grep Cw
cat /etc/sendmail.cf | grep Fw
cat /etc/sendmail.cf | grep DS
tinywolf의 이미지

도와 주셔서 감사합니다.

ns.sorii.com

[root@ns root]# cat /etc/mail/sendmail.cf | grep Cw
Cwlocalhost
[root@ns root]# cat /etc/mail/sendmail.cf | grep Fw
Fw/etc/mail/local-host-names
[root@ns root]# cat /etc/mail/sendmail.cf | grep DS
DS
# Return-Receipt-To: header implies DSN request
# DHParameters (only required if DSA/DH is used)

# local-host-names - include all aliases for your machine here.

home.sorii.com

[root@home root]# cat /etc/mail/sendmail.cf | grep Cw
Cwlocalhost
[root@home root]# cat /etc/mail/sendmail.cf | grep Fw
Fw/etc/mail/local-host-names
[root@home root]# cat /etc/mail/sendmail.cf | grep DS
DS
# Return-Receipt-To: header implies DSN request
# DHParameters (only required if DSA/DH is used)

# local-host-names - include all aliases for your machine here.

mail.sorii.com

[root@mail root]# cat /etc/mail/sendmail.cf | grep Cw
Cwlocalhost
[root@mail root]# cat /etc/mail/sendmail.cf | grep Fw
Fw/etc/mail/local-host-names
[root@mail root]# cat /etc/mail/sendmail.cf | grep DS
DS
# Return-Receipt-To: header implies DSN request
# DHParameters (only required if DSA/DH is used)

# local-host-names - include all aliases for your machine here.
sorii.com
mail.sorii.com

ㅡ_ㅡ;

댓글 달기

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