The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Question regarding mailhelo file

Discussion in 'E-mail Discussions' started by brianc, May 30, 2013.

  1. brianc

    brianc Well-Known Member

    Joined:
    May 16, 2003
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    16
    Hi cPanel and cPanel users:

    Due to my datacenter not handling a spam complaint from another network in a timely manner, my assigned IP block got blacklisted by spamhaus. My DC assigned me another block of IPs to use for now to mitigate the damage of the block. I read your documentation on changing the exim outgoing IP address and I had a question regarding the instructions. In the mailhelo file I have this entry:

    *: hostname.server.com

    The server's hostname is pointing to the main server IP address. Does it need to be pointing to the new ip address (via its A record) that I have added in the mailips file? That part is not clear to me.

    Should I just be using a different "hostname" for the mailhelo file that differs from the server's hostname?

    Brian
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    You will only need to manually edit the /etc/mailhelo file if you have disabled the following option:

    "Send mail from account’s dedicated IP address"

    If you have enabled this option, then you would add in the appropriate entry for each domain name that is assigned a dedicated IP address. EX:

    example.com: example.com

    The IP addresses you have defined in /etc/mailips will not effect the way you have to edit the /etc/mailhelo file. However, you should ensure that RDNS is setup from the shared IP address you are using to send out email to the hostname of the server. You can have the IP address you want all accounts to send out email from configured as your server's main IP address.

    Thank you.
     
  3. brianc

    brianc Well-Known Member

    Joined:
    May 16, 2003
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    16
    Hi Michael:

    Thank you for your reply.

    Your documentation says to disable "Send mail from account’s dedicated IP address" when manually editing mailhelo file. I did this. I am not using any accounts with dedicated IP addresses. However I do need to send mail out from an IP address that differs from the main server IP.

    I am sorry but your reply confused me even more. Your documentation says to add this to the following files:

    mailhelo:
    *: hostname.server.com

    mailips:
    *: newipaddress

    I did this. The question is this, since the A record for hostname.server.com points to the main server IP and exim is now sending mail from a different IP address, does the hostname A record have to match the new outgoing mail server IP?

    Brian
     
    #3 brianc, May 30, 2013
    Last edited: May 30, 2013
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Yes, in my last reply I intended to write that you will only need to manually edit the /etc/mailhelo file if you have disabled the "Send mail from account’s dedicated IP address" option.

    Yes, it's a good idea to have the "A" record for the hostname match the IP address that is used to send out email. It's not required, but some remote mail servers will block email from your server if the hostname of the server does not point to the IP address that is sending email. Is there anything keeping you from having the IP address used for sending email as the main IP address of your server?

    Thank you.
     
  5. brianc

    brianc Well-Known Member

    Joined:
    May 16, 2003
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    16
    I am not sure, does changing the main IP address of the server affect all of the existing accounts that are already setup? A lot of my clients use sub-domains with my hosting service since I offer specialized hosting for a particular application.
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    The IP address assigned to the accounts does not have to be the main IP address of the server, so there should be no issue with changing your server's main IP address as long as the IP addresses the accounts use are still added to the server. Note that I am referring to the primary IP address configured (ex. eth0) as opposed to the main shared IP address configured in WHM.

    Thank you.
     
  7. brianc

    brianc Well-Known Member

    Joined:
    May 16, 2003
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    16
    Is there way to change the primary IP address for the server via WHM/cPanel either through the browser or via the command line?

    I have not had to do this before. Thanks!

    Brian
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    You must make this change through the command line. The following thread offers some advice on how to do this:

    IP Address Change

    There are also several tutorials if you use the term "cpanel network scripts change ip" on most search engines. It can sometimes be a good idea to have your data center or system administrator make this change if you do not have physical access to the server as some mistakes when manually editing the network configuration could lead to downtime.

    Thank you.
     
Loading...

Share This Page