On 7/26/19 2:52 AM, Aaryan Bhagat wrote:
> I am developing the processing of bounce messages as my GSoC project.  
> Currently the `Bounce Functions` are being developed in 
> [this](https://gitlab.com/mailman/mailman/merge_requests/538) pr on GitLab.  
> There is one `bool` attribute called 
> `bounce_you_are_disabled_warnings_interval` in the `Mailing List` model.  


It's actually defined as Column(Interval) in your MR which what it
should be.


> It means
>> The number of days between each disabled notification.
> 
> Implementing this has a problem
> - Say in the case of `process_bounces` function which processes the 
> `BounceEvents` function it is easy it just takes one by one the events from 
> the database and processes them.
> - In the case of `Send_Warnings` function if the same approach was followed, 
> meaning it would take one by one the `Address` instances, check tuples in the 
> `bounce_info` attribute ( 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 `Addresses` list is very long, then an `Address` instance 
> 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 `bounce_you_are_disabled_warnings_interval`.
> -  If the function is enumerating from the top then in order to take action 
> first it has to reach this `Address` instance but the interval is already 
> crossed. This can cause slow performance as the `warning mail` will be sent 
> way late than it actually should have been sent.
> - Also if I am implementing 2 functions `process_bounces` and `send_warnings` 
> what if both of them attempted at the same `Address` instance?
> - Basically `implementation on sending warning mails` and `implementation to 
> increase bounce_score` are 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.

-- 
Mark Sapiro <m...@msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan
_______________________________________________
Mailman-Developers mailing list -- mailman-developers@python.org
To unsubscribe send an email to mailman-developers-le...@python.org
https://mail.python.org/mailman3/lists/mailman-developers.python.org/
Mailman FAQ: https://wiki.list.org/x/AgA3

Security Policy: https://wiki.list.org/x/QIA9

Reply via email to