On 12/8/21 6:05 PM, Philippe B wrote:
Update: After disabling the footer on a few lists (as described here a week ago), we started seeing "Cache content lost" in most (but not all) messages from those lists.
In some cases, that phrase is an attachment to the "real" body of the message. In others, it's the opposite (which is more problematic for responding). That seems to depend on whether the poster sent in plain text.
The difference between inline and attachment has to do with how footers are added. They are only added inline if the message after content filtering is a simple text/plain message.
One puzzling aspect is that it doesn't happen consistently. One hourly automated message will have it; but exactly the same message one hour later won't have it; but will have it again 3 hours later for example.
Is that a known problem, or would it be possible to troubleshoot? Thanks.
The issue may be a bug or a race condition. What is going on is the 'empty' footer you created in Postorius is retrieved from Postorius by a URL. In order to reduce the number of http transfers to retrieve such templates, they are cached in the local file system. Now, when we want a template that is accessed via a non-mailman: URI, we call the cache managers get() method at https://gitlab.com/mailman/mailman/-/blob/master/src/mailman/model/cache.py#... to get it. This should return either None if there's no cached file or the contents of the file, but if there is an entry but no corresponding file, it returns 'Cache content lost'.
This could occur if some asynchronous process expunged the entry between getting the entry and getting the file. A process that could do that is the task runner that evicts expired cache entries.
Look in your mailman.log. There will be ACCEPT: <message_id>
entries
for each accepted message and there will be hourly Task runner evicted expired cache entries
entries. Do the ACCEPTs for the affected messages
occur at the same time as the evictions?
One way to avoid this is to not use Postorius to set the template but
rather, create an empty
templates/lists/<list_id>/en/list:member:regular:footer.txt
in
mailman's var/ directory for each such list and delete the Postorius
templates. Of course, this is just a work around and not a solution to
the issue. A proper fix is probably to implement a lock on the get(),
evict(), evict_expired() and clear() methods so they can't execute
concurrently.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan