smtp_server_connection_output, conn);
o_stream_cork(conn->conn.output);
- if (conn->authenticated) {
+ if (conn->set.no_greeting) {
+ /* Don't send greeting or login reply. */
+ } else if (conn->authenticated) {
/* RFC 4954, Section 4:
Should the client successfully complete the exchange, the
SMTP server issues a 235 reply. */
conn->set.rcpt_domain_optional =
conn->set.rcpt_domain_optional ||
set->rcpt_domain_optional;
+ conn->set.no_greeting =
+ conn->set.no_greeting || set->no_greeting;
conn->set.debug = conn->set.debug || set->debug;
}
server->set.auth_optional = set->auth_optional;
server->set.rcpt_domain_optional = set->rcpt_domain_optional;
server->set.mail_path_allow_broken = set->mail_path_allow_broken;
+ server->set.no_greeting = set->no_greeting;
server->set.debug = set->debug;
server->set.no_state_in_reason = set->no_state_in_reason;
bool rcpt_domain_optional:1;
/* Don't include "(state=%s)" in the disconnection reason string. */
bool no_state_in_reason:1;
+ /* Don't send a greeting or login success message to the client upon
+ connection start. */
+ bool no_greeting:1;
};
struct smtp_server_stats {