Trash plugin unexpected results

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Trash plugin unexpected results

Stephan Herker
I have the trash plugin enabled and testing it out I had an account with
a 30MB quota.  In the accounts trash it had an email with a large
attachment.  I sent the same email again to the account expecting the
trash plugin to purge the message from trash to make space for the new
message in the inbox.  However I got an error saying it couldn't remove
enough trash to make space.  This behavior seems unexpected because it
seems like the trash plugin didn't account for the quota and size
available.  Debug logs and dovecot -n output below.

Oct 07 17:33:13 lmtp(31543): Debug: none: root=, index=, indexpvt=,
control=, inbox=, alt=
Oct 07 17:33:13 lmtp(31543): Info: Connect from local
Oct 07 17:33:13 lmtp(31543): Debug: Loading modules from directory:
/usr/lib64/dovecot
Oct 07 17:33:13 lmtp(31543): Debug: Module loaded:
/usr/lib64/dovecot/lib10_quota_plugin.so
Oct 07 17:33:13 lmtp(31543): Debug: Module loaded:
/usr/lib64/dovecot/lib11_trash_plugin.so
Oct 07 17:33:13 lmtp(31543): Debug: Module loaded:
/usr/lib64/dovecot/lib20_autocreate_plugin.so
Oct 07 17:33:13 lmtp(31543): Debug: Module loaded:
/usr/lib64/dovecot/lib90_sieve_plugin.so
Oct 07 17:33:13 lmtp(31543): Debug: auth input: [hidden email]
home=/home/vmail/testdo.com/123 mail=maildir:/home/vmail/testdo.com/123
uid=2000 gid=2000 quota_rule=*:storage=30000
Oct 07 17:33:13 lmtp(31543): Debug: Added userdb setting:
mail=maildir:/home/vmail/testdo.com/123
Oct 07 17:33:13 lmtp(31543): Debug: Added userdb setting:
plugin/quota_rule=*:storage=30000
Oct 07 17:33:13 lmtp(31543, [hidden email]): Debug: Effective uid=2000,
gid=2000, home=/home/vmail/testdo.com/123
Oct 07 17:33:13 lmtp(31543, [hidden email]): Debug: Quota root:
name=User quota backend=dict args=:proxy::quotadict
Oct 07 17:33:13 lmtp(31543, [hidden email]): Debug: Quota rule:
root=User quota mailbox=* bytes=30720000 messages=0
Oct 07 17:33:13 lmtp(31543, [hidden email]): Debug: Quota rule:
root=User quota mailbox=Trash bytes=+104857600 messages=0
Oct 07 17:33:13 lmtp(31543, [hidden email]): Debug: Quota grace:
root=User quota bytes=3072000 (10%)
Oct 07 17:33:13 lmtp(31543, [hidden email]): Debug: dict quota:
user=[hidden email], uri=proxy::quotadict, noenforcing=0
Oct 07 17:33:13 lmtp(31543, [hidden email]): Debug: Namespace inbox:
type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes,
subscriptions=yes location=maildir:/home/vmail/testdo.com/123
Oct 07 17:33:13 lmtp(31543, [hidden email]): Debug: maildir++:
root=/home/vmail/testdo.com/123, index=, indexpvt=, control=,
inbox=/home/vmail/testdo.com/123, alt=
Oct 07 17:33:13 lmtp(31543, [hidden email]): Debug: trash plugin: Added
'Spam' with priority 1
Oct 07 17:33:13 lmtp(31543, [hidden email]): Debug: trash plugin: Added
'Trash' with priority 2
Oct 07 17:33:13 lmtp(31543, [hidden email]): Debug: sieve: Pigeonhole
version 0.4.2 initializing
Oct 07 17:33:13 lmtp(31543, [hidden email]): Debug:
uFHMBEly2Vk3ewAAobcTNA: sieve: using the following location for user's
Sieve script: /home/vmail/testdo.com/123/.dovecot.sieve;name=main script
Oct 07 17:33:13 lmtp(31543, [hidden email]): Debug:
uFHMBEly2Vk3ewAAobcTNA: sieve: loading script
/home/vmail/testdo.com/123/.dovecot.sieve;name=main script
Oct 07 17:33:13 lmtp(31543, [hidden email]): Debug:
uFHMBEly2Vk3ewAAobcTNA: sieve: script binary
/home/vmail/testdo.com/123/.dovecot.svbin successfully loaded
Oct 07 17:33:13 lmtp(31543, [hidden email]): Debug:
uFHMBEly2Vk3ewAAobcTNA: sieve: binary save: not saving binary
/home/vmail/testdo.com/123/.dovecot.svbin, because it is already stored
Oct 07 17:33:13 lmtp(31543, [hidden email]): Debug:
uFHMBEly2Vk3ewAAobcTNA: sieve: executing script from
/home/vmail/testdo.com/123/.dovecot.svbin
Oct 07 17:33:13 lmtp(31543, [hidden email]): Debug: trash plugin: Failed
to remove enough messages (needed 17035766 bytes, expunged only 16803594
bytes)
Oct 07 17:33:13 lmtp(31543, [hidden email]): Info:
uFHMBEly2Vk3ewAAobcTNA: sieve:
msgid=<[hidden email]>: failed to
store into mailbox 'INBOX': Quota exceeded (mailbox for user is full)
Oct 07 17:33:13 lmtp(31543, [hidden email]): Info:
uFHMBEly2Vk3ewAAobcTNA: sieve: execution of script
/home/vmail/testdo.com/123/.dovecot.sieve;name=main script failed with
unsuccessful implicit keep (user logfile
/home/vmail/testdo.com/123/.dovecot.sieve.log may reveal additional details)
Oct 07 17:33:13 lmtp(31543): Info: Disconnect from local: Successful quit

# 2.2.10: /etc/dovecot/dovecot.conf
# OS: Linux 3.10.0-514.26.2.el7.x86_64 x86_64 CentOS Linux release
7.4.1708 (Core)  xfs
auth_mechanisms = plain login
dict {
   quotadict = mysql:/etc/dovecot/dovecot-dict-quota.conf
}
first_valid_uid = 2000
hostname = testdo.com
last_valid_uid = 2000
log_path = /var/log/dovecot.log
mail_debug = yes
mail_gid = vmail
mail_location = maildir:/home/vmail/%d/%n
mail_plugins = " quota trash expire"
mail_privileged_group = mail
mail_uid = vmail
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope
encoded-character vacation subaddress comparator-i;ascii-numeric
relational regex imap4flags copy include variables body enotify
environment mailbox date ihave
mbox_write_locks = fcntl
namespace inbox {
   inbox = yes
   location =
   mailbox Drafts {
     auto = subscribe
     special_use = \Drafts
   }
   mailbox Junk {
     auto = subscribe
     special_use = \Junk
   }
   mailbox Sent {
     auto = subscribe
     special_use = \Sent
   }
   mailbox "Sent Messages" {
     special_use = \Sent
   }
   mailbox Trash {
     auto = subscribe
     special_use = \Trash
   }
   prefix =
}
passdb {
   args = /etc/dovecot/dovecot-sql.conf.ext
   driver = sql
}
plugin {
   quota = dict:User quota::proxy::quotadict
   quota_grace = 10%%
   quota_rule2 = Trash:storage=+100M
   quota_status_nouser = DUNNO
   quota_status_overquota = 552 5.2.2 Mailbox is full
   quota_status_success = DUNNO
   sieve_dir = ~/sieve
   sieve_global_dir = /etc/dovecot/sieve/global/
   sieve_global_path = /etc/dovecot/sieve/default.sieve
   trash = /etc/dovecot/dovecot-trash.conf.ext
}
postmaster_address = [hidden email]
protocols = imap lmtp sieve
service auth-worker {
   user = vmail
}
service auth {
   unix_listener /var/spool/postfix/private/auth {
     group = postfix
     mode = 0666
     user = postfix
   }
   unix_listener auth-client {
     group = postfix
     mode = 0660
     user = postfix
   }
   unix_listener auth-master {
     group = vmail
     mode = 0660
     user = vmail
   }
   unix_listener auth-userdb {
     mode = 0600
     user = vmail
   }
   user = dovecot
}
service dict {
   unix_listener dict {
     group = vmail
     mode = 0600
     user = vmail
   }
}
service imap-login {
   inet_listener imap {
     port = 143
   }
}
service lmtp {
   executable = lmtp -L
   unix_listener /var/spool/postfix/private/dovecot-lmtp {
     group = postfix
     mode = 0600
     user = postfix
   }
}
service managesieve-login {
   inet_listener sieve {
     port = 4190
   }
}
service pop3-login {
   inet_listener pop3 {
     port = 110
   }
}
ssl_cert = </etc/pki/dovecot/certs/dovecot.pem
ssl_key = </etc/pki/dovecot/private/dovecot.pem
userdb {
   args = /etc/dovecot/dovecot-sql.conf.ext
   driver = sql
}
protocol lmtp {
   info_log_path = /var/log/dovecot-lmtp.log
   log_path = /var/log/dovecot-lmtp-errors.log
   mail_plugins = " quota trash expire autocreate sieve quota"
   postmaster_address = [hidden email]
}
protocol sieve {
   info_log_path = /var/log/dovecot-sieve.log
   log_path = /var/log/dovecot-sieve-errors.log
   managesieve_implementation_string = dovecot
   managesieve_max_line_length = 65536
}
protocol imap {
   mail_plugins = " quota trash expire imap_quota notify quota"
}
protocol pop3 {
   mail_plugins = " quota trash expire quota"
}

Any help is appreciated, thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Trash plugin unexpected results

Stephan Herker
Just wondering if anyone has seen this behavior or if there are some
documents that would let me know the limitations of the trash plugin.  I
don't think I'll be commonly using accounts with 30 MB quotas, but I
feel like the trash plugin should account for the whole quota.

Any help is appreciated.

On 10/10/2017 8:20 AM, Stephan Herker wrote:

>
> I have the trash plugin enabled and testing it out I had an account
> with a 30MB quota.  In the accounts trash it had an email with a large
> attachment.  I sent the same email again to the account expecting the
> trash plugin to purge the message from trash to make space for the new
> message in the inbox.  However I got an error saying it couldn't
> remove enough trash to make space.  This behavior seems unexpected
> because it seems like the trash plugin didn't account for the quota
> and size available. Debug logs and dovecot -n output below.
>
> SNIP
>
> Any help is appreciated, thanks.
>
Reply | Threaded
Open this post in threaded view
|

Re: Trash plugin unexpected results

Aki Tuomi-2
Does indeed sound bit strange, will have to try replicate this to see
what happens.

Aki


On 13.10.2017 23:37, Stephan Herker wrote:

> Just wondering if anyone has seen this behavior or if there are some
> documents that would let me know the limitations of the trash plugin. 
> I don't think I'll be commonly using accounts with 30 MB quotas, but I
> feel like the trash plugin should account for the whole quota.
>
> Any help is appreciated.
>
> On 10/10/2017 8:20 AM, Stephan Herker wrote:
>>
>> I have the trash plugin enabled and testing it out I had an account
>> with a 30MB quota.  In the accounts trash it had an email with a
>> large attachment.  I sent the same email again to the account
>> expecting the trash plugin to purge the message from trash to make
>> space for the new message in the inbox.  However I got an error
>> saying it couldn't remove enough trash to make space.  This behavior
>> seems unexpected because it seems like the trash plugin didn't
>> account for the quota and size available. Debug logs and dovecot -n
>> output below.
>>
>> SNIP
>>
>> Any help is appreciated, thanks.
>>
Reply | Threaded
Open this post in threaded view
|

Re: Trash plugin unexpected results

Aki Tuomi-2
Trash plugin won't delete messages from your folders if the deletion
would not give enough space to start with, and in your case removing the
attachment would have still left the user over quota, so trash plugin
did not take action.

Oct 07 17:33:13 lmtp(31543, [hidden email]): Debug: trash plugin: Failed
to remove enough messages (needed 17035766 bytes, expunged only 16803594
bytes)

Aki

On 16.10.2017 09:06, Aki Tuomi wrote:

> Does indeed sound bit strange, will have to try replicate this to see
> what happens.
>
> Aki
>
>
> On 13.10.2017 23:37, Stephan Herker wrote:
>> Just wondering if anyone has seen this behavior or if there are some
>> documents that would let me know the limitations of the trash plugin. 
>> I don't think I'll be commonly using accounts with 30 MB quotas, but I
>> feel like the trash plugin should account for the whole quota.
>>
>> Any help is appreciated.
>>
>> On 10/10/2017 8:20 AM, Stephan Herker wrote:
>>> I have the trash plugin enabled and testing it out I had an account
>>> with a 30MB quota.  In the accounts trash it had an email with a
>>> large attachment.  I sent the same email again to the account
>>> expecting the trash plugin to purge the message from trash to make
>>> space for the new message in the inbox.  However I got an error
>>> saying it couldn't remove enough trash to make space.  This behavior
>>> seems unexpected because it seems like the trash plugin didn't
>>> account for the quota and size available. Debug logs and dovecot -n
>>> output below.
>>>
>>> SNIP
>>>
>>> Any help is appreciated, thanks.
>>>
Reply | Threaded
Open this post in threaded view
|

Re: Trash plugin unexpected results

Stephan Herker
Something about the calculation is wrong.  The user I was testing with only
had the 1 large email in the trash with a 30 MB quota.  If I need 17.5 MB
and I have a 16MB file I can delete, then removing the file releases enough
space.  It seems as though the trash plugin only accounts for email files
during calculations, not also including quota total.

On Oct 15, 2017 11:27 PM, "Aki Tuomi" <[hidden email]> wrote:

> Trash plugin won't delete messages from your folders if the deletion
> would not give enough space to start with, and in your case removing the
> attachment would have still left the user over quota, so trash plugin
> did not take action.
>
> Oct 07 17:33:13 lmtp(31543, [hidden email]): Debug: trash plugin: Failed
> to remove enough messages (needed 17035766 bytes, expunged only 16803594
> bytes)
>
> Aki
>
> On 16.10.2017 09:06, Aki Tuomi wrote:
> > Does indeed sound bit strange, will have to try replicate this to see
> > what happens.
> >
> > Aki
> >
> >
> > On 13.10.2017 23:37, Stephan Herker wrote:
> >> Just wondering if anyone has seen this behavior or if there are some
> >> documents that would let me know the limitations of the trash plugin.
> >> I don't think I'll be commonly using accounts with 30 MB quotas, but I
> >> feel like the trash plugin should account for the whole quota.
> >>
> >> Any help is appreciated.
> >>
> >> On 10/10/2017 8:20 AM, Stephan Herker wrote:
> >>> I have the trash plugin enabled and testing it out I had an account
> >>> with a 30MB quota.  In the accounts trash it had an email with a
> >>> large attachment.  I sent the same email again to the account
> >>> expecting the trash plugin to purge the message from trash to make
> >>> space for the new message in the inbox.  However I got an error
> >>> saying it couldn't remove enough trash to make space.  This behavior
> >>> seems unexpected because it seems like the trash plugin didn't
> >>> account for the quota and size available. Debug logs and dovecot -n
> >>> output below.
> >>>
> >>> SNIP
> >>>
> >>> Any help is appreciated, thanks.
> >>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Trash plugin unexpected results

Stephan Herker
In reply to this post by Aki Tuomi-2
Something about the calculation is wrong.  The user I was testing with only
had the 1 large email in the trash with a 30 MB quota.  If I need 17.5 MB
and I have a 16MB file I can delete, then removing the file releases enough
space.  It seems as though the trash plugin only accounts for email files
during calculations, not also including quota total.

On Oct 15, 2017 11:27 PM, "Aki Tuomi" <[hidden email]> wrote:

> Trash plugin won't delete messages from your folders if the deletion
> would not give enough space to start with, and in your case removing the
> attachment would have still left the user over quota, so trash plugin
> did not take action.
>
> Oct 07 17:33:13 lmtp(31543, [hidden email]): Debug: trash plugin: Failed
> to remove enough messages (needed 17035766 bytes, expunged only 16803594
> bytes)
>
> Aki
>
> On 16.10.2017 09:06, Aki Tuomi wrote:
> > Does indeed sound bit strange, will have to try replicate this to see
> > what happens.
> >
> > Aki
> >
> >
> > On 13.10.2017 23:37, Stephan Herker wrote:
> >> Just wondering if anyone has seen this behavior or if there are some
> >> documents that would let me know the limitations of the trash plugin.
> >> I don't think I'll be commonly using accounts with 30 MB quotas, but I
> >> feel like the trash plugin should account for the whole quota.
> >>
> >> Any help is appreciated.
> >>
> >> On 10/10/2017 8:20 AM, Stephan Herker wrote:
> >>> I have the trash plugin enabled and testing it out I had an account
> >>> with a 30MB quota.  In the accounts trash it had an email with a
> >>> large attachment.  I sent the same email again to the account
> >>> expecting the trash plugin to purge the message from trash to make
> >>> space for the new message in the inbox.  However I got an error
> >>> saying it couldn't remove enough trash to make space.  This behavior
> >>> seems unexpected because it seems like the trash plugin didn't
> >>> account for the quota and size available. Debug logs and dovecot -n
> >>> output below.
> >>>
> >>> SNIP
> >>>
> >>> Any help is appreciated, thanks.
> >>>
>