blob: 46c06ab63dda42f4aa8eeea3e86fa1c709ce15ee (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#!/bin/sh
# 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
exec /usr/sbin/postfix start-fg
|