Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 4th February 2007, 20:00
dbau dbau is offline
Junior Member
 
Join Date: Feb 2007
Location: California, USA
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Daily Quota report empty

Hello,
I used Falko's "Virtual Users And Domains With Postfix, Courier And MySQL (+
SMTP-AUTH, Quota, SpamAssassin, ClamAV) howto on Debian, everything works nicely - great howto by the way - only the daily quota report looks a bit anemic every time:

====begin====
DAILY QUOTA REPORT:

----------------------------------------------
| % USAGE | ACCOUNT NAME |
----------------------------------------------

--
My Company

====end====

There are multiple virtual domains and users in the mysql database,
and the virtual_mailbox_base variable in main.cf is set to /home/vmail.

Thanks for any hints/pointers,

Daniel
Reply With Quote
Sponsored Links
  #2  
Old 5th February 2007, 13:40
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

Did you save the quota_notify script with Unix linebreaks?
Also make sure you produced no syntax error when you modified the script.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 6th February 2007, 03:14
dbau dbau is offline
Junior Member
 
Join Date: Feb 2007
Location: California, USA
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for your fast response, Falko!
I used 'wget' to download the file, and after I edited the variables at the top I issued the command 'chmod 755 quota_notify'. (I did the entire procedure a couple of times during troubleshooting.) I also couldn't find any syntax errors. Could it be that the quota patch for Postfix wasn't applied correctly by me? Is there a way to find out, and would it be possible to (re-)apply the patch?
Daniel
Reply With Quote
  #4  
Old 7th February 2007, 18:13
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

I think the script works independently from the Postfix quota patch.
Do you get any errors when you run
Code:
/usr/local/sbin/quota_notify
on the shell?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 9th February 2007, 03:30
dbau dbau is offline
Junior Member
 
Join Date: Feb 2007
Location: California, USA
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

No errors...

debian:~#
debian:~# /usr/local/sbin/quota_notify
debian:~#

All I get is the (almost) empty Daily Quota Report email.

Daniel
Reply With Quote
  #6  
Old 10th February 2007, 20:08
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

To be honest I don't know what's wrong...
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 14th March 2007, 19:27
rafota rafota is offline
Junior Member
 
Join Date: Mar 2007
Posts: 1
Thanks: 0
Thanked 1 Time in 1 Post
Default

This is because the mailbox is nearly empty (integer percent is zero).

Edit "/usr/local/sbin/quota_notify" and change:

Code:
      close(QF);
      next if (! $used);
      my $percent = int($used / $quota * 100);
      $lusers{$user} = $percent unless not $percent;
by:

Code:
      close(QF);
      next if (! $used);
      my $percent = int($used / $quota * 100);
      $lusers{$user} = $percent;
and the report becomes:

Code:
DAILY QUOTA REPORT:

----------------------------------------------
| % USAGE |            ACCOUNT NAME          |
----------------------------------------------
|     0   |               user@domain.com    |
----------------------------------------------
Reply With Quote
The Following User Says Thank You to rafota For This Useful Post:
qtx (9th June 2007)
  #8  
Old 27th September 2007, 05:05
justiceiro_df justiceiro_df is offline
Junior Member
 
Join Date: Sep 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to justiceiro_df
Default

Quote:
Originally Posted by rafota
This is because the mailbox is nearly empty (integer percent is zero).

Edit "/usr/local/sbin/quota_notify" and change:

Code:
      close(QF);
      next if (! $used);
      my $percent = int($used / $quota * 100);
      $lusers{$user} = $percent unless not $percent;
by:

Code:
      close(QF);
      next if (! $used);
      my $percent = int($used / $quota * 100);
      $lusers{$user} = $percent;
and the report becomes:

Code:
DAILY QUOTA REPORT:

----------------------------------------------
| % USAGE |            ACCOUNT NAME          |
----------------------------------------------
|     0   |               user@domain.com    |
----------------------------------------------

I' ve made this sujest chanche but still not work. As told, I execute in shell lines, I have no errors. And got a empty mail. My virtual home isn´t in /home/vmail. I made a separate partition to it. It's could be the problem ???
Reply With Quote
  #9  
Old 6th February 2009, 13:36
gonzalezmfrank gonzalezmfrank is offline
Junior Member
 
Join Date: Feb 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

it doesnt work to me too...

my virtual_mailbox_base variable in main.cf is set to /home/vmail too and there are some domain and users there..
Reply With Quote
  #10  
Old 7th March 2009, 11:04
dedez dedez is offline
Junior Member
 
Join Date: Mar 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
 
Exclamation

I've the same problem, my daily report dosn't show ANY user!!

Any idea on what's wrong?
Reply With Quote
Reply

Bookmarks

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
Diagnostic-Code: X-Postfix; Host or domain name not found. Name service error Hellbound General 4 7th January 2007 11:50
Print Server & Quota Tuxfun HOWTO-Related Questions 12 19th December 2006 11:22
Problems with copy & paste dspuser Server Operation 3 23rd May 2006 17:21
Syntax error in Quota? st2xo Installation/Configuration 2 13th February 2006 11:30
another quota question... Ovidiu General 9 21st December 2005 01:08


All times are GMT +2. The time now is 00:02.


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