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.

Exim banner, mail headers and resellers with own ip

Discussion in 'E-mail Discussions' started by WebCraft, Dec 6, 2008.

  1. WebCraft

    WebCraft Registered

    Joined:
    May 29, 2008
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    standard exim.conf:
    smtp_banner = "${primary_hostname} ESMTP Exim ${version_number} \
    blah-blah-blah

    I have changed to:

    smtp_active_hostname = ${if exists {/etc/mail_reverse_dns}{${lookup{$interface_address}lsearch{/etc/mail_reverse_dns} \
    {$value}{$primary_hostname}}}{$primary_hostname}}

    smtp_banner = "${smtp_active_hostname} ESMTP Exim ${version_number} \
    blah-blah-blah

    Now I can see a reseller's hostname in banner (telnet ip 25). But in headers I still see 'received by server_primary_hostname'. How can I force exim to change hostname in headers?

    Best regards, Arthur
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    ** Moved to the Email/Exim forum as you may receive more responses here **
     
  3. payne

    payne Well-Known Member

    Joined:
    May 31, 2003
    Messages:
    103
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Seattle
    I'm looking for a solution for this, too.
     
  4. SoftDux

    SoftDux Well-Known Member

    Joined:
    May 27, 2006
    Messages:
    983
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Johannesburg, South Africa
    cPanel Access Level:
    Root Administrator
    Has anyone figured out howto this yet?
     
  5. markhard

    markhard Well-Known Member

    Joined:
    Apr 22, 2004
    Messages:
    250
    Likes Received:
    0
    Trophy Points:
    16
    i'm looking answer too regarding this problem.

    i setup a domain on my server to use a dedicated IP for sending outgoing emails. it seems to work fine at some point. if i send email to gmail.com i can see that the sender IP is the dedicated IP assigned for the domain, but.. when i check on MX Lookup Tool - Check your DNS MX Records online - MxToolbox SMTP diagnostic, it's said "Warning - Reverse DNS does not match SMTP Banner"

    it seems that although the HELO and IP is set to dedicated IP setting, the smtp_banner is still using server's hostname which cause the warning: "Warning - Reverse DNS does not match SMTP Banner"

    any solution on this?

    i found a tutorial to fix this but it requires manual configuration on exim.conf which of course will be erased on cpanel update (hence must redo every time we do cpanel update): Exim customization
     
  6. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    What is your cPanel version number? If needed, this can be found in the upper-right corner of WebHost Manager (WHM) or obtained via root CLI/SSH access as seen below:
    Code:
    # /usr/local/cpanel/cpanel -V
    Please provide the output from the following command:
    Code:
    # grep per_domain_mailips /etc/exim.conf.localopts && stat /var/cpanel/per_domain_mailips
     
  7. markhard

    markhard Well-Known Member

    Joined:
    Apr 22, 2004
    Messages:
    250
    Likes Received:
    0
    Trophy Points:
    16
    CPanel version: WHM 11.28.52

    per_domain_mailips=0
    stat: cannot stat `/var/cpanel/per_domain_mailips': No such file or directory
     
  8. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    The information provided leads me to believe that the option that will automatically manage the files /etc/mailhelo and /etc/mailips is not enabled via the Exim Configuration Editor in WHM. Are one or both of the other (non-automatic) options enabled to allow the two files to be managed manually?

    Providing output from the following command will help to confirm which options may be enabled:
    Code:
    # egrep -Hn "(custom_mailhelo|custom_mailips|per_domain_mailips)" /etc/exim.conf.localopts && stat /var/cpanel/custom_mailhelo /var/cpanel/custom_mailips /var/cpanel/per_domain_mailips
    Related menu path and documentation:
     
  9. markhard

    markhard Well-Known Member

    Joined:
    Apr 22, 2004
    Messages:
    250
    Likes Received:
    0
    Trophy Points:
    16
    it's indeed not enabled, I choose to manually manage the files /etc/mailhelo and /etc/mailips. however this is not my question.

    my question was about the smtp_banner which is still using the hostname of the server and not using the assigned IP rDNS, hence i got "Warning - Reverse DNS does not match SMTP Banner" error when checking the domain's mail IP on MX Lookup Tool - Check your DNS MX Records online - MxToolbox
     
  10. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    I apologize. I misunderstood the circumstances, and I confirm what you have described. I would believe it is normal for the hostname to be used in the smtp_banner. To help me better understand the difficulty, please elaborate in detail about the specific problem that you are encountering.
     
  11. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    I tried reproducing the message reported at the mxtoolbox web site, but I was unable to trigger the same message. The following is munged output using the "SMTP" test at th mxtoolbox web site:
    Code:
    220-server1.domain.tld ESMTP Exim 4.69 #1 Fri, 24 Dec 2010 21:58:57 -0600 We do not authorize the use of this system to transport unsolicited, and/or bulk e-mail.
    
    Not an open relay.
     0 seconds - Good on Connection time
     2.527 seconds - Good on Transaction time
     OK - 1.2.3.4 resolves to n4.3-2-1.domain.tld
     OK - Reverse DNS matches SMTP Banner
    I performed the test using the primary domain of a cPanel account that is assigned to a dedicated IP address, different from the main server IP address. The reverse DNS (PTR) record of the account-specific dedicated IP address is not the same as the account domain name nor the server hostname, yet the mxtoolbox web site reports that "Reverse DNS matches SMTP Banner."

    The test results lead me to believe that the reverse DNS being compared to the SMTP banner is the actual PTR record of the hostname in the SMTP banner and not the reverse DNS of the unique, dedicated IP address that happens to be used by a hosted cPanel account.

    What problem is addressed by changing the existing Exim behavior? Where does this need originate? I ask because I am not aware of any reason why e-mails would be rejected when the SMTP banner correctly reports a hostname that has matching PTR record for its IP address when the connection uses a different IP address, which has its own unique PTR record that is different than the cPanel account domain name.

    If the SMTP banner matches only the PTR record of the IP address used in the connection, how does this affect or help add-on and parked domains that share the same IP address as the account primary domain name?
     
  12. markhard

    markhard Well-Known Member

    Joined:
    Apr 22, 2004
    Messages:
    250
    Likes Received:
    0
    Trophy Points:
    16
    my setup is like this:

    1.1.1.1 hostname.domain.com -> used for all shared accounts

    then i setup an account with dedicated IP and set it on /etc/mailips and /etc/mailhelo

    2.2.2.2 is dedicated IP for thedomain.net

    /etc/mailips:
    thedomain.net: 2.2.2.2
    *: 1.1.1.1

    /etc/mailhelo:
    thedomain.net: thedomain.net
    *: hostname.domain.com

    1.1.1.1 rDNS is set to hostname.domain.com while 2.2.2.2 rDNS is set to themail.thedomain.net

    the settings works fine as thedomain.net is sending email with outgoing IP 2.2.2.2 and the other domains is using shared 1.1.1.1

    but when i check thedomain.net on MX Lookup Tool - Check your DNS MX Records online - MxToolbox the SMTP banner is still using hostname.domain.com and not themail.thedomain.net (the rDNS of dedicated IP assigned to the domain thedomain.net)

    i found a solution here: Exim customization but it require manual modification on exim.conf so the modification will be revert to cpanel default config when cpup run.
     
  13. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    To retain custom modifications made outside of the Advanced Exim Configuration Editor in WHM, I recommend using the built-in pre and post script hooks that can be used to automatically execute a custom script or other shell commands to re-apply specific customizations (e.g., via a custom patch to exim.conf):
    Code:
    /scripts/prebuildeximconf
    /scripts/postbuildeximconf
    Related documentation:
     
Loading...

Share This Page