This commit is contained in:
@@ -18,9 +18,17 @@
|
||||
|
||||
# --- 2024-12-18 ---
|
||||
|
||||
IP=$(curl https://ipv4.icanhazip.com)
|
||||
/usr/sbin/postconf proxy_interfaces="$IP"
|
||||
/usr/sbin/postconf ldap_bind_pw="$LDAP_BIND_PW"
|
||||
|
||||
# Start postfix
|
||||
PUBLIC_IP=$(curl https://ipv4.icanhazip.com)
|
||||
echo "Public IP: $PUBLIC_IP"
|
||||
echo "Hostname: $POSTFIX_HOST"
|
||||
echo "Domain: $POSTFIX_DOMAIN"
|
||||
echo "Templating files..."
|
||||
eval "echo \"$(cat /templates/ldap_aliases.cf.tmpl)\"" > /config/ldap_aliases.cf
|
||||
eval "echo \"$(cat /templates/ldap_senders.cf.tmpl)\"" > /config/ldap_senders.cf
|
||||
eval "echo \"$(cat /templates/main.cf.tmpl)\"" > /config/main.cf
|
||||
echo "Copying resolv.conf into /var/spool/postfix"
|
||||
mkdir -p /var/spool/postfix/etc
|
||||
chmod o+rx /var/spool/postfix/etc
|
||||
cp /etc/resolv.conf /var/spool/postfix/etc/resolv.conf
|
||||
echo "Starting Postfix..."
|
||||
/usr/sbin/postfix -v -c /config start-fg
|
||||
Reference in New Issue
Block a user