Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 29th April 2012, 19:59
ftkyiu ftkyiu is offline
Junior Member
 
Join Date: Apr 2012
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
Red face Ispconfig and dovecot email quota not updated after email erased

Hello.

I have a quota set for some mailboxes through ispconfig.
They got filled up. Now when i manually delete the email inside of them through ssh the quota in ispconfig doesn't change and keeps throwing errors in the log: mailbox full, even though there are NO emails in the email folder /var/vmail/user/Maildir/cur.

As a temporary fix i increased the quota and am now experimenting on an email i created.
I have found the following:
By manually deleting the email in cur dovecot correctly reindexes emails upon client login, yet it doesn't update the used hd space in ispconfig quota field.

Ex. 1) Send 2 emails to testbox@test.te
Stat: Mailbox full: 3.0 KB out of 1 MB
2) Connect via client and read email.
Stat: Emails are moved from new to cur
3) Now connect via ssh to mail server and delete these sent emails from cur.
There are no copies, i checked via grep -lir "content in letter" * and find and ls -R. No copies of letters or their content exist. Not in /tmp, not in /var/spool/mail nowhere!
Stat: Mailbox full: 3.0 KB out of 1 MB
4) Send more mail (another 3 KB) repeating steps 1-3.
Stat: Mailbox full: 6.0 KB out of 1 MB.

How do i get ispconfig to reupdate the used hd space of a email user?
I am stumped.
Reply With Quote
Sponsored Links
  #2  
Old 30th April 2012, 09:51
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 36,032
Thanks: 826
Thanked 5,381 Times in 4,228 Posts
Default

The quota is managed by dovecot and not ispconfig. If you deleted messages manually, you will have to instruct dovecot to recalculate the quota. The easiest way should be to send a email to the mailbox or to delete a email with imap as thsi should start the recalculation.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 30th April 2012, 14:45
ftkyiu ftkyiu is offline
Junior Member
 
Join Date: Apr 2012
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
Default

till, Thanks, but the quota is not recalculated by sending mail or logging in as i have tried this again to no avail, even though as my example demonstrates i already tried it.

I have found the following: http://dovecot.org/list/dovecot/2012...ry/063777.html
which states:
With v2.x you can simply do: doveadm quota recalc -u username
With v1.x you can delete the user's quota row from sql.

I have v1.x (dovecot --version). Now i have checked phpmyadmin and i have no db for dovecot. Only for ispconfig and some other stuff.
The config file /etc/dovecot.conf (generated by ispconfig) says:
Code:
plugin {
quota = dict:user::file:/var/vmail/%d/%n/.quotausage
sieve=/var/vmail/%d/%n/.sieve
}
auth default {
...
  passdb sql {
    # Path for SQL configuration file
    args = /etc/dovecot/dovecot-sql.conf
  }
}
Yet sql.conf leads me to the ispconfig database:
Code:
user_query = SELECT email as user, maildir as home, CONCAT('maildir:', maildir, '/Maildir') as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE email = '%u' AND disable%Ls = 'n'
How would i go about deleting said row from sql because i cant find anything in ispconfigs database having anything remotely to do with used quota space?

P.S. it seems that dovect only updates used quota space when
1) a user that is NOT logged in recieves an email.
and only increases it, deleting email doesn't decrease the used quota space. (Yes, it's not in the .Trash, fully expunged).

P.P.S. FIxed!
1) delete /var/vmail/domain.tld/user/Maildir/.quotausage
2) login via imap
3) logout
4) update ispconfig
5) in about 30 minutes or less the quota usage will update.

Last edited by ftkyiu; 30th April 2012 at 19:15.
Reply With Quote
The Following User Says Thank You to ftkyiu For This Useful Post:
SupuS (9th August 2012)
  #4  
Old 3rd May 2013, 12:50
diablo666 diablo666 is offline
Member
 
Join Date: Mar 2007
Posts: 95
Thanks: 15
Thanked 2 Times in 2 Posts
Default

Hi ftkyiu,
i've got youre problem.

for the fix, what do you mean with "update ispconfig"?

Tnx for response.
Reply With Quote
  #5  
Old 3rd May 2013, 15:10
ftkyiu ftkyiu is offline
Junior Member
 
Join Date: Apr 2012
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
Default

I don't remember, lol.
All that i remember is that you delete the .quotausage file.
Make a backup just in case.
G'luck.

Last edited by ftkyiu; 3rd May 2013 at 15:12.
Reply With Quote
  #6  
Old 3rd May 2013, 17:18
diablo666 diablo666 is offline
Member
 
Join Date: Mar 2007
Posts: 95
Thanks: 15
Thanked 2 Times in 2 Posts
Default

Ok, i've updated to lates version and all is fixed now.
Reply With Quote
  #7  
Old 3rd June 2014, 16:20
Ovidiu Ovidiu is offline
Senior Member
 
Join Date: Sep 2005
Posts: 1,262
Thanks: 78
Thanked 24 Times in 20 Posts
Default

tried:

Quote:
doveadm quota recalc -u username
doveadm(root): Fatal: Unknown command 'quota', but plugin quota exists. Try to set mail_plugins=quota
But I checked and its there inside /etc/dovecot/dovecot.conf:

Quote:
protocol imap {
mail_plugins = quota imap_quota
}
protocol pop3 {
pop3_uidl_format = %08Xu%08Xv
mail_plugins = quota
}
protocol lda {
mail_plugins = sieve quota
}
Any ideas? My quota display inside roundcube and ISPCFG3 isn't updating.

Using a server setup according to the perfect server wheezy + nginx
Reply With Quote
  #8  
Old 4th June 2014, 09:53
mccharlet mccharlet is offline
Senior Member
 
Join Date: Feb 2007
Posts: 261
Thanks: 63
Thanked 11 Times in 7 Posts
 
Default

Hi,

Add this line to /et/dovecot/dovcot.conf

mail_plugins = quota

Best regards
__________________
Thanks
Cdric

Sorry for my english

Hosting : http://www.jheberge.ch
Reply With Quote
Reply

Bookmarks

Tags
dovecot, email, ispconfig, nightmare, quota

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
dovecot (updated) problem marcozeus Installation/Configuration 8 6th August 2011 11:37
Postfix SMTP Auth to Dovecot Not Working -- HELP! Scratchpad Server Operation 6 12th April 2011 13:29
MySQL Error Nolan Installation/Configuration 12 16th February 2011 02:15
Mac4Lin ver.0.2 - Mac OS X Leopard Transformation pack infra_red_dude Desktop Operation 77 12th September 2010 22:21
ISPConfig 2.3.3-dev released till General 10 12th March 2008 21:08


All times are GMT +2. The time now is 18:46.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.