Re: MX/ISP BLOCK

Manvendra Bhangui <[email protected]> Fri, 8 Feb 2019 22:12:27 +0530
Newsgroups gmane.mail.qmail.general
Message-ID <CAOqj+1OboV46bEXVpWY4p+yA8zDzXcFyuN=2x1-By_SnzQQDnw@mail.gmail.com>
On Fri, 8 Feb 2019 at 22:10, Rejaine Silveira Monteiro
<[email protected]> wrote:
>
> thank you! the script is working fine!!  is only giving problems in
> bounce mail, like:
>
> @400000005c5da7a03aff7a3c info msg 31371954: bytes 39440 from <> qp
> 21332 uid 365
> @400000005c5dae4821b48c34 starting delivery 18429: msg 31371954 to
> remote [email protected]
> @400000005c5dae4828f918fc delivery 18429: failure:
> I_(qmail-remote)_was_invoked_improperly._(#5.3.5)/
>
> is not a big problem, but do you have any idea what it might be?

Sorry about that. qmail-remoe has to issue a report which is missing.
Here is the modified script
#!/bin/sh
domain=$1
/var/qmail/bin/dnsmxip $1 |awk '{print $2}'| while read line
do
    if [ " $line" = " w.x.y.z" ] ; then
        cat > /dev/null
        printf "r\0Khost accepted message.\nMessage queued\n\0"
        exit 0
    fi
done
exec /var/qmail/bin/qmail-remote.org $*