On 7/26/19 2:52 AM, Aaryan Bhagat wrote:
I am developing the processing of bounce messages as my GSoC project.
Bounce Functionsare being developed in this pr on GitLab.
There is one
It's actually defined as Column(Interval) in your MR which what it should be.
The number of days between each disabled notification.
Implementing this has a problem
- Say in the case of
process_bouncesfunction which processes the
BounceEventsfunction it is easy it just takes one by one the events from the database and processes them.
- In the case of
Send_Warningsfunction if the same approach was followed, meaning it would take one by one the
Addressinstances, check tuples in the
bounce_infoattribute ( see the pr for this ) and see whether to send a warning mail or not to can be a slow method.
- Let's suppose the
Addresseslist is very long, then an
Addressinstance in the very bottom of the list whose subscription has been disabled and some warning emails send, now waits to receive another mail as the interval is more than
- If the function is enumerating from the top then in order to take action first it has to reach this
Addressinstance but the interval is already crossed. This can cause slow performance as the
warning mailwill be sent way late than it actually should have been sent.
- Also if I am implementing 2 functions
send_warningswhat if both of them attempted at the same
implementation on sending warning mailsand
implementation to increase bounce_scoreare separate things and they can cause problems if they processed the same instance.
Pointers on above will be helpful. Am I missing something above?
You may consider doing this as it's done in MM 2.1. There, once a list's delivery is disabled by bounce for an address and the first notice sent, Mailman's processing has nothing further to do with it. There is a daily cron which is responsible for sending notices and ultimately removing disabled users.
A partially migrated version of this is at https://gitlab.com/mailman/mailman/blob/master/port_me/disabled.py
You might consider implementing this as a 'mailman' subcommand to be run daily by cron to do this task.