[Mailman-Users] new users added to custom MemberAdaptor don't get emails

Mark Sapiro mark at msapiro.net
Sat May 3 18:48:42 CEST 2014

On 05/02/2014 08:07 AM, Viktor Dick wrote:
> Hi folks,
> I have a setup where lists are not open to be joined by anyone but are
> managed by an LDAP database. The database is queried once an hour and
> the members of each list are written to a file which is then read in
> whenever anything is posted to a list.
> My problem is that newly added members seem not to be recognized until I
> reboot the server. The strange part is that executing
> /usr/lib/mailman/bin/list_members gives the correct entries including
> any newly added members while no actual mails are sent to the new
> members (they don't receive the mails and there are no entries in
> /var/log/mail.log) until I reboot the server.

When you run list_members, it runs as a new, separate process so it gets
the current version of the members from a new instance of the MemberAdaptor.

However, Mailman's qrunner processes are persistent and they don't
'reload' unless Mailman is restarted. Apparently, once your
MemberAdaptor thinks it has the membership list, it doesn't try to
update it.

Note that rebooting is overkill. Just restarting Mailman should suffice.

I can't say more about what to do without actually seeing your
MemberAdaptor, however you might look at
<https://bugs.launchpad.net/mailman/+bug/558106> for an alternative.

> I am attaching the files
> /usr/lib/mailman/Mailman/FileMemberships.py and
> /var/lib/mailman/lists/testlist/extend.py, which should contain all the
> relevant information.

The list's content filtering removes non text/plain attachments. They
will come through if you ensure they have a MIME Content-Type: of
text/plain. Maybe naming them FileMemberships.py.txt and extend.py.txt
will convince your mail client to do that.

Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

More information about the Mailman-Users mailing list