The mailman reopen command or SIGHUP to the master doesn't reopen third party logs.

Mailman's LMTP runner uses aiosmtpd to implement its LMTP handler. aiosmtpd writes several log messages to mail.log which mailman/core/logging.py assigns to smtp.log. A mailman reopen command sends a SIGHUP to the master watcher. When the master watcher receives a SIGHUP, either from mailman reopen or directly, it reopens its logs and sends a SIGHUP to all the runners and they in turn reopen all their logs. However this process does not tell aiosmtpd to reopen it's logs.

Thus, when logs are rotated and a mailman reopen command issued, the runners that write smtp.log directly will write to the new generation, but aiosmtpd continues to write to the older log until such time as mailman core is restarted. I'm not sure what will happen if mailman core is not restarted before the log aiosmtpd is writing to is rotated out of existence, but that could be an issue too.

This also applies to other logs such as sqlalchemy and alembic and may apply to logging from the gunicorn workers used by the REST API, although the latter is for a different reason.

Edited by Mark Sapiro