Mercurial > dovecot > core-2.2
changeset 18979:06351f47a15c
pop3: Added %{deleted_bytes} variable to pop3_logout_format
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 19 Aug 2015 14:33:09 +0300 |
parents | ff9a9ffcd2af |
children | 39255150d521 |
files | doc/example-config/conf.d/20-pop3.conf src/pop3/pop3-client.c |
diffstat | 2 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/example-config/conf.d/20-pop3.conf Wed Aug 19 14:30:09 2015 +0300 +++ b/doc/example-config/conf.d/20-pop3.conf Wed Aug 19 14:33:09 2015 +0300 @@ -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
--- a/src/pop3/pop3-client.c Wed Aug 19 14:30:09 2015 +0300 +++ b/src/pop3/pop3-client.c Wed Aug 19 14:33:09 2015 +0300 @@ -523,6 +523,7 @@ { '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 @@ 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);