2018-11-20 17:13:09 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2018-12-07 16:00:01 +00:00
|
|
|
echo "myorigin = ${MYHOSTNAME}" >> /etc/postfix/main.cf
|
|
|
|
echo "myhostname = ${MYHOSTNAME}" >> /etc/postfix/main.cf
|
|
|
|
echo "smtpd_tls_key_file = /certs/${MYHOSTNAME}.key" >> /etc/postfix/main.cf
|
|
|
|
echo "smtpd_tls_cert_file = /certs/${MYHOSTNAME}.crt" >> /etc/postfix/main.cf
|
2018-11-20 17:13:09 +00:00
|
|
|
|
2018-12-07 16:00:01 +00:00
|
|
|
echo "user = ${DATABASE_USER}
|
|
|
|
password = ${DATABASE_PASSWORD}
|
|
|
|
hosts = db
|
|
|
|
dbname = ${DATABASE_NAME}
|
|
|
|
table = alias
|
|
|
|
select_field = goto
|
|
|
|
where_field = address" > /etc/postfix/virtual_alias_maps.cf;
|
2018-11-20 17:13:09 +00:00
|
|
|
|
2018-12-07 16:00:01 +00:00
|
|
|
echo "user = ${DATABASE_USER}
|
|
|
|
password = ${DATABASE_PASSWORD}
|
|
|
|
hosts = db
|
|
|
|
dbname = ${DATABASE_NAME}
|
|
|
|
table = domain
|
|
|
|
select_field = domain
|
|
|
|
where_field = domain" > /etc/postfix/virtual_mailbox_domains.cf;
|
2018-11-20 17:13:09 +00:00
|
|
|
|
2018-12-07 16:00:01 +00:00
|
|
|
echo "user = ${DATABASE_USER}
|
|
|
|
password = ${DATABASE_PASSWORD}
|
|
|
|
hosts = db
|
|
|
|
dbname = ${DATABASE_NAME}
|
|
|
|
table = mailbox
|
|
|
|
select_field = maildir
|
|
|
|
where_field = username" > /etc/postfix/virtual_mailbox_maps.cf;
|
2018-11-20 17:13:09 +00:00
|
|
|
|
|
|
|
postfix start-fg
|