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 /Dovecot Listen on secondary ip address

Discussion in 'E-mail Discussions' started by PV-Patrick, Jun 11, 2014.

  1. PV-Patrick

    PV-Patrick Member

    Joined:
    Jun 26, 2007
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Is it possible to have Exim / Doevcot *listen* on a secondary IP address other than the main IP address that's eth1. I want to have it listen on say the IP address that's bound to eth1:cp1; thus not disclosing the main server IP to any services. This is not for sending / outgoing emails, only incoming.

    I have been searching around the forums and the net for some time and there doesn't seem to be a definitive solution for this. It seems like Exim is binding to all interfaces by 0.0.0.0 and I don't know how to stop that. When I do a netstat for say port 25, it only shows the main server ip as listening on that port.

    Any help would be appreciated, thank you!

    cPanel 11.42.1
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    You should be able to utilize the "local_interfaces" option in the Exim configuration to force it to listen on a specific IP address. Ensure you use "WHM Home » Service Configuration » Exim Configuration Manager » Advanced Editor" to make the changes. As for Dovecot, you could add the "listen: IP" entry to the configuration file. You can edit the following file for local modifications to the Dovecot configuration:

    Code:
    /var/cpanel/templates/dovecot2.2/main.local
    Note: You can copy this file from /var/cpanel/templates/dovecot2.2/main.default if it does not exist. After making the custom modifications, you must run:

    Code:
    /scripts/builddovecotconf
    Thank you.
     
  3. PV-Patrick

    PV-Patrick Member

    Joined:
    Jun 26, 2007
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    You're the man Michael! I have spent so many hours trying to figure this out before making this post and I knew it had to be something easy!

    For anyone else wanting to do this, with the advanced Editor within cPanel. You will want to add a new field through the editor in the first section.

    Combined Exim Configuration -> Section: CONFIG. Scroll down to the bottom of that section and click the add additional configuration setting and then put in the local_interfaces and the IP you desire.
     
Loading...

Share This Page