Hi all,
we currently have a problem sending to an email list. The mailing list is an announcement list and is therefore moderated. The mail also arrives for moderation. However, when the mail is released, it is not delivered, but moved to the shunt queue. The error after an unshunt attempt in the log:
Apr 19 12:31:43 2022 (17967) Uncaught runner exception: 'NoneType' object has no attribute 'email'
Apr 19 12:31:43 2022 (17967) Traceback (most recent call last):
File "/opt/mailman/mailman-venv/lib64/python3.6/site-packages/mailman/core/runner.py", line 176, in _one_iteration
self._process_one_file(msg, msgdata)
File "/opt/mailman/mailman-venv/lib64/python3.6/site-packages/mailman/core/runner.py", line 269, in _process_one_file
keepqueued = self._dispose(mlist, msg, msgdata)
File "/opt/mailman/mailman-venv/lib64/python3.6/site-packages/mailman/runners/pipeline.py", line 37, in _dispose
process(mlist, msg, msgdata, pipeline)
File "/opt/mailman/mailman-venv/lib64/python3.6/site-packages/mailman/core/pipelines.py", line 50, in process
handler.process(mlist, msg, msgdata)
File "/opt/mailman/mailman-venv/lib64/python3.6/site-packages/mailman/handlers/member_recipients.py", line 84, in process
for member in mlist.regular_members.members
File "/opt/mailman/mailman-venv/lib64/python3.6/site-packages/mailman/handlers/member_recipients.py", line 85, in <genexpr>
if member.delivery_status == DeliveryStatus.enabled)
AttributeError: 'NoneType' object has no attribute 'email'
Apr 19 12:31:43 2022 (17967) SHUNTING: 1650364303.8361175+08bb48ae877019e8a4c9dff8024c1270782fceb3
Any hints how we can solve the problem here?
On 4/19/22 03:47, Stephan Krinetzki wrote:
Hi all,
we currently have a problem sending to an email list. The mailing list is an announcement list and is therefore moderated. The mail also arrives for moderation. However, when the mail is released, it is not delivered, but moved to the shunt queue. The error after an unshunt attempt in the log:
Apr 19 12:31:43 2022 (17967) Uncaught runner exception: 'NoneType' object has no attribute 'email' Apr 19 12:31:43 2022 (17967) Traceback (most recent call last): File "/opt/mailman/mailman-venv/lib64/python3.6/site-packages/mailman/core/runner.py", line 176, in _one_iteration self._process_one_file(msg, msgdata) File "/opt/mailman/mailman-venv/lib64/python3.6/site-packages/mailman/core/runner.py", line 269, in _process_one_file keepqueued = self._dispose(mlist, msg, msgdata) File "/opt/mailman/mailman-venv/lib64/python3.6/site-packages/mailman/runners/pipeline.py", line 37, in _dispose process(mlist, msg, msgdata, pipeline) File "/opt/mailman/mailman-venv/lib64/python3.6/site-packages/mailman/core/pipelines.py", line 50, in process handler.process(mlist, msg, msgdata) File "/opt/mailman/mailman-venv/lib64/python3.6/site-packages/mailman/handlers/member_recipients.py", line 84, in process for member in mlist.regular_members.members File "/opt/mailman/mailman-venv/lib64/python3.6/site-packages/mailman/handlers/member_recipients.py", line 85, in <genexpr> if member.delivery_status == DeliveryStatus.enabled) AttributeError: 'NoneType' object has no attribute 'email' Apr 19 12:31:43 2022 (17967) SHUNTING: 1650364303.8361175+08bb48ae877019e8a4c9dff8024c1270782fceb3
Any hints how we can solve the problem here?
One of the list's regular members has no associated address record. I don't know how this can happen.
You could find the member with mailman shell, e.g.
mailman shell -l list.example.com
Welcome to the GNU Mailman shell
Use commit() to commit changes.
Use abort() to discard changes since the last commit.
Exit with ctrl+D does an implicit commit() but exit() does not.
The variable 'm' is the list.example.com mailing list
>>> for mbr in m.regular_members.members:
... if mbr.address is None:
... mbr.subscriber
... mbr.user
... mbr.user.addresses
... mbr.user.preferred_address
...
You might be able to fix this with something like
>>> for mbr in m.regular_members.members:
... if mbr.address is None:
... mbr.address = mbr.user.preferred_address or
member.user.addresses[0]
...
>>> commit()
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mark Sapiro wrote:
One of the list's regular members has no associated address record. I don't know how this can happen.
That doesn't sound good. When something is unknown, that's never good.
You could find the member with mailman shell, e.g. mailman shell -l list.example.com Welcome to the GNU Mailman shell Use commit() to commit changes. Use abort() to discard changes since the last commit. Exit with ctrl+D does an implicit commit() but exit() does not. The variable 'm' is the list.example.com mailing list
for mbr in m.regular_members.members: ... if mbr.address is None: ... mbr.subscriber ... mbr.user ... mbr.user.addresses ... mbr.user.preferred_address ...
Yupp, this returns two entries (or better: User Objects?)
You might be able to fix this with something like
for mbr in m.regular_members.members: ... if mbr.address is None: ... mbr.address = mbr.user.preferred_address or member.user.addresses[0] ... commit()
This fix didn't worked. It returned a "Index out of bounds" exception. Instead, we have deleted the corresponding entry in the database. It should be possible to find it this way:
select * from member where list_id = 'list.lists.example.com' AND address_id IS NULL;
After deleting the row, the list works again.
On 4/20/22 02:00, Stephan Krinetzki wrote:
Mark Sapiro wrote:
You might be able to fix this with something like
for mbr in m.regular_members.members: ... if mbr.address is None: ... mbr.address = mbr.user.preferred_address or member.user.addresses[0] ... commit()
This fix didn't worked. It returned a "Index out of bounds" exception.
Apparently these Users have no associated Addresses at all. Do you have any idea how these Users got created/subscribed to the list?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mark Sapiro wrote:
On 4/20/22 02:00, Stephan Krinetzki wrote:
Mark Sapiro wrote: You might be able to fix this with something like for mbr in m.regular_members.members: ... if mbr.address is None: ... mbr.address = mbr.user.preferred_address or member.user.addresses[0] ... commit() This fix didn't worked. It returned a "Index out of bounds" exception. Apparently these Users have no associated Addresses at all. Do you have any idea how these Users got created/subscribed to the list?
Unfortunately not. We only see the result.
participants (2)
-
Mark Sapiro
-
Stephan Krinetzki