Daily Quota report empty

Discussion in 'HOWTO-Related Questions' started by dbau, Feb 4, 2007.

  1. dbau

    dbau New Member

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

    falko Super Moderator ISPConfig Developer

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

    dbau New Member

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

    falko Super Moderator ISPConfig Developer

    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?
     
  5. dbau

    dbau New Member

    No errors...

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

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

    Daniel
     
  6. falko

    falko Super Moderator ISPConfig Developer

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

    rafota New Member

    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   |               [email protected]    |
    ----------------------------------------------
     
  8. justiceiro_df

    justiceiro_df New Member


    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 ???
     
  9. gonzalezmfrank

    gonzalezmfrank New Member

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

    dedez New Member

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

    Any idea on what's wrong?
     
  11. falko

    falko Super Moderator ISPConfig Developer

    Do you get any errors when you run
    Code:
    /usr/local/sbin/quota_notify
    manually?
     
  12. dedez

    dedez New Member

    ..i've got NO errors running the script..it simply generate the report, without any users listed..
    i've take a look inside the script and it seams it look for
    /home/vmail/domain.com/user/maildirsize
    but in my users dir i've no "maildirsize" file..
     
  13. dedez

    dedez New Member

    gotcha!
    in your tutorial you made a little mistake..
    you write
    Code:
    postconf -e 'virtual_mailbox_extended = yes'
    
    but this is wrong..it should be
    Code:
    postconf -e 'virtual_maildir_extended = yes'
    
    hope this help
     
  14. falko

    falko Super Moderator ISPConfig Developer

    Thanks! I've had this in my recent Fedora 10 guide already, but I've now corrected it in my other guides as well. :)
     

Share This Page