Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Question About Mail Headers (hostname and IP)?

Discussion in 'E-mail Discussion' started by tdd1984, Jul 10, 2010.

  1. tdd1984

    tdd1984 Member

    Jul 9, 2010
    Likes Received:
    Trophy Points:
    I'm just curious how do some people get their headers to output a unique host name and the current IP assigned to that domain name. We have 7 IP's and 7 domain names each IP goes into each domain (uniquely). When we send out mail, our default hostname and IP shows. How do we get a unique hostname and unique IP (that is assigned to that domain) to show instead?

    Our main server IP shows in the originating IP section of the mail headers, not the domain IP?
  2. Miraenda

    Miraenda Well-Known Member

    Jul 28, 2004
    Likes Received:
    Trophy Points:
    Coralville, Iowa USA
    cPanel Access Level:
    Root Administrator
    Here are the steps to setup what you are wanting to do based on a tutorial I have done on my forum:

    1. WHM > Exim Configuration Editor

    2. If you want all domains with dedicated IPs to use those IPs, you'd select:

    Automatically send outgoing mail from the account's IP address instead of
    the main IP address. Warning: If you turn this setting on you should make
    sure reverse  DNS entries match the ones in /etc/mail_reverse_dns. [?]
    If you only want select domains to send using their own IP, you'd instead select:

    Send HELO based on the domain name in /etc/mailhelo (*:
    HELONAME can be added to the file to change the default helo name) [?]
    Send outgoing mail from the ip that matches the domain name in /etc/mailips (*:
    IP can be added to the file to change the main outgoing interface) [?]
    3. Make sure that /etc/mailips has the information for the domains and IPs. File should look like this:

    Code: IP1 IP2
    4. Make sure that /etc/mailhelo file exists and has this type of info in it:

    Subdomains will need to have the main domain as the mailhelo as you cannot have multiple mailhelo for the same IP.

    5. Check that /etc/mail_reverse_dns exists and has the reverse DNS (PTR) for that dedicated IP. It likely will not exist and will need to be manually configured. This should ideally be the same as the mailhelo response.

    6. After setting all of this up, then send a test from the dedicated IP domain email to to see the mailhelo response from that domain with the dedicated IP. Of note, you cannot telnet on the IP to get that response as a telnet on port 25 will instead return the server's hostname. The mailhelo name is not the same as the hostname when you've reconfigured exim to use the /etc/mailhelo file.

    An example for the test:

    This message was created automatically by mail delivery software.
    A message that you sent could not be delivered to one or more of its
    recipients. This is a permanent error. The following address(es) failed:
        SMTP error from remote mail server after RCPT
        host []:
        550 HELO for IP was ""
    ------ This is a copy of the message, including all the headers. ------
    Return-path: <>
    Received: from localhost ([])
        by with esmtpa (Exim 4.69)
        (envelope-from <cp@cookiesonfriday>)
        id 1NDSR4-0008Te-HO
        for; Wed, 25 Nov 2009 17:42:14 -0700
    Received: from ([]) by (Horde MIME
        library) with HTTP; Wed, 25 Nov 2009 17:42:14 -0700
    Message-ID: <20091125174214.mvfi5pww1wg0sggw@>
    Date: Wed, 25 Nov 2009 17:42:14 -0700
    Subject: testing
    MIME-Version: 1.0
    Content-Type: text/plain;
    Content-Disposition: inline
    Content-Transfer-Encoding: 7bit
    User-Agent: Internet Messaging Program (IMP) H3 (4.1.6)
    Here is the applicable line:

    550 HELO for IP was ""
    This shows that the mailhelo is returning the actual entry for /etc/mailhelo rather than the main server IP if it is setup properly.

    Please note that the above will only send using the dedicated IP for normal email sent by SMTP authentication. Email scripts using sendmail and forwarders will still use the main shared IP even on these dedicated IP domains to send emails.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. R-n-R

    R-n-R Registered

    Jan 13, 2009
    Likes Received:
    Trophy Points:
    Anyone know if cPanel is working on this as a standard feature on cPanel?

    I also have some InterWorx Control Panel servers and this is a very nice feature that InterWorx has, set via NodeWorx (similar to WHM) to allow all SiteWorx (similar to cPanel) accounts to send emails using their dedicated IP.

    Hopefully this will be added to WHM/cPanel in the coming months.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice