exherbo-dockermail/amavis/boot

13 lines
476 B
Plaintext
Raw Normal View History

#!/bin/bash
2015-07-14 22:37:13 +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