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.

Easy FIX your SMTP banner, SMTP greeting and Reverse DNS for Dedicated IPs

Discussion in 'E-mail Discussions' started by fcbinfo, Feb 16, 2014.

  1. fcbinfo

    fcbinfo Well-Known Member

    Joined:
    Dec 10, 2006
    Messages:
    120
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Ok guys, I tried all and on forum / cPanel docs and I can't get working Dedicated IPs working for sending mails.

    By looking on the on this forum: /http://forums.jaguarpc.com/dedicated-servers/17391-exim-customization.html

    I see that is an old post, but I did a mixed config with the new cPanel rules for dedicated ip sending and now I have it working without any error messages from e-mail test sites like mxtool or dnsstuff and when I'm connect on telnet 111.111.111.11 smtp now I have the correct configuration and correct reply.

    It is very simple to fix. Just do everything of cPanel says to do:

    Go to: Service Configuration » Exim Configuration Manager
    Basic Editor
    Domains and IPs ->

    Send mail from account’s dedicated IP address: OFF
    Reference /etc/mailhelo for outgoing SMTP HELO: ON
    Reference /etc/mailips for outgoing SMTP connections: ON

    Edit your files:

    /etc/mail_reverse_dns
    111.111.111.11: dedicated-ip-reverse-dns.domain.com
    111.111.111.10: main-sharedip-reverse-dns.domainhostname.com

    /etc/mailhelo
    domain.com: dedicated-ip-reverse-dns.domain.com
    *: main-sharedip-reverse-dns.domainhostname.com

    /etc/mailips
    domain.com: 111.111.111.11
    *: 111.111.111.10


    After this, edit your /etc/exim.conf like this:

    Search for this line:
    Code:
    smtp_banner = "${primary_hostname} ESMTP Exim ${version_number} \
    and change for this:
    Code:
    smtp_active_hostname = ${lookup{$interface_address}lsearch{/etc/mail_reverse_dns}{$value}{$primary_hostname}}
    message_id_header_domain = $smtp_active_hostname
    smtp_banner = "${smtp_active_hostname} ESMTP Exim ${version_number} \
    
    Ok my friend, now you have it working and no error messages from test mail websites.
    For some reason, to get delist from some spam list sites, you need to do it, and with this they will accept your delist requisition.

    Yep, this works for me.

    Thanks!
     
    #1 fcbinfo, Feb 16, 2014
    Last edited: Feb 16, 2014
    Tarl likes this.
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    Thank you for taking the time to post a solution to an issue that you were experiencing. To note, I believe previous discussion of this issue is found here:

    Exim Banner - Mail Header

    Thank you.
     
  3. fcbinfo

    fcbinfo Well-Known Member

    Joined:
    Dec 10, 2006
    Messages:
    120
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Hi Michael.

    Can you help-me with something?

    I don't know what is backing my exim.conf to original config. Maybe cPanel Update?

    Better to do some cron job with cp myexim.conf to exim.conf ?

    Thank you for your time!
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,696
    Likes Received:
    656
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    You should use "WHM Home » Service Configuration » Exim Configuration Manager » Advanced Editor" rather than manually editing the /etc/exim.conf file. This will ensure the changes are preserved through updates.

    Thank you.
     
  5. fcbinfo

    fcbinfo Well-Known Member

    Joined:
    Dec 10, 2006
    Messages:
    120
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Tried to do it, but when I try get this reply:

    Your configuration could not be updated.
    Doing Dry Run
    Dry Run failed
    Configuration file has an invalid syntax.

    By looking the syntax it show wrong...

    Code:
    smtp_banner = smtp_active_hostname = [/B]${lookup{$interface...
    There is any location on advanced editor of that I can put this 2 lines:

    Code:
    smtp_active_hostname = ${lookup{$interface_address}lsearch{/etc/mail_reverse_dns}{$value}{$primary_hostname}}
    message_id_header_domain = $smtp_active_hostname
    and on smtp_banner =
    Code:
    "${smtp_active_hostname} ESMTP Exim ${version_number} \... 
    Thank you for your time again!
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,696
    Likes Received:
    656
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    First, browse to:

    "WHM Home » Service Configuration » Exim Configuration Manager » Advanced Editor"

    Use your browser to search for "smtp_banner". Replace the existing entry in this field to:

    Code:
    "${smtp_active_hostname} ESMTP Exim ${version_number}  \#${compile_number} ${tod_full} \n   We do not authorize the use of this system to transport unsolicited, \n   and/or bulk e-mail."
    Next, scroll down from that option until you see a blue text box that states:

    Click on this box two times. In the first newly created drown-down field, select "smtp_active_hostname" and then enter:

    Code:
    ${lookup{$interface_address}lsearch{/etc/mail_reverse_dns}{$value}{$primary_hostname}}
    In the second newly created drown-down field, select "message_id_header_domain" and then enter:

    Code:
    $smtp_active_hostname
    Finally, scroll to the very bottom of the advanced editor and click on "Save". This will allow you to save the custom rules that you have created.

    Thank you.
     
    martin MHC and Tarl like this.
  7. fcbinfo

    fcbinfo Well-Known Member

    Joined:
    Dec 10, 2006
    Messages:
    120
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Well... thank you.

    Now we have it working.

    You are the best Michael!
     
  8. GuruDavid

    GuruDavid Member

    Joined:
    Mar 25, 2014
    Messages:
    6
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    Thanks for sharing this fcbinfo. Worked great for me. However, I did not follow the recommendations also suggested here to edit the Exim Configuration via WHM. I did so via command line. I've noticed that cPanel updates are overwriting /etc/exim.conf. To avoid this, I added it to cpanelsync.exclude.

    Code:
    # sudo echo "/etc/exim.conf" >> /etc/cpanelsync.exclude && service cpanel restart
    
     
  9. fcbinfo

    fcbinfo Well-Known Member

    Joined:
    Dec 10, 2006
    Messages:
    120
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Let-me try to understand. Maybe because the bad English I didn't got it!

    You have the exim.conf edited manually and when you add exim.conf to cpanelsync.exclude this will not overwrite my configurations?

    Is it?

    Thank you!
     
  10. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,696
    Likes Received:
    656
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    This is not really advised because at some point an update to Exim may require changes to the /etc/exim.conf file. The method I posted will allow you to make the change via the UI so that changes are preserved.

    Thank you.
     
  11. fidividi

    fidividi Active Member

    Joined:
    Feb 15, 2013
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Thank you Michael.

    I have added this as a feature request, so that further customization is avoided and taken care of as part of the changes made by cPanel to exim. Anyone else interested, please vote for it here: SMTP Banner for Dedicated IP Accounts

    Thank you!
     
  12. bugetarul

    bugetarul Registered

    Joined:
    Jul 19, 2014
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello
    What does this mean?
    *: main-sharedip-reverse-dns.domainhostname.com
     
  13. fcbinfo

    fcbinfo Well-Known Member

    Joined:
    Dec 10, 2006
    Messages:
    120
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    It is your main shared, generally the main IP of your server.

    Ex:

    domain1.com: 111.111.111.111
    domain2.com: 111.111.111.112
    domain3.com: 111.111.111.113
    *: 111.111.111.110

    Where * means (All the rest domains use this ip) and 111.111.111.110 your main SHARED IP for this domains.

    Hope this helps. If not, fell free to ask again. I'm pleased to help.
     
  14. dzamanakos

    dzamanakos Active Member

    Joined:
    Feb 15, 2014
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi, i have a slightly different scenario and i'm experiencing the following :

    I use ip1 for domain1 kai a shared ip for some others lets say ip2. The domain1 uses the ip1 for sending and the other domains the ip3.
    When ip1 or ip2 is in a blacklist i change the mailhelo and mailips to send via ip4,ip5 etc that i own.
    I've also setup :
    Send mail from account’s dedicated IP address: OFF
    Reference /etc/mailhelo for outgoing SMTP HELO: ON
    Reference /etc/mailips for outgoing SMTP connections: ON

    and the corresponding mailips and mailhelo files.
    The mail_reverse_dns file contains only ip1 and i still get the Warning - Reverse DNS does not match SMTP Banner

    When i add all of my ips to mail_reverse_dns i dont have the error, even when i restart exim.
    When i change something in exim configuration manager in whm and save, the exim restarts and mail_reverse_dns file resets and contains only the ip1.
    Is there a way to manage it in order not to have to remember to add all of my ips in mail_reverse_dns file after editing exim configuration manager or use a cron that overwrites the file?
     
  15. rligg

    rligg Well-Known Member

    Joined:
    Sep 16, 2003
    Messages:
    277
    Likes Received:
    0
    Trophy Points:
    16
    This did not work for me. My server still replies with the server hostname instead of the domain.
     
    #15 rligg, Jan 14, 2016
    Last edited by a moderator: Jan 14, 2016
  16. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,696
    Likes Received:
    656
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Did you follow the steps from the first post on this thread, or just the instructions from my response?

    Thank you.
     
  17. cvcvishnu

    cvcvishnu Registered

    Joined:
    Feb 8, 2015
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello,

    I am facing the same issue. I have a domain and while checking in the MXToolbox site it shows "Reverse DNS does not match SMTP Banner". Please help me to fix the issue.

    Awaiting a quick response from any one
     
  18. emiru

    emiru Member

    Joined:
    Apr 9, 2013
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Please help me configure my files, I have done all adviced in first mail but still I get

    SMTP Banner Check Reverse DNS does not match SMTP Banner More Info
    SMTP TLS Warning - Does not support TLS. More Info
    SMTP Transaction Time 15.563 seconds - Not good! on Transaction Time


    domain.rs is primary domain
    server.domain.rs is hostname
    1.1.1.1 is my public dedicated IP

    My mailhalo
    domain.rs:server.domain.rs
    *:server.domain.rs

    My mailips
    *:1.1.1.1

    My reverse dns
    1.1.1.1:server.domain.rs

    I have enabled using halo and mailips in domain and ips
    I have changed smtp banner as adviced
     
  19. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,696
    Likes Received:
    656
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Could you let us know which version of cPanel is installed on your system?

    Thank you.
     
  20. emiru

    emiru Member

    Joined:
    Apr 9, 2013
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hi,

    Please check below

    root@server [~]# cat /usr/local/cpanel/version
    11.54.0.15
     
Loading...

Share This Page