summaryrefslogtreecommitdiffstats
path: root/postfix/entrypoint.sh
blob: 18805eb9d12b71a9b90f22b3805ecbf7c88e1ba6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
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