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.

Security annoyance: Hide Exim version

Discussion in 'E-mail Discussions' started by sv70, May 27, 2009.

  1. sv70

    sv70 Active Member

    Joined:
    Dec 24, 2006
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    How can we hide the Exim version?

    --------------

    #220-server.host.com ESMTP Exim 4.69 #1

    ---------------
     
  2. chinmay

    chinmay Well-Known Member

    Joined:
    Jul 22, 2008
    Messages:
    101
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    localhost
    To hide the SMTP version/banner follow the steps below

    Open the file /etc/exim.conf and find for smtp_banner.

    The line would look like

    Remove the "Exim ${version_number}" from the line. The modified line would look like

    You are done !
     
  3. sv70

    sv70 Active Member

    Joined:
    Dec 24, 2006
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    it works. Thanks! :)
     
  4. chinmay

    chinmay Well-Known Member

    Joined:
    Jul 22, 2008
    Messages:
    101
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    localhost
    You are Welcome :) Good Luck !
     
  5. 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
    These changes will be obliterated during the next cPanel/WHM update if not sooner if you do not take action to preserve the file (e.g. /scripts/preupcp and /scripts/postupcp scripts).
     
  6. sv70

    sv70 Active Member

    Joined:
    Dec 24, 2006
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    not enough with: chattr +i /etc/exim.conf?

    How you apply /scripts/preupcp and /scripts/postupcp?
     
  7. 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
    Correct.


    Just copy the file to a backup location in /scripts/preupcp and restore the file from a backup location in /scripts/postupcp.

    Keep in mind, by doing these manual modifications and circumventing correction mechanisms by cPanel/WHM, there is no guarantee your exim configuration will remain compatible with future versions of Exim or cPanel/WHM. You do this at your own risk.
     
  8. sv70

    sv70 Active Member

    Joined:
    Dec 24, 2006
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    ok, thanks so much :)
     
  9. Bigwebmaster

    Bigwebmaster Member

    Joined:
    Dec 3, 2003
    Messages:
    23
    Likes Received:
    1
    Trophy Points:
    1
    I know this thread is a bit old but this is mainly for reference for anybody else looking for a solution to get around CPanel overriding the changes to the smtp_banner, I just wanted to add what might be a better solution. Instead of copying exim.conf before the update and restoring after the update (which could cause you to miss important changes CPanel makes to exim.conf), I only added to /scripts/postupcp with the following:

    Code:
    #!/bin/sh
    perl -p -i -e 's/smtp_banner = "\${primary_hostname} ESMTP Exim \${version_number}/smtp_banner = "\${primary_hostname} ESMTP Exim/g' /etc/exim.conf
    perl -p -i -e 's/\\#\${compile_number} //g' /etc/exim.conf
    So all that does is replace the smpt_banner with the same text except without the version number or compile number after upcp has been run. Unless I am forgetting something I think this should keep the smtp_banner up to date without missing important changes.
     
    #9 Bigwebmaster, Nov 9, 2010
    Last edited: Nov 9, 2010
Loading...

Share This Page