Commit 53df1f8a authored by Nolan's avatar Nolan

Fix subnet checking.

parent 02f23511
#!/bin/sh
#XXX This should authenticate against the host, or maybe an auth container.
#XXX Until then, move this useradd to the Dockerfile.
useradd -m $USERNAME
echo $USERNAME:prjx321 | chpasswd
......@@ -9,7 +10,8 @@ openssl req -x509 -nodes -days 3650 -newkey rsa:2048 \
-out /etc/dovecot/dovecot.pem -keyout /etc/dovecot/private/dovecot.pem \
-subj "/C=US/ST=CA/L=CA/O=none/OU=none/CN=$DOMAINNAME/emailAddress=postmaster@$DOMAINNAME"
LMTPIP=`ip -o addr show to $spam-dove_SUBNET | cut -d'/' -f1 | cut -d' ' -f7`
LMTPIP=`ip -o addr show to $spam_dove_SUBNET | cut -d'/' -f1 | cut -d' ' -f7`
echo $LMTPIP
sed -i -e "s/XXXLMTPIPXXX/$LMTPIP/g" /etc/dovecot/conf.d/10-master.conf
/usr/sbin/dovecot -F -c /etc/dovecot/dovecot.conf
#!/bin/sh
PF_IP=`ip -o addr show to $post-spam_SUBNET | cut -d'/' -f1 | cut -d' ' -f7`
PF_IP=`ip -o addr show to ${post_spam_SUBNET} | cut -d'/' -f1 | cut -d' ' -f7`
echo $PF_IP
spampd --host=$PF_IP:24 --relayhost=email-dovecot:24 \
--children=2 --nodetach --maxsize=65535 --tagall
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment