Skip to content

Add postfix-runtime volume for queue_directory/data_directory - #57

Merged
springcomp merged 1 commit into
springcomp:mainfrom
chrisblech:postfix-data-volume
Aug 29, 2026
Merged

Add postfix-runtime volume for queue_directory/data_directory#57
springcomp merged 1 commit into
springcomp:mainfrom
chrisblech:postfix-data-volume

Conversation

@chrisblech

Copy link
Copy Markdown
Contributor

Postfix's queue_directory (/var/spool/postfix) and data_directory (/var/lib/postfix) previously had no persistent storage, so the mail queue and TLS session caches were lost on every container recreate. Point both at a single postfix-runtime named volume instead, and have the entrypoint create the directory tree and fix ownership on every start via "postfix check" + "postfix set-permissions" (idempotent, so it's safe on both first run and subsequent restarts).

Should be merged before integrating #55 , so states of all clients (i.e. temp-whitelists) for postscreen survive container restarts, rebuilds, crashes.

Postfix's queue_directory (/var/spool/postfix) and data_directory
(/var/lib/postfix) previously had no persistent storage, so the mail
queue and TLS session caches were lost on every container recreate.
Point both at a single postfix-runtime named volume instead, and have
the entrypoint create the directory tree and fix ownership on every
start via "postfix check" + "postfix set-permissions" (idempotent, so
it's safe on both first run and subsequent restarts).
@springcomp

Copy link
Copy Markdown
Owner

@chrisblech looks good.

What’s the story for existing users ?
is that as simple as a down / up and we’re good to go ?

@chrisblech chrisblech mentioned this pull request Aug 28, 2026
@chrisblech

Copy link
Copy Markdown
Contributor Author

@springcomp yes: this only adds persistence of spool/cache dirs. Entrypoint script takes care of creating these dirs if not existent and setting the right permissions.
There is no need for migration or other changes for existing users as far as I can see.

@springcomp
springcomp merged commit 883e7fe into springcomp:main Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants