diff options
-rwxr-xr-x | postfix/entrypoint.sh | 12 |
1 files changed, 12 insertions, 0 deletions
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/userconfig/passwd \ + | awk -F '@' '{printf "%s %s/%s/\n", $0, $2, $1}' >/etc/postfix/vmailbox + +# Generate Berkeley DB files +postmap /etc/postfix/vmailbox +postmap /etc/userconfig/aliases + +exec /usr/sbin/postfix start-fg |