Обсуждение: pglister: pgarchives does not synchronize subscribers with email delivery disabled (proposed patch)

Поиск
Список
Период
Сортировка

pglister: pgarchives does not synchronize subscribers with email delivery disabled (proposed patch)

От
Célestin Matte
Дата:
The pglister_sync script is supposed to synchronize subscribers from pglister to pgarchives, so they can access
archives.
 From what I understand of its semantics, the "nomail" field (labeled "Disable mail delivery") is used to remain
subscribed,to be able to access archives, without receiving emails. 
However, due to the way the API works, this is not the case. pglister_sync.py makes a call to the API, which get
subscribersfrom the mailinglist_subscribers SQL view. This view is built in the 0027_merge_migrations.py migrations and
excludesusers with nomail. 
I propose a patch with a migration to change this SQL view to include nomail users (copying previous definition,
without"AND NOT nomail"). 
Note that this changes results of the API, which might have consequences if other scripts use it (I haven't found any
withsome grepping). 
--
Célestin Matte

Вложения

Re: pglister: pgarchives does not synchronize subscribers with email delivery disabled (proposed patch)

От
Magnus Hagander
Дата:


On Mon, 22 Sept 2025 at 20:18, Célestin Matte <contact@cmatte.me> wrote:
The pglister_sync script is supposed to synchronize subscribers from pglister to pgarchives, so they can access archives.
 From what I understand of its semantics, the "nomail" field (labeled "Disable mail delivery") is used to remain subscribed, to be able to access archives, without receiving emails.
However, due to the way the API works, this is not the case. pglister_sync.py makes a call to the API, which get subscribers from the mailinglist_subscribers SQL view. This view is built in the 0027_merge_migrations.py migrations and excludes users with nomail.
I propose a patch with a migration to change this SQL view to include nomail users (copying previous definition, without "AND NOT nomail").
Note that this changes results of the API, which might have consequences if other scripts use it (I haven't found any with some grepping).

Hi!

mailinglist_subscribers is used for actual mail delivery as well, isn't it? If you just change the view, it will change all deliveries and basically the nomail switch to not work at all?

While you're on the right track to include them, don't we also need to include the nomail column as a column in the view and then filter on that when sending email?

//Magnus

Re: pglister: pgarchives does not synchronize subscribers with email delivery disabled (proposed patch)

От
Célestin Matte
Дата:
> mailinglist_subscribers is used for actual mail delivery as well, isn't it? If you just change the view, it will
changeall deliveries and basically the nomail switch to not work at all?
 
> 
> While you're on the right track to include them, don't we also need to include the nomail column as a column in the
viewand then filter on that when sending email?
 
Correct. I added nomail in the mailinglist_subscribers view, then made just it was filtered upon in mailhandler.py.
Seriesof patches attached
 

Thanks for the review!
-- 
Célestin Matte
Вложения