New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Daily Message sending limit is not reset every day #2043
Comments
@AmazingBeu How do you start the policy daemon? |
Im using supervisord as you recommend in the doc:
And I tried in CLI with the following command:
And I never had any logs, even with the debug and verbosity options. But the port 9999 is listening and postfix is using it without errors in logs. |
@AmazingBeu Logs should be contained in the /var/log/mail.log file, if you configured the logging part in django. Can you check if you see a 'modoboa.policyd' entry in the LOGGING setting? |
@tonioo No, I only have:
|
Looks like I forgot to mention this in the documentation... You can get an example here: https://github.com/modoboa/modoboa/blob/master/modoboa/core/commands/templates/settings.py.tpl#L319. |
@tonioo OK I changed all my LOGGING section for the ones you gave me, I restarted supervisor and uwsgi but i have no more logs. |
You mean in the mail.log file? |
Yes, nothing more than before (postfix, dovecot and others) |
@AmazingBeu If logging is configured correctly, you should see a startup message at least. (see https://github.com/modoboa/modoboa/blob/master/modoboa/policyd/management/commands/policy_daemon.py#L50) |
Nothing. This is my config and other information: settings.php
$ pip list
Machine informations
|
@AmazingBeu Config looks fine. Perhaps an issue with syslog configuration? |
@tonioo Hmm, I don't know, all the other logs seems work perfectly. There is no solution to set logs to stdout ? |
@AmazingBeu you can play with LOGGING settings in order to configure a console output. It shoud be documented in Django's doc. |
@tonioo The problem seems to be solved and I don't know why ahah... It's possible that the absence of LOGGING causes policyd doesn't reset the counters? |
@AmazingBeu I don't think so... |
@AmazingBeu Is it still working? |
@tonioo I'm doing some tests, but each test takes 24h... 😁 |
@AmazingBeu Indeed ;) |
@AmazingBeu Any news? |
It's look like works only one time, at the first UTC midnight after restarted Supervisor 🤔 |
@tonioo Ok that's it. PolicyD only resets the counters once, but why? |
@AmazingBeu I guess it has something to do with rescheduling (see https://github.com/modoboa/modoboa/blob/master/modoboa/policyd/core.py#L277). What python version do you use? |
My virtualenv is based on Python 3.7.3 . You have all the information here, except for Modoboa which I updated to 1.17 yesterday: |
@AmazingBeu I also use python 3.7 on my own server and I see in logs that the reset_counters coroutine is called every night... I enabled limits on my own account and will check if the counter is reset tomorrow. |
Sorry boys @AmazingBeu and @tonioo but ... Thanks Jan |
@kalimero67 There is no solution at the moment since I can't reproduce the issue on my own server... |
Then please help with these fatal questions:
root@mail:/etc/cron.d# nmap localhost sudo -u modoboa /srv/modoboa/env/bin/python /srv/modoboa/instance/manage.py p olicy_daemon --debug -v3 --host 127.0.0.1 |
FYI, I have the problem with a new installation (Debian 10 and MySQL) |
If you do NOT find another solution, run (by cron) daily this script: File 'redis.sql': |
@AmazingBeu I finally reproduced this issue on my own server! I think the way I planify this periodic task is wrong but I don't know what I could use to replace it. A new cron task is the simplest fix but it is one more task... Otherwise I could introduce a asynchronous scheduler like celery or rq to the default Modoboa setup but it creates one new requirement... |
Personally, I would prefer a cron job because it is much simpler (I love the KISS principle 😁) |
Hi, same error here. The emails work like a charm except for the daily limit. |
Same problem And the most important :) : Merci pour tout ton travail sur Modoboa @tonioo |
I think this issue should be fixed with 2.0. There was a sync <> async issue in the process responsible for resetting counters. |
On my Modoboa server, the policyd upload limit is not reset every day.
So, my sending limit is lowered each time I send a mail, and never goes back up.
The text was updated successfully, but these errors were encountered: