]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-smtp: smtp-server - Record the number of denied recipients.
authorStephan Bosch <stephan.bosch@dovecot.fi>
Tue, 12 Feb 2019 00:33:07 +0000 (01:33 +0100)
committerStephan Bosch <stephan.bosch@dovecot.fi>
Sat, 2 Mar 2019 10:57:18 +0000 (11:57 +0100)
src/lib-smtp/smtp-server-cmd-rcpt.c
src/lib-smtp/smtp-server-private.h

index e01aed8ae7936924d9fbb3355d440eaa809552a7..7b6fe66670bb3194c0e77e51568f0a8b144f7682 100644 (file)
@@ -58,6 +58,8 @@ cmd_rcpt_completed(struct smtp_server_cmd_ctx *cmd,
 
        i_assert(smtp_server_command_is_replied(command));
        if (!smtp_server_command_replied_success(command)) {
+               conn->state.denied_rcpt_cmds++;
+
                /* failure; substitute our own error if predictable */
                if (smtp_server_command_reply_is_forwarded(command))
                        (void)cmd_rcpt_check_state(cmd);
index dc2d3b9299066ddfbc3875264dc004bbee2c17f0..eaa8dd41c88f7a6a47ba3a4b3fd6eac75ea75c6c 100644 (file)
@@ -125,7 +125,8 @@ struct smtp_server_state_data {
        enum smtp_server_state state;
        time_t timestamp;
 
-       unsigned int pending_mail_cmds, pending_rcpt_cmds;
+       unsigned int pending_mail_cmds;
+       unsigned int pending_rcpt_cmds, denied_rcpt_cmds;
        unsigned int pending_data_cmds;
 
        struct smtp_server_transaction *trans;