summaryrefslogtreecommitdiffstats
path: root/postfix/entrypoint.sh
diff options
context:
space:
mode:
Diffstat (limited to 'postfix/entrypoint.sh')
-rwxr-xr-xpostfix/entrypoint.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/postfix/entrypoint.sh b/postfix/entrypoint.sh
index 18805eb..46c06ab 100755
--- a/postfix/entrypoint.sh
+++ b/postfix/entrypoint.sh
@@ -1,11 +1,17 @@
#!/bin/sh
-# Generate virtual mailbox mappings from user password file
-# "user@domain domain/user/"
+# Generate virtual mappings from user password file
+# Incoming mail: "user@domain domain/user/" >vmailbox
+# (The trailing slash indicates the directory is a maildir.)
sed 's/:.*$//g' </etc/userconfig/passwd \
| awk -F '@' '{printf "%s %s/%s/\n", $0, $2, $1}' >/etc/postfix/vmailbox
+# Outgoing mail: "user@domain user@domain" >vaddress
+sed 's/:.*$//g' </etc/userconfig/passwd \
+ | awk '{printf "%s %s\n", $0, $0}' >/etc/postfix/vaddress
+
# Generate Berkeley DB files
+postmap /etc/postfix/vaddress
postmap /etc/postfix/vmailbox
postmap /etc/userconfig/aliases