]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
pop3: Added %{deleted_bytes} variable to pop3_logout_format
authorTimo Sirainen <tss@iki.fi>
Wed, 19 Aug 2015 11:33:09 +0000 (14:33 +0300)
committerTimo Sirainen <tss@iki.fi>
Wed, 19 Aug 2015 11:33:09 +0000 (14:33 +0300)
doc/example-config/conf.d/20-pop3.conf
src/pop3/pop3-client.c

index 50470e901da929247bded67c8f243f4a7afe5526..e0ba55229fb90a7422dc86e810bbdcf7fb76472d 100644 (file)
@@ -73,6 +73,7 @@
 #  %r - number of RETR commands
 #  %b - number of bytes sent to client as a result of RETR command
 #  %d - number of deleted messages
+#  %{deleted_bytes} - number of bytes in deleted messages
 #  %m - number of messages (before deletion)
 #  %s - mailbox size in bytes (before deletion)
 #  %u - old/new UIDL hash. may help finding out if UIDLs changed unexpectedly
index 32f1fd89293d976b85e041d69acf08fc035a9dc3..36d863b6bb21a113148fdb4758d527584f6bed95 100644 (file)
@@ -523,6 +523,7 @@ static const char *client_stats(struct client *client)
                { 'o', NULL, "output" },
                { 'u', NULL, "uidl_change" },
                { '\0', NULL, "session" },
+               { 'd', NULL, "deleted_bytes" },
                { '\0', NULL, NULL }
        };
        struct var_expand_table *tab;
@@ -547,6 +548,8 @@ static const char *client_stats(struct client *client)
        else
                tab[9].value = "";
        tab[10].value = client->session_id;
+       tab[11].value = client->delete_success ?
+               dec2str(client->deleted_size) : 0;
 
        str = t_str_new(128);
        var_expand(str, client->set->pop3_logout_format, tab);