Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Tips/Tricks/Mods

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 14th November 2011, 18:28
taittinger_hi taittinger_hi is offline
Junior Member
 
Join Date: Dec 2009
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default ISPConfig 3 mail quota exceeded warning

In current versions of ispconfig, when a user's mailbox quota is exceeded, the mailbox user is not informed about this.

Has anyone tried to create, for example, a cron script to scan all 80% and up quota's and sending out an email to the mailbox user or the administrator to inform about the fact that this user(s) is/are running out of mailbox space?

I'm working on a standard ispconfig 3.0.3.3 with courier on ubuntu 8.04lts.

Looking forward to your suggestions!

Kind regards,

Tom
Reply With Quote
Sponsored Links
  #2  
Old 19th December 2012, 15:25
esezako esezako is offline
Senior Member
 
Join Date: Dec 2008
Posts: 176
Thanks: 16
Thanked 4 Times in 3 Posts
Default

+1

Any solution?
Reply With Quote
  #3  
Old 27th January 2013, 04:17
vwpete vwpete is offline
Junior Member
 
Join Date: Apr 2011
Posts: 18
Thanks: 2
Thanked 1 Time in 1 Post
Default +2

yes do we have a solution for this? this would be real handy
Reply With Quote
  #4  
Old 30th January 2013, 12:12
esezako esezako is offline
Senior Member
 
Join Date: Dec 2008
Posts: 176
Thanks: 16
Thanked 4 Times in 3 Posts
Default

Any solution? manual script?
Reply With Quote
  #5  
Old 30th January 2013, 12:18
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,490
Thanks: 835
Thanked 5,533 Times in 4,351 Posts
Default

Edit the /var/vmail/.mailfilter file and use deliverquota for email delivery to get quota notifications similar to this example:

http://courier-mail-server.10983.n7....s-td19080.html
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
esezako (1st February 2013)
  #6  
Old 1st February 2013, 11:16
esezako esezako is offline
Senior Member
 
Join Date: Dec 2008
Posts: 176
Thanks: 16
Thanked 4 Times in 3 Posts
Default

Sorry. Exist a similar script for inform of user global quota? Not mail quota.

Thanks
Reply With Quote
  #7  
Old 1st February 2013, 13:11
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,490
Thanks: 835
Thanked 5,533 Times in 4,351 Posts
Default

ISPConfig uses the normal linux quotas for the website quota, it can be queried e.g. with the repquota command. Most likely there are also scripts available somewhere that use repquota to inform users about their quota usage.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
esezako (1st February 2013)
  #8  
Old 5th February 2013, 09:43
esezako esezako is offline
Senior Member
 
Join Date: Dec 2008
Posts: 176
Thanks: 16
Thanked 4 Times in 3 Posts
Default

http://bugtracker.ispconfig.org/inde...s&task_id=1082
Reply With Quote
  #9  
Old 5th February 2013, 10:06
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,490
Thanks: 835
Thanked 5,533 Times in 4,351 Posts
Default

This thread here is about email quota (which is enforced by dovecot deliver or courier maildrop). The link you posted is about website harddisk quota, both quotas are not related.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #10  
Old 11th February 2013, 05:54
Parsec Parsec is offline
Member
 
Join Date: Jan 2013
Posts: 66
Thanks: 1
Thanked 9 Times in 8 Posts
 
Default

Well this might help if you are using postfix + courier with maildrop

/etc/postfix/master.cf - change the maildrop line so it includes the quota warning. Add -w 90 (where 90 means 90% full - you can alter this figure) just before the -d vmail bit eg:

flags=DRhu user=vmail argv=/usr/bin/maildrop -w 90 -d vmail ${extension} ..etc

(restart postfix)

Create a simple text message /etc/courier/quotawarn - make it look something like this (don't forget to edit for your preferences):
Quote:
From: Mail Delivery System <Mailer-Daemon@server.example.com>
Reply-To: sysadmin@server.example.com
To: "Valued Customer";
Subject: Mail quota warning
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 7bit

Your mailbox on the server is now more than 90% full.
To continue to receive mail you must remove some messages from your mailbox. If you should reach 100% of your quota, mail delivery to you will stop. Your quota is displayed in the webmail interface

Thank You
Now check your mailbox directory, after receiving mail there will be 2 files in there. "ispconfig_mailsize" which I have no idea what it's doing (never seems to update when mail is removed) and "maildirsize" which thankfully is what maildrop is looking at. Once the mailbox hits 90% full it will notice and then send the user the message above. It will also add a file to the mailbox directory called "quotawarn".

Now there are a couple of problems here. That quotawarn file never gets deleted - so stays even if the user cleans out the mailbox. This will interfere with future quota warnings. So you could add a little script run by cron say in the middle of the night. The little script would be something like:
Quote:
#/bin/sh
find /var/vmail -name 'quotawarn' -exec rm -f {} \;
This won't affect the quotas because if it's still hit the 90% limit, maildrop will simply rewrite that quotawarn file and send them another message.

You could also be a little smart and check up on your users to make sure they are not filling up their mailboxes. Simple, just find the mailboxes that have the quotawarn message. You can do this with a cron as well, you could even make it a little more infiormative, but the most simple thing to execute is:
Quote:
#/bin/sh
find /var/vmail -name 'quotawarn' |/usr/bin/mail -s "Server Example - Quota Warnings" your_email@your_domain.com
Edit: Oops! I better mention that if you want to be emailed about the quotawarnings you best run the above warning thing before the previous one that shows how to delete them - else there will be no quotawarnings for it to report on :-)

Last edited by Parsec; 11th February 2013 at 05:58.
Reply With Quote
Reply

Bookmarks

Tags
quota ispconfig3 email

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
Hacked server Captain Installation/Configuration 8 23rd December 2010 11:39
CP210x USB to UART Bridge Linux VCP Drivers(SILICON Labs) perfectpol7 Kernel Questions 13 9th November 2010 08:30
SugarCRM Install on ISPConfig3 w/ SuPHP clucena Installation/Configuration 1 9th February 2010 10:29
cyrus-sasl won't install on my ubuntu9.04 kameelperdza Installation/Configuration 1 13th June 2009 11:28
Problem with dcc-client installation (Postfix) swap-as Installation/Configuration 9 18th September 2008 21:47


All times are GMT +2. The time now is 07:31.


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