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 About Mail Headers (hostname and IP)?

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

  1. tdd1984

    tdd1984 Member

    Joined:
    Jul 9, 2010
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    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

    Joined:
    Jul 28, 2004
    Messages:
    242
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Coralville, Iowa USA
    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:

    Code:
    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:

    Code:
    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:
    domain.com: IP1
    seconddomain.com: IP2
    4. Make sure that /etc/mailhelo file exists and has this type of info in it:

    Code:
    domain.com: domain.com
    seconddomain.com: seconddomain.com
    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.

    Code:
    IP1: domain.com
    IP2: seconddomain.com
    6. After setting all of this up, then send a test from the dedicated IP domain email to helocheck@cbl.abuseat.org 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 helocheck@cbl.abuseat.org test:

    Code:
    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:
    
      helocheck@cbl.abuseat.org
        SMTP error from remote mail server after RCPT
    TO:<helocheck@cbl.abuseat.org>:
        host mail-in.cbl.abuseat.org [82.94.216.251]:
        550 HELO for IP 1.1.1.2 was "cookiesonfriday.com"
    
    ------ This is a copy of the message, including all the headers. ------
    
    Return-path: <cp@cookiesonfriday.com>
    Received: from localhost ([127.0.0.1])
        by sdc232.thisworldtoday.com with esmtpa (Exim 4.69)
        (envelope-from <cp@cookiesonfriday>)
        id 1NDSR4-0008Te-HO
        for helocheck@cbl.abuseat.org; Wed, 25 Nov 2009 17:42:14 -0700
    Received: from 1.1.1.2 ([1.1.1.2]) by 173.213.105.2 (Horde MIME
        library) with HTTP; Wed, 25 Nov 2009 17:42:14 -0700
    Message-ID: <20091125174214.mvfi5pww1wg0sggw@173.213.105.2>
    Date: Wed, 25 Nov 2009 17:42:14 -0700
    From: cp@cookiesonfriday.com
    To: helocheck@cbl.abuseat.org
    Subject: testing
    MIME-Version: 1.0
    Content-Type: text/plain;
        charset=ISO-8859-1;
        DelSp="Yes";
        format="flowed"
    Content-Disposition: inline
    Content-Transfer-Encoding: 7bit
    User-Agent: Internet Messaging Program (IMP) H3 (4.1.6)
    
    testing 
    Here is the applicable line:

    Code:
    550 HELO for IP 1.1.1.2 was "cookiesonfriday.com"
    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.
     
  3. R-n-R

    R-n-R Registered

    Joined:
    Jan 13, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    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.
     
Loading...

Share This Page