Conversation
docker restart keeps /run, so Amavis's leftover pid can now belong to Dovecot and Net::Server abort-loops instead of listening on 10026. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docker restart,openship-mailkeeps leftover Amavis pid/lock/socket files in/var/run/amavis.Pid_file already exists for running process) when that PID now belongs to another daemon (usually Dovecot).127.0.0.1:10026even though Health still shows Amavis as running.Changes
apps/email/docker/entrypoint.sh: Unlink stale Amavis runtime files and recreate/var/run/amavisbefore supervisord starts. This entrypoint is the first process in a fresh pid namespace, so those files cannot refer to a living Amavis.apps/email/docker/supervisord.conf: Note why the entrypoint does this, next to the Amavis program.This matches the existing ClamAV
/runhandling (issue #565): Debian's tmpfiles.d rule does not run under supervisord, anddocker restartis not the same asdocker recreate.Test plan
docker restart openship-mailshould leave Amavis listening on127.0.0.1:10024and127.0.0.1:10026supervisorctl status amavisshould beRUNNING, not crash-looping on the leftover pidpostqueue -f) once Amavis is upconnect to 127.0.0.1:10026: Connection refusedafter restartVerified on a live
ghcr.io/oblien/openship-mail:0.7.2box: leftover pid67was Dovecot after restart; removing the pid file and restarting Amavis unstuck 6 deferred messages through SES.Made with Cursor