From 26dab860bd733e4f110fc837e1f3d8c682248502 Mon Sep 17 00:00:00 2001 From: Malfurious Date: Sat, 8 Jun 2024 14:49:26 -0400 Subject: postfix: Add service entrypoint script This is used to generate database files used by postfix daemons. In theory, this could also be performed at build-time by the Dockerfile. However, I intend to create only a single image that each service separately spawns from, since there will be several commonalities between them. Moving these postfix-specific tasks to an entrypoint script keeps the common Dockerfile more managable. Signed-off-by: Malfurious --- postfix/entrypoint.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 postfix/entrypoint.sh (limited to 'postfix/entrypoint.sh') diff --git a/postfix/entrypoint.sh b/postfix/entrypoint.sh new file mode 100755 index 0000000..18805eb --- /dev/null +++ b/postfix/entrypoint.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +# Generate virtual mailbox mappings from user password file +# "user@domain domain/user/" +sed 's/:.*$//g' /etc/postfix/vmailbox + +# Generate Berkeley DB files +postmap /etc/postfix/vmailbox +postmap /etc/userconfig/aliases + +exec /usr/sbin/postfix start-fg -- cgit v1.2.3