Quota, doveadm, postfixadmin

2014-12-28 Thread Ricardo
Hello all and happy holidays.

I have Postfix+Dovecot+MySQL+Postfixadmin with CentOS 6.6, a virtual
machines for testing, and then pass it to servers in production, my problem
is the next:

I add 30 MB for domain.local, then cast 10 MB for test1@domain.local and 20
MB for test2@domain.local, so far so good.

Sending an attachment from one account to another, the example of
test1@domain.local to test2@domain.local, test2@domain.local receive the
email with the attachment.

If I write in the shell doveadm quota get -u test2@domain.local I get the
following:

Quota
name
Type  Value Limit  %
user
STORAGE  3391 2 16
user
MESSAGE  3 1  0

Informs me that I this consuming 16% of the 20 MB assigned to this account,
but if I delete the file and again write doveadm quota get -u
test2@domain.local I release this:

Quota
name
Type  Value Limit  %
user
STORAGE  6782 2 33
user
MESSAGE  4 1  0

Normal serious you continue using 16%, not 33%, when you go into the trash,
because that happens from one place to another, right? These statistics the
Postfixadmin Dame them so much as writing in the shell doveadm quota get -u
test2@domain.local. I delete the file in the trash and to again write
doveadm quota get -u test2@domain.local still see me.

Quota
name
Type  Value Limit  %
user
STORAGE  6782 2 33
user
MESSAGE  4 1  0

But I realize that so that it resets to 0%, I have to close the mail
client, if not would follow using 33% and is when is 0% as shown here.

Quota
name
TypeValue  Limit   %
user
STORAGE 1 2 0
user
MESSAGE2 1 0

Is this normal? The client to send emails and exceed quota will having to
always close the mail client, so you reset and stays at 0%?

Can anyone help me? I have looked online but I can't find information about
this. Has happened to someone?

Thanks so much.

Best regards.


Re: Deleting files in sdbox

2014-12-28 Thread Timo Sirainen
On 27 Dec 2014, at 10:18, Jeff Mitchell  wrote:

> On Dec 27, 2014 3:19 AM, "Marc Stürmer"  wrote:
>> You could use the message UID to delete those pesky messages maybe.
>> 
>> Of course you could try deleting those messages on your own and run
> afterwards a doveadm index. This should also do the job.
> 
> As I said in my OP I could use doveadm-expunge with a search query. But
> I've done that and it's very slow to rerun constantly with various UIDs. I
> could maybe write a query with thousands of UIDs if it wouldn't complain.

I'd think you should be able to run doveadm expunge -u user@domain mailbox foo 
uid 5,10,100,101,102,etc.

That shouldn't be much slower than rm'ing them.

> My actual question as stated was what happens if I just rm those files...
> if Dovecot will be okay with it, figure out that the mailboxes don't match,
> and fix the index and cache files. If rerunning doveadm-index after
> manually will make everything happy, this seems like the faster approach.
> But I just want to make sure I won't damage the sdbox in a permanent sense.

doveadm force-resync fixes it, but it's a bit ugly way.

How about using doveadm deduplicate command instead?