#!/bin/sh if ! [ -e /etc/postfix/dh-params/2048.pem ]; then openssl dhparam -out /etc/postfix/dh-params/2048.pem -2 2048 fi postconf -e myhostname="$MYHOSTNAME" postconf -e mydomain="$MYDOMAIN" postconf -e mail_name="$MAIL_NAME" postconf -e message_size_limit="$MESSAGE_SIZE_LIMIT" postconf -e virtual_mailbox_domains="$DOMAINS" sed -i \ -e "s/@@LDAP_BASE@@/${LDAP_BASE}/g" \ -e "s/@@LDAP_HOST@@/${LDAP_SERVER}/g" \ -e "s/@@LDAP_USER@@/${LDAP_USER}/g" \ -e "s/@@LDAP_PASSWORD@@/${LDAP_PASSWORD}/g" \ /etc/postfix/virtual_mailbox_maps.cf if ! [ -e /var/spool/postfix/.initialized ]; then cp -r /var/spool/postfix-skel/* /var/spool/postfix chown -R 100:101 /var/spool/postfix touch /var/spool/postfix/.initialized fi map-virtual.sh c /etc/postfix/aliases.d/ virtual inotifyd map-virtual.sh /etc/postfix/aliases.d/ & /usr/libexec/postfix/master -c /etc/postfix -d