On 6/6/19 10:55 PM, sandeep kumar wrote:
I need to fetch the moderator email address of every list when an email is sent to list. I am facing some challenges here in getting the moderator email address. Can you please help where in the mailman code can I get the moderator email address when a mail is sent to the list.
The address LISTNAME-owner@LIST.DOMAIN will forward to all list owners and moderators.
If that won't work for you and you need actual individual addresses, the list has three attributes - owners, moderators and administrators. These are IRoster objects which are rosters of the owners, moderators and both respectively.
To get all the owner and moderator addresses for the list instantiated as mlist you could do something like
addresses =  for member in mlist.administrators.members: addresses.append(member.address.email)