> One thing, that reject message has the IP/Port (smtp:[127.0.0.1]:50100) > of the next-hop MTA in it. > > Can I quiet that message down somewhere to NOT include that info? > Just include the REJECT, but not the IP/Port, maybe referring to > it by its 'syslog_name' or something like that?
Postfix 2.7 and later have an smtp_reply_filter feature, but that was implemented in the Postfix SMTP client, not in the before-filter SMTP server. My estimate is that getting the same functionality in the before-filter SMTP server would take something like this, plus some declarations, initializations, and documentation: File smtpd_proxy.c, function smtpd_proxy_cmd(): if (msg_verbose) msg_info("< %s: %.100s", proxy->service_name, STR(buffer)); /* begin of new code */ if (smtpd_proxy_resp_filter != 0) { new_reply = dict_get(smtpd_proxy_resp_filter, STR(buffer)); if (new_reply != 0) { msg_info("%s: replacing server reply \"%s\" with \"%s\"", state->namaddr, STR(buffer), new_reply); vstring_strcpy(buffer, new_reply); } else if (smtpd_proxy_resp_filter->error != 0) { msg_warn("%s: table %s:%s lookup error for %s", state->queue_id, smtpd_proxy_resp_filter->type, smtpd_proxy_resp_filter->name, printable(STR(buffer), '?')); vstream_longjmp(proxy->service_stream, SMTP_ERR_DATA); } } /* end of new code */ /* * Defend against a denial of service attack by limiting the amount I'm not sure that I will find the time to implement and test this before the Postfix 3.1 stable release. Wietse