100,13 → 100,13 |
$SED "s/^MAIL_ADDR=.*/MAIL_ADDR=$mailAddr/" $CONF_FILE |
$SED "s/^MAIL_WHITEDOMAIN=.*/MAIL_WHITEDOMAIN=$whiteDomain/" $CONF_FILE |
$SED "s/^MAIL_ADMIN=.*/MAIL_ADMIN=$adminMail/" $CONF_FILE |
$SED "s/^#SMTP_IP=.*/SMTP_IP=$port/" $LOCAL_IPTABLE_FILE |
$SED "s/^#SMTP_IP=.*/SMTP_IP=$smtpIP/" $LOCAL_IPTABLE_FILE |
$SED "s/^#SMTP_PORT=.*/SMTP_PORT=$port/" $LOCAL_IPTABLE_FILE |
$SED "s/^#\$IPTABLES -A OUTPUT -p tcp -d \$SMTP_IP.*/\$IPTABLES -A OUTPUT -p tcp -d \$SMTP_IP --dport \$SMTP_PORT -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT/" $LOCAL_IPTABLE_FILE |
$SED "s/^#\$IPTABLES -A INPUT -p tcp -s \$SMTP_IP.*/\$IPTABLES -A INPUT -p tcp -s \$SMTP_IP --sport \$SMTP_PORT -m conntrack --ctstate ESTABLISHED -j ACCEPT/" $LOCAL_IPTABLE_FILE |
$SED "s/^relayhost =.*/relayhost = $smtp:$port/g" $POSTFIX_CONF_FILE |
$SED "s/^relayhost =.*/relayhost = $smtpIP:$port/g" $POSTFIX_CONF_FILE |
[ -d ${SASLPATH} ] || mkdir ${SASLPATH} |
echo "[${smtp}]:${port} ${mailAddr}:${mailMdp}" > ${SASLPATH}/sasl_passwd |
echo "[${smtpIP}]:${port} ${mailAddr}:${mailMdp}" > ${SASLPATH}/sasl_passwd |
postmap ${SASLPATH}/sasl_passwd |
chmod -R 644 ${SASLPATH} |
chown root:root ${SASLPATH}/sasl_passwd* |