sisimai / p5-sisimai

Mail Analyzing Interface for email bounce: A Perl module to parse RFC5322 bounce mails and generating structured data as JSON from parsed results. Formerly known as bounceHammer 4: an error mail analyzer.
https://libsisimai.org
BSD 2-Clause "Simplified" License
78 stars 26 forks source link

D.S.N. 4.7.25 on Postfix 3 #253

Open azumakuniyuki opened 6 years ago

azumakuniyuki commented 6 years ago

Postfix 3.1.6 rejects connection with the following message:

(host neko.exmple.jp[192.0.2.222] said: 450 4.7.25 Client host rejected: cannot find your hostname, [192.0.2.22] (in reply to RCPT TO command))
azumakuniyuki commented 6 years ago

src/smtpd/smtpd_check.c on Postfix 3.1.4

static int reject_unknown_client(SMTPD_STATE *state)
{
    const char *myname = "reject_unknown_client";

    if (msg_verbose)
    msg_info("%s: %s %s", myname, state->name, state->addr);

    /* RFC 7372: Email Authentication Status Codes. */
    if (state->name_status != SMTPD_PEER_CODE_OK)
    return (smtpd_check_reject(state, MAIL_ERROR_POLICY,
                state->name_status >= SMTPD_PEER_CODE_PERM ?
                   var_unk_client_code : 450, "4.7.25",
            "Client host rejected: cannot find your hostname, [%s]",
                   state->addr));
    return (SMTPD_CHECK_DUNNO);
}
azumakuniyuki commented 6 years ago

We need a sample email including the status code.