Virtual User/Postfix/Courier/Mysql Etc....Quota Issues

Discussion in 'HOWTO-Related Questions' started by volksman, Jan 8, 2008.

  1. volksman

    volksman New Member

    I run the quota_notification script and it sends me a blank e-mail. After some running through the script it seems to die when looking for the maildirsize file. When I look by hand the files aren't in any of my user dirs.

    Did I screw something up when applying the quota patch to postfix? How do I get those files to show up?
     
  2. volksman

    volksman New Member

    Anyone else having issues with this in Gutsy?

    I just downloaded and recompiled postfix to make sure there were no errors and I don't see any:

    patch -p1 < ../postfix-2.4.5-vda-ng.patch
    patching file README_FILES/VDA_README
    patching file src/global/mail_params.h
    patching file src/util/file_limit.c
    patching file src/virtual/mailbox.c
    patching file src/virtual/maildir.c
    patching file src/virtual/virtual.c
    patching file src/virtual/virtual.h

    No errors after dpkg-buildpackage

    Installed packages and restarted postfix sent an e-mail to a user but there is still no maildirsize file in the users Maildir....

    Any suggestions?
     
  3. shark_tico

    shark_tico New Member

    same issue

    I have the same issue

    Any suggestion ?
     
  4. falko

    falko Super Moderator ISPConfig Developer

    Did you modify the quota_notification as shown in the tutorial? There are two lines in the script where you must add a % sign.
     
  5. volksman

    volksman New Member

    yep. its not really a problem with the reporting script.

    It's a problem with either postfix or courier not creating or maintaining the 'maildirsize' file in the actual mail store directory.
     
  6. shark_tico

    shark_tico New Member

    maildirsize file doesn't exist

    Like volksman the maildirsize file doesn't exist.
     
  7. volksman

    volksman New Member

    I just setup a test account with a 1000 byte quota and it bounced an e-mail I sent to the account saying it was over quota. Postfix does enforce the quota. So it must be using something other than using the maildirsize file to enforce it.

    Still digging but thought I would put that out there.....
     
  8. volksman

    volksman New Member

    I've created a quick fix to this problem for now. It's really just a hack and probably wouldn't be all that great if you have a LOT of users but it works:

    First you will need to install the Mysql module for Perl. This can be done by running the following in a shell:

    Code:
    perl -MCPAN -e shell
    If you've never used the cpan shell before you will need to go through the setup. I can't really help with that (mostly defaults but you are on your own).

    Once you get to a prompt type the following:

    Code:
    cpan> force install Bundle::Mysql
    That should force it in (it will die if it can't connect as root to your DB).

    Then you need to put the script somewhere, so download it and get it on your server:

    Code:
    mv maildirfix /usr/local/sbin/
    chown +x /usr/local/sbin/maildirfix
    Change the DB info:

    Code:
    vi /usr/local/sbin/maildirfix
    and edit the lines as approprate:


    Now add it to your crontab:

    Code:
    crontab -e
    This will run it one hour before the quota_notify script is triggered if you followed the howto.
     

    Attached Files:

  9. thecaoticone

    thecaoticone New Member

    Found the problem

    Check your postfix main.cf file and see if this helps.

    http://www.howtoforge.com/forums/showthread.php?t=19765

    From the postfix-2.4.5-vda-ng.patch.gz sample config.

    +# Enable Maildir++ extensions for faster maildir quota calculation
    +# (maildirsize file and ",S=<size>" filename extension)
    +# Needs Maildir++ compatible IMAP servers, like Courier-IMAP
    +virtual_maildir_extended = yes
     
  10. Obiwan1965

    Obiwan1965 New Member

    maildirfix for DBI

    This maildirfix script to fix the maildirsize file is exactly what I need, but the problem is I am running on Ubuntu 10.04. I am not familiar in perl so maybe somebody can help me.

    Does anybody have a version with the usage of DBI in perl (use DBI;), which appears to be use instead of use Mysql;

    Help or an adjusted version would be great!
     

Share This Page