Quota warnings to client dont work

Discussion in 'ISPConfig 3 Priority Support' started by SupuS, May 1, 2014.

  1. SupuS

    SupuS Member HowtoForge Supporter

    Hello,

    I don't know when exactly quota warnings to client stopped to work but it seems it stopped work after upgrade to latest ISPConfig version few days ago. Warnings to administrator email work well but there are no warnings sent to client contact mail address.

    We have multiserver setup so I tried to find records in mail.log on ISPConfig master server and on web/mail servers too. I can find records for administrator email only but no records for customers mail addresses.

    Thank you for any advice.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    About which quota are you talking? Email mailbox quota?
     
  3. SupuS

    SupuS Member HowtoForge Supporter

    Hi till,

    I am talking about both of them. There are no warnings about mailbox quota and webhosting quota too.
     
  4. SupuS

    SupuS Member HowtoForge Supporter

    Can somebody tell me how can I debug this mail function?

    Are quota messages sent to customer in the same time as for administrator?
    Few minutes ago I got messages to my admin mail again and I checked mailboxes of affected clients and again no message for them.

    From which server are messages sent in multiserver setup? We have separated web server, mail server and ispconfig master server.

    Any idea welcome
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    The quota warnings are sent by the cron_daily.php script which starts at 0:30 each day.

    Yes.

    Quota notifications are sent on the master server. A quota warning message is sent when the mail quota exceeds 90%. The message is sent once, the mesage conter gets reset only when quota is below 90% again.
     
  6. SupuS

    SupuS Member HowtoForge Supporter

    Thank you for response. After some investigation I found the problem. I added these lines:

    Code:
    print_r($web_config);
    print_r($recipients);
    directly before

    Code:
    send_notification_email('web_quota_ok_notification', $placeholders, $recipients);
    in section "send website quota warnings by email" of /usr/local/ispconfig/server/cron_daily.php file. When I execute it manually by:

    Code:
    /usr/bin/php /usr/local/ispconfig/server/cron_daily.php
    I get content of variables $web_config and $recipients. Here are the content:

    Code:
    Array
    (
        [server_type] => apache
        [website_basedir] => /var/www
        ...
        ...
        [overtraffic_notify_admin] => y
        [overtraffic_notify_client] => y
        ...
        ...
        [overquota_notify_admin] => y
        [overquota_notify_client] => n
        [overquota_notify_freq] => 7
        [overquota_notify_onok] => n
        ...
        ...
    )
    Code:
    Array
    (
        [0] => my_admin@mail.com
    )
    As you can see the problem is in overquota_notify_client variable which is set to "n" so message to client is not sent. But when I check config in database there are these settings for webserver:

    Code:
    [web]
    server_type=apache
    website_basedir=/var/www
    ...
    ...
    overtraffic_notify_admin=y
    overtraffic_notify_client=y
    overquota_notify_admin=y
    overquota_notify_client=y
    overquota_notify_freq=7
    overquota_notify_onok=y
    ...
    ...
    and of course when I check settings in ISPConfig server configuration there checked all checkboxes related with quota messages on server where the website reside. Only one server where these checkboxes are not checked was master server because there are no client websites. When I set quota messages on master server the warning messages to clients work again for other servers too.

    So I think there is bug because $web_config variable contains wrong informations.
     

Share This Page