Skip to main content

How to script /etc/mailhelo to always match reverse DNS

Comments

2 comments

  • sawbuck
    Nice. Thank you Phil. Have voted, hopefully others will also.
    0
  • freedomizer
    the script throws errors when using parked domains parked domains show up as subdomains in /etc/mailhelo so the grep around line 21 needs "-m 1" to limit to the first result:
    #added -m 1, max count 1, aliases show up as subdomains in /etc/mailhelo and grep will return several results causing garbled data: IP=$(grep -m 1 "^$DOMAIN" /etc/mailips | awk '{print $2}')
    this cleaned up some garbled results in /etc/rdns and /etc/mailhelo I also corrected on line 12:
    # Skip ahead if a line in /etc/mailips is blank if [ "$DOMAIN" == "" ] || [ "$DOMAIN" == "no" ] then continue fi
    for some reason /etc/mailhelo contains lines with "no" (probably garbled data) this filters it out
    0

Please sign in to leave a comment.