2015. 8. 28. 09:48 IT/network

SMTP 코드

SMTP 규약 은 rfc2821 / rfc1123 / rfc1893 / rfc2034 이며


코드만 요약 및 실 커넥션간 발생한 메시지도 넣어보았습니다.


코드에 따른 메시지가 100% 정확하지는 않으며 SMTP서버에 따라 메시지가 다릅니다.


100 코드
- 101 : The server is unable to connect.
- 111 : Connection refused or inability to open an SMTP stream.


200 코드
- 211 : System status message or help reply.
- 214 : A response to the HELP command.
- 220 : The server is ready.
- 221 : The server is closing its transmission channel. It can come with side messages like "Goodbye" or "Closing connection".
- 235 : Authentication Succeeded
- 250 : Its typical side message is "Requested mail action okay completed": meaning that the server has transmitted a message.
- 251 : "User not local will forward": the recipient's account is not on the present server, so it will be relayed to another.
- 252 : The server cannot verify the user, but it will try to deliver the message anyway.




300 코드

- 334 {BASE64 인코딩 문자} : VXNlcm5hbWU6 => "Username:" / UGFzc3dvcmQ6 => "Password:" 로그인 진행간 발생하는 코드, 메시지
- 354 : The side message can be very cryptic ("Start mail input end <CRLF>.<CRLF>"). It's the typical response to the DATA command.


400 코드
- 420 : "Timeout connection problem": there have been issues during the message transfer.
- 421 : The service is unavailable due to a connection problem: it may refer to an exceeded limit of simultaneous connections, or a more general temporary problem.
- 422 : The recipient's mailbox has exceeded its storage limit.
- 431 : Not enough space on the disk, or an "out of memory" condition due to a file overload.
- 432 : Typical side-message: "The recipient's Exchange Server incoming mail queue has been stopped".
- 441 : The recipient's server is not responding.
- 442 : The connection was dropped during the transmission.
- 446 : The maximum hop count was exceeded for the message: an internal loop has occurred.
- 447 : Your outgoing message timed out because of issues concerning the incoming server.
- 449 : A routing error.
- 450 : "Requested action not taken – The user's mailbox is unavailable". The mailbox has been corrupted or placed on an offline server, or your email hasn't been accepted for IP problems or blacklisting.
- 451 : "Requested action aborted – Local error in processing". Your ISP's server or the server that got a first relay from yours has encountered a connection problem.
- 452 : Too many emails sent or too many recipients: more in general, a server storage limit exceeded.
- 471 : An error of your mail server, often due to an issue of the local anti-spam filter.


500 코드
- 500 : A syntax error: the server couldn't recognize the command.
- 501 : Another syntax error, not in the command but in its parameters or arguments.
- 502 : The command is not implemented.
- 503 : The server has encountered a bad sequence of commands, or it requires an authentication.
- 504 : A command parameter is not implemented.
- 510/511 : Bad email address.
- 512 : A DNS error: the host server for the recipient's domain name cannot be found.
- 513 : "Address type is incorrect": another problem concerning address misspelling. In few cases, however, it's related to an authentication issue.
- 523 : The total size of your mailing exceeds the recipient server's limits.
- 530 : Normally, an authentication problem. But sometimes it's about the recipient's server blacklisting yours, or an invalid email address.

- 534 : 5.7.14  https://support.google.com/mail/answer/78754 tq6sm3601979pbc.57 - gsmtp 구글 보안에 막힌경우
- 541 : The recipient address rejected your message: normally, it's an error caused by an anti-spam filter.
- 550 : It usually defines a non-existent email address on the remote side.
- 551 : "User not local or invalid address – Relay denied". Meaning, if both your address and the recipient's are not locally hosted by the server, a relay can be interrupted.
- 552 : "Requested mail actions aborted – Exceeded storage allocation": simply put, the recipient's mailbox has exceeded its limits.
- 553 : "Requested action not taken – Mailbox name invalid". That is, there's an incorrect email address into the recipients line.
- 554 : This means that the transaction has failed. It's a permanent error and the server will not try to send the message again.



SMTP커넥션간 400 부터 499 까지는 에러로 간주하고 재시도, 500부터 599까지는 실패처리 해버리시면 간단합니다.


나중에 보완을 위해 로깅만 하면 더더욱 좋구요

'IT > network' 카테고리의 다른 글

SMTP 메일발송 패킷 예제  (0) 2015.08.25
DNS정보변경 반영 예상시간 확인  (0) 2015.07.24
Posted by xanasia

블로그 이미지
xanasia

공지사항

Yesterday
Today
Total

달력

 « |  » 2024.5
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

글 보관함