2015-07-12 22:54:35 +00:00
|
|
|
#!/bin/bash
|
2015-07-14 22:37:13 +00:00
|
|
|
|
2015-07-14 23:01:41 +00:00
|
|
|
if [ -f /mail_settings/myhostname ]; then
|
|
|
|
echo $(sed 's:/:\\/:g' /mail_settings/myhostname) > /etc/mailname
|
|
|
|
fi
|
|
|
|
|
2015-07-14 22:37:13 +00:00
|
|
|
readarray -t domains < /mail_settings/domains
|
|
|
|
domain_suffix=$(printf ", \"%s\"" "${domains[@]}")
|
|
|
|
domain_string="@local_domains_acl = ( \".$mydomain\" $domain_suffix );"
|
|
|
|
|
|
|
|
sed "/# DOCKERMAIL DOMAINS START/,/# DOCKERMAIL DOMAINS END/{//!d}" /etc/amavis/conf.d/50-user -i
|
|
|
|
sed "/# DOCKERMAIL DOMAINS START/a $domain_string/" /etc/amavis/conf.d/50-user -i
|