Public bug reported:
Not sure what caused this error that showed up in mailman.log:
Aug 16 10:54:50 2011 (31400) Uncaught runner exception: u'foo.example.com' Aug 16 10:54:50 2011 (31400) Traceback (most recent call last): File "/home/sgoss/mailman_clone/src/mailman/core/runner.py", line 138, in _one_iteration self._process_one_file(msg, msgdata) File "/home/sgoss/mailman_clone/src/mailman/core/runner.py", line 220, in _process_one_file keepqueued = self._dispose(mlist, msg, msgdata) File "/home/sgoss/mailman_clone/src/mailman/runners/virgin.py", line 37, in _dispose process(mlist, msg, msgdata, 'virgin') File "/home/sgoss/mailman_clone/src/mailman/core/pipelines.py", line 50, in process handler.process(mlist, msg, msgdata) File "/home/sgoss/mailman_clone/src/mailman/pipeline/cook_headers.py", line 360, in process process(mlist, msg, msgdata) File "/home/sgoss/mailman_clone/src/mailman/pipeline/cook_headers.py", line 202, in process listinfo = mlist.script_url('listinfo') File "/home/sgoss/mailman_clone/src/mailman/model/mailinglist.py", line 243, in script_url return urljoin(self.domain.base_url, target + '/' + self.fqdn_listname) File "/home/sgoss/mailman_clone/src/mailman/model/mailinglist.py", line 227, in domain return getUtility(IDomainManager)[self.mail_host] File "/home/sgoss/mailman_clone/src/mailman/model/domain.py", line 142, in __getitem__ raise KeyError(email_host) KeyError: u'foo.example.com'
** Affects: mailman Importance: Undecided Status: New
** Tags: mailman3
I am able to trigger this error by sending an email to a list from a nonmember, so the message gets put into held status. Then moderating the message with Action.accept. After that, the message does not get delivered, instead the above error appears in the log.
Regarding last comment, this error does not always appear, but moderator approved message never gets sent, so I think they might be unrelated.
In one sense script_url() is kind of bogus because now that the web ui is separate from the engine, the engine needs a better model for how to calculate its urls. This method is mostly a hold over from Mailman 2.
OTOH, its rather disturbing that you don't have a key in the Domain column of database for foo.example.com. Wait, did you possibly create foo.example.com, and then delete it before this message got put into the virgin queue?
** Changed in: mailman Status: New => Triaged
Ah, yep, it happens right at the end of the test suite (our internal tests, not MM3's) which cleans up everything, including the domain entry.
I think what happened, was that before the fix for https://bugs.launchpad.net/flufl.lock/+bug/827052 was made, I was looping through and rejecting all pending messages before removing the list and then the domain. Maybe since I was rejecting instead of discarding, it was generating a bounce message for the virgin queue right before deleting the domain entry. This isn't really a problem any more. Sorry if I got some details wrong, I don't fully understand the Mailman pipeline yet.
Yeah, I think this had to be caused by some unsupported external manipulation of the database. The base Runner class will refuse to process any message destined for a mailing list that does not exist, and every mailing list should be associated with an existing domain.
I'm going to mark this one incomplete, but if you find a reproducible test case to show the error, please re-open it.
** Changed in: mailman Status: Triaged => Incomplete
This bug has been moved to the new gitlab repo here: https://gitlab.com/mailman/mailman/issues/53