run postmap on container startup
This commit is contained in:
parent
e43d97f652
commit
ef5ebfbc64
@ -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
|
||||
|
15
postmap.sh
Executable file
15
postmap.sh
Executable file
@ -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
|
Loading…
x
Reference in New Issue
Block a user