HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   HOWTO-Related Questions (http://www.howtoforge.com/forums/forumdisplay.php?f=2)
-   -   Daily Quota report empty (http://www.howtoforge.com/forums/showthread.php?t=10344)

dbau 4th February 2007 20:00

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

falko 5th February 2007 13:40

Did you save the quota_notify script with Unix linebreaks?
Also make sure you produced no syntax error when you modified the script.

dbau 6th February 2007 03:14

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

falko 7th February 2007 18:13

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?

dbau 9th February 2007 03:30

No errors...

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

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

Daniel

falko 10th February 2007 20:08

To be honest I don't know what's wrong... :confused:

rafota 14th March 2007 19:27

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    |
----------------------------------------------


justiceiro_df 27th September 2007 05:05

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 ???

gonzalezmfrank 6th February 2009 13:36

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..

dedez 7th March 2009 11:04

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

Any idea on what's wrong?


All times are GMT +2. The time now is 20:08.

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