diff --git a/Dockerfile b/Dockerfile index 884a715..fa49011 100644 --- a/Dockerfile +++ b/Dockerfile @@ -96,6 +96,7 @@ RUN echo "_dev_null: /dev/null" > /etc/aliases \ scache/unix/chroot=n ADD confd /etc/confd/ +ADD postmap.sh /start.d/zz-postmap.sh VOLUME ["/etc/postfix","/ssl","/var/spool/postfix"] EXPOSE 25/tcp 587/tcp diff --git a/postmap.sh b/postmap.sh new file mode 100755 index 0000000..f022e31 --- /dev/null +++ b/postmap.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# run postmap on all configured lookup tables + +postconf -h \ + postscreen_access_list \ + postscreen_dnsbl_reply_map \ + smtpd_client_restrictions \ + smtpd_helo_restrictions \ + smtpd_recipient_restrictions \ + virtual_alias_maps \ + virtual_mailbox_maps \ + | sed "s/,/\n/g" | sed "s/ /\n/g" | sort | uniq \ + | egrep '(hash|ldap|pcre):' \ + | xargs postmap