sendmail msgid 에 관하여 질문입니다.
저희가 운영중인 메일서버에(sendmail 8.13.1) msgid 관련 다음과 같은 룰셋이 세팅되어 있습니다.
Scheck_msgid
R<bulk.$-.$- @ $+> $#error $: ${Msg_mailer} - ${Msg_master}
R<$-.$-.$- $u@$h> $#error $: ${Msg_mailer} - ${Msg_master}
R< $+ @ $+ > $@ OK
R$* $#error $: 553 Header Error - ${Msg_master}
위 설정은 quonta ruleset 이라고 dacapo AT quanta.kyunghee.ac.kr 님의 것을 그대로 가져다 쓴 것입니다.
그런데, 외국회사에서 보낸 메일이 리턴되어 maillog 를 확인해보니, msgid 부분이 문제가 되더군요.
msgid=<45879B5C.90BA.00CC.0> 이렇게 찍혀 있는데.. 분명 위 룰셋에 위배되어서 리턴이 된걸로 확인됩니다.
제가 질문하고자 하는 것은, msgid 에 '@' 이 포함되어야 하고 @ 앞뒤로 적어도 하나이상의 문자가 포함되어야 <$+ @ $+> 하는것이 표준이냐는 것입니다.
제가 받은 메일 몇개를 살펴봤지만, 위 msgid 룰셋에 어긋나는 것은 없는것 같네요.
다음은 관련된 메일로그 전체 내용입니다.
Dec 19 15:57:42 myhost sm-mta[48135]: kBJ6vdQq048135: from=<something@foreign.company.com>, size=2062, class=0, nrcpts=1, msgid=<45879B5C.90BA.00CC.0>, proto=ESMTP, daemon=IPv4, relay=mail.foreign.company.com [217.127.xxx.xxx]
Dec 19 15:57:44 myhost sm-mta[88038]: kBJ6viO9088038: ruleset=check_msgid, arg1=<45879B5C.90BA.00CC.0>, relay=myhost [211.23x.xxx.xxx], reject=553 5.0.0 Header Error - If you have questions,please email postmaster@myhost
감사합니다.
자답이 된것 같은데,
자답이 된것 같은데, RFC2822 에 관련 내용이 나와 있네요.
(http://rfc.net/rfc2822.html#s3.6.4.)
3.6.4. Identification fields
Though optional, every message SHOULD have a "Message-ID:" field.
Furthermore, reply messages SHOULD have "In-Reply-To:" and
"References:" fields as appropriate, as described below.
The "Message-ID:" field contains a single unique message identifier.
The "References:" and "In-Reply-To:" field each contain one or more
unique message identifiers, optionally separated by CFWS.
The message identifier (msg-id) is similar in syntax to an angle-addr
construct without the internal CFWS.
message-id = "Message-ID:" msg-id CRLF
in-reply-to = "In-Reply-To:" 1*msg-id CRLF
references = "References:" 1*msg-id CRLF
msg-id = [CFWS] "<" id-left "@" id-right ">" [CFWS]
... 이하 생략 ...
The message identifier (msg-id) itself MUST be a globally unique
identifier for a message. The generator of the message identifier
MUST guarantee that the msg-id is unique. There are several
algorithms that can be used to accomplish this. Since the msg-id has
a similar syntax to angle-addr (identical except that comments and
folding white space are not allowed), a good method is to put the
domain name (or a domain literal IP address) of the host on which the
message identifier was created on the right hand side of the "@", and
put a combination of the current absolute date and time along with
some other currently unique (perhaps sequential) identifier available
on the system (for example, a process id number) on the left hand
side. Using a date on the left hand side and a domain name or domain
literal on the right hand side makes it possible to guarantee
uniqueness since no two hosts use the same domain name or IP address
at the same time. Though other algorithms will work, it is
RECOMMENDED that the right hand side contain some domain identifier
(either of the host itself or otherwise) such that the generator of
the message identifier can guarantee the uniqueness of the left hand
side within the scope of that domain.
Semantically, the angle bracket characters are not part of the
msg-id; the msg-id is what is contained between the two angle bracket
characters.
저도 옛날에 그걸
저도 옛날에 그걸 썼었죠... 그 홈페이지는 다 지워진지 오래입니다.
근데, quanta ruleset 2005년판이 있더군요. (업뎃 안한지 또 꽤 됐지만)
지금은 얼마나 잘 막는지 모르겠지만, 업뎃 당시 99% 차단된다고 해 놨네요.
http://tftlcd.khu.ac.kr/~dacapo/sendmail
써 보신 분 계시면 알려주세요.
댓글 달기