mirror of https://gitlab.crans.org/bde/nk20
limite mail sending to 10 per minute and purge fail mail log
This commit is contained in:
parent
21cbf2b21a
commit
0fbb19c5fd
|
@ -9,6 +9,7 @@ MAILTO=notekfet2020@lists.crans.org
|
|||
* * * * * root cd /var/www/note_kfet && env/bin/python manage.py send_mail -c 1 -v 0
|
||||
* * * * * root cd /var/www/note_kfet && env/bin/python manage.py retry_deferred -c 1 -v 0
|
||||
00 0 * * * root cd /var/www/note_kfet && env/bin/python manage.py purge_mail_log 7 -v 0
|
||||
00 0 * * * root cd /var/www/note_kfet && env/bin/python manage.py purge_mail_log -r failure 30 -v 0
|
||||
# Faire une sauvegarde de la base de données
|
||||
00 2 * * * root cd /var/www/note_kfet && apps/scripts/shell/backup_db
|
||||
# Vérifier la cohérence de la base et mailer en cas de problème
|
||||
|
|
|
@ -225,6 +225,7 @@ MEDIA_URL = '/media/'
|
|||
# Use mailer in production to place emails in a queue before sending them to avoid spam
|
||||
EMAIL_BACKEND = 'mailer.backend.DbBackend'
|
||||
MAILER_EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
||||
MAILER_EMAIL_MAX_BATCH = 10
|
||||
EMAIL_USE_SSL = os.getenv('EMAIL_USE_SSL', False)
|
||||
EMAIL_HOST = os.getenv('EMAIL_HOST', 'smtp.example.org')
|
||||
EMAIL_PORT = os.getenv('EMAIL_PORT', 25)
|
||||
|
|
Loading…
Reference in New Issue