Re: MX/ISP BLOCK
"Andy Bradford" <[email protected]> 9 Feb 2019 09:14:36 -0700
| Newsgroups | gmane.mail.qmail.general |
|---|---|
| Message-ID | <[email protected]> |
Thus said Manvendra Bhangui on Fri, 08 Feb 2019 21:28:58 +0530:
> 4. Write the following script as qmail-remote in /var/qmail/bin. Asume
> w.x.y.z is the IP of the ISP
> #!/bin/sh
> domain=$1
> /var/qmail/bin/dnsmxip $1 |awk '{print $2}'| while read line
> do
> if [ " $line" = " w.x.y.z" ] ; then
> exec cat > /dev/null
> fi
> done
> exec /var/qmail/bin/qmail-remote.org $*
Nice idea, however, unless this outage is expected to be permanent, it
discards potentially legitimate email.
Instead, maybe the message should be queued elsewhere and then just put
on a deferred schedule for deliveries.
Might be better to setup a second instance of qmail and instead:
#!/bin/sh
domain="$1"
/var/qmail/bin/dnsmxip "$1" |awk '{print $2}'| while read line
do
if [ " $line" = " w.x.y.z" ] ; then
exec /var/qmail-delayed/bin/qmail-remote "$@"
fi
done
exec /var/qmail/bin/qmail-remote "$@"
Andy
--
TAI64 timestamp: 400000005c5efc91