Skip to main content

incorrect ip in the auto generated /etc/mailips

Comments

8 comments

  • cPanelMichael
    Hello :) There are a few recent bug fixes regarding the /etc/mailips and /etc/mailhelo files. Please let us know the version of cPanel installed on this system:
    cat /usr/local/cpanel/version
    Thank you.
    0
  • weeming21
    11.54.0.8
    0
  • T.C.
    I've have exactly the same problem. I got blacklisted a few days after update to 11.54.0.12. File /etc/mailips is wrong and all the domains are set to use one ip. Any fix available apart recreate /etc/mailips from scratch as I'm currently doing?
    0
  • weeming21
    these is how i fix it temp0rary try put the following code to the /usr/local/cpanel/scripts/postupdateuserdomains : #!/bin/bash # change [MAIN_IP] to your default server main ip # change [MAIN_RDNS] to your main ip rdns rm -f /tmp/mailips rm -f /tmp/mailhelo # While loop processes each domain from /etc/mailhelo while read DOMAIN do # Skip ahead if a blank line is read in if [ "$DOMAIN" == "" ] || [ "$DOMAIN" == "no" ] then continue fi USERNAME=`grep -G =${DOMAIN}\$ /var/cpanel/users/* -l | cut -c19-` IP=`cat /var/cpanel/users/$USERNAME | grep 'IP=' | cut -c4-` echo ${DOMAIN}: $IP >> /tmp/mailips RDNS="[MAIN_RDNS]" #RDNS Part Start #if more then 1 ip, then change the rdns base on ip address #e.g [IP2] change to 1.1.1.1 and [RDNS2] change to server1.domain.tld #if [ "$IP" == "1.1.1.1" ] # then # RDNS="server1.domain.tld" # fi if [ "$IP" == "[IP2]" ] then RDNS="[RDNS2]" fi if [ "$IP" == "[IP3]" ] then RDNS="[RDNS3]" fi #RDNS Part End echo ${DOMAIN}: ${RDNS} >> /tmp/mailhelo # End of while loop, command substitution used to feed it. done < <(awk -F":" '{print $1}' /etc/mailhelo) echo '*: [MAIN_IP]' >> /tmp/mailips mv -f /tmp/mailips /etc/ mv -f /tmp/mailhelo /etc/
    0
  • T.C.
    Thanks for your help. There is an error on line 24. I'm not able to spot it can you fix it? Thanks
    0
  • cPanelMichael
    Hello :) Please let us know if the issue continues on cPanel version 54.0.15. It includes the following case: Fixed case CPANEL-3984: Turn IPv6 handling off for mailips/mailhelo. Thank you.
    0
  • T.C.
    Hello :) Please let us know if the issue continues on cPanel version 54.0.15. It includes the following case: Fixed case CPANEL-3984: Turn IPv6 handling off for mailips/mailhelo. Thank you.

    Hi Mike, I'm now on 54.0.17 but the issue persists. My server has only Ipv4. I've reopened the Ticket: #7461765
    0
  • cPanelMichael
    To update, it looks like the existing behavior is by design. Users should vote for the following feature request if the goal is to have native support for multiple shared IP addresses: Multiple Shared IP Addresses Thank you.
    0

Please sign in to leave a comment.