Skip to content

Commit

Permalink
Fix: Inactive comm members + global archive addr
Browse files Browse the repository at this point in the history
Fixed an issue where the server status page incorrectly mentioned a committee alias was outdated when an inactive member was part of that committee.
Actual behaviour is unchanged; inactive members were still added to the committee's alias (as intended).

Fixed an issue where a crash would occur when multiple global committee archive addresses were set up in mailcowconfig.json
  • Loading branch information
EricTRL committed Aug 19, 2023
1 parent 5411925 commit 62b2933
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mailcow_integration/admin_status/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ def _init_global_committee_alias_list(self, aliases: List[MailcowAlias], mailbox
if not self.mailcow_manager.is_address_internal(address) and status != AliasStatus.RESERVED:
exp_routes = [[address, "Alias not located in Rspamd settings map."]]

subscribers = self._get_subscriberinfos_by_status(status, subscribers, alias, alias_type=AliasCategory.GLOBAL_COMMITTEE)
info = AliasInfos(status.name, subscribers, address, "gc_" + alias_address_to_id(address), address,
info_subscribers = self._get_subscriberinfos_by_status(status, subscribers, alias, alias_type=AliasCategory.GLOBAL_COMMITTEE)
info = AliasInfos(status.name, info_subscribers, address, "gc_" + alias_address_to_id(address), address,
"Allows mailing all committees at the same time.",
alias or mailbox, internal=True, exposure_routes=exp_routes, allow_opt_out=None, archive_addresses=settings.COMMITTEE_CONFIGS['global_archive_addresses']
)
Expand All @@ -203,7 +203,7 @@ def _init_committee_alias_list(self, aliases: List[MailcowAlias], mailboxes: Lis

for assoc_group in self.mailcow_manager.get_active_committees():
address = assoc_group.contact_email
subscribers = assoc_group.members.filter_active().order_by('email')
subscribers = assoc_group.members.order_by('email')

status, alias, mailbox = self._get_alias_status(address, subscribers, AliasCategory.COMMITTEE,
aliases, mailboxes, self.mailcow_manager.ALIAS_COMMITTEE_PUBLIC_COMMENT)
Expand Down

0 comments on commit 62b2933

Please sign in to comment.