mirror of
https://git.myvelabs.com/docker/myvemail.git
synced 2025-12-18 01:36:19 +00:00
Fix duplicate entries on docker compose reset
This commit is contained in:
parent
fef88a1d7f
commit
ad41061774
3 changed files with 8 additions and 9 deletions
|
|
@ -16,8 +16,8 @@ ADD run/docker-entrypoint /docker-entrypoint/
|
||||||
ADD run/installer.sh /tmp/
|
ADD run/installer.sh /tmp/
|
||||||
|
|
||||||
# Update Ubuntu Software repository and install requisites
|
# Update Ubuntu Software repository and install requisites
|
||||||
RUN printf '%s\n' 'https://dl-cdn.alpinelinux.org/alpine/edge/main/' \
|
RUN printf '%s\n' 'https://dl-cdn.alpinelinux.org/alpine/latest-stable/main/' \
|
||||||
'https://dl-cdn.alpinelinux.org/alpine/edge/community/' >/etc/apk/repositories \
|
'https://dl-cdn.alpinelinux.org/alpine/latest-stable/community/' >/etc/apk/repositories \
|
||||||
# Pre-create vmail user
|
# Pre-create vmail user
|
||||||
&& addgroup -g 600 vmail \
|
&& addgroup -g 600 vmail \
|
||||||
&& adduser -S -D -h /var/vmail -u 600 -G vmail vmail \
|
&& adduser -S -D -h /var/vmail -u 600 -G vmail vmail \
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,11 @@ mkdir /var/spool/postfix/etc
|
||||||
cp /etc/resolv.conf /var/spool/postfix/etc/resolv.conf
|
cp /etc/resolv.conf /var/spool/postfix/etc/resolv.conf
|
||||||
|
|
||||||
# Whitelist localhost
|
# Whitelist localhost
|
||||||
sed -i "s/{{LOCAL_IPADDRESS}}/$(wget -q4O- ipv4.icanhazip.com)/" /etc/postfix/postscreen_access.cidr
|
tee /etc/postfix/postscreen_access.cidr >/dev/null <<- postscreen_access.cidr
|
||||||
|
# Permit my own IP addresses
|
||||||
|
$(wget -q4O- ipv4.icanhazip.com)/32 permit
|
||||||
|
|
||||||
|
postscreen_access.cidr
|
||||||
|
|
||||||
# Configure backup mail servers
|
# Configure backup mail servers
|
||||||
if [ ${MYVEMAIL_BACKUPMX} ]
|
if [ ${MYVEMAIL_BACKUPMX} ]
|
||||||
|
|
@ -29,6 +33,7 @@ fi
|
||||||
# Whitelist
|
# Whitelist
|
||||||
addmx=(${MYVEMAIL_DOMAIN})
|
addmx=(${MYVEMAIL_DOMAIN})
|
||||||
addmx+=(${MYVEMAIL_ADDMX//,/ })
|
addmx+=(${MYVEMAIL_ADDMX//,/ })
|
||||||
|
echo | tee /etc/postfix/{helo_access,rbl_override} >/dev/null
|
||||||
for domain in ${addmx[@]}
|
for domain in ${addmx[@]}
|
||||||
do
|
do
|
||||||
echo "${domain} OK" | tee -a /etc/postfix/{helo_access,rbl_override} >/dev/null
|
echo "${domain} OK" | tee -a /etc/postfix/{helo_access,rbl_override} >/dev/null
|
||||||
|
|
|
||||||
|
|
@ -157,12 +157,6 @@ echo "/free mortgage quote/ DISCARD
|
||||||
/repair your credit/ DISCARD
|
/repair your credit/ DISCARD
|
||||||
/lose weight/ DISCARD" | tee -a /etc/postfix/body_checks >/dev/null
|
/lose weight/ DISCARD" | tee -a /etc/postfix/body_checks >/dev/null
|
||||||
|
|
||||||
# Whitelist localhost
|
|
||||||
tee /etc/postfix/postscreen_access.cidr >/dev/null <<- postscreen_access.cidr
|
|
||||||
# Permit my own IP addresses
|
|
||||||
{{LOCAL_IPADDRESS}}/32 permit
|
|
||||||
postscreen_access.cidr
|
|
||||||
|
|
||||||
# Touch aliases db
|
# Touch aliases db
|
||||||
newaliases
|
newaliases
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue