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.

Can I use exim in other than 25, 26 port?

Discussion in 'General Discussion' started by snaidu, Mar 1, 2007.

  1. snaidu

    snaidu Registered

    Joined:
    Dec 5, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Dear sir

    I want to use exim port other than 25, 26, port

    can someone pl guide how I can change port for exim?

    Regards
    Sunder
     
    #1 snaidu, Mar 1, 2007
    Last edited: Mar 1, 2007
  2. ckh

    ckh Well-Known Member

    Joined:
    Dec 6, 2003
    Messages:
    356
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Phoenix, AZ
    cPanel Access Level:
    DataCenter Provider
    In WHM, go to the Service Configuration section and click on service manager. Scroll down and you'll see where you can run exim on another port.

    My ISP has blocked both ports 25 and 26 for a couple years now so instead of using 26, I've been using 27 without any problems.
     
  3. SageBrian

    SageBrian Well-Known Member

    Joined:
    Jun 1, 2002
    Messages:
    415
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    NY/CT (US)
    cPanel Access Level:
    Root Administrator
    I'm curious if there is an easy way to make a 3rd port?
     
  4. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,382
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    I don't think you can from the WHM, but you can add another port from the shell:

    Code:
    /usr/sbin/exim -bd -oX <port>
    Where <port> refers to whatever port you want exim to run on. Be sure that you have that port open in your firewall.

    Then to make sure that chkservd is monitoring that port, you would have to add an entry in /etc/chkserv.d.

    Create a file in that directory named exim-<port> and add:

    Code:
    service[exim-<port>]=<port>,QUIT,220,/etc/rc.d/init.d/exim stop;/etc/rc.d/init.d/exim stop;/etc/rc.d/init.d/exim stop;/etc/rc.d/init.d/exim start;/usr/sbin/exim -oX <port> -bd
    Then you need to edit the /etc/chkserv.d/chkservd.conf file and add a line:

    Code:
    exim-<port>: 1
    Again, change all instances of <port> to whatever port number you are wanting exim to run on.
     
  5. Ishware

    Ishware Well-Known Member

    Joined:
    Nov 7, 2003
    Messages:
    168
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Panama City, FL
    cPanel Access Level:
    Root Administrator
    The above looks nearly perfect for what I want to do - but I need it to only bind to a single IP address and port.

    In other words, I have exim bound to all my server IPs on standard ports, but I want to bind SMTP on one IP address to port 80 (because my father's employer, as well as my college, only allow port 80 connections, and thus I can't send email)...

    I've read exim documentation, but I don't see how I can bind the above to just a single IP address.

    Is it possible?
     
  6. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,382
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Just use the line:

    Code:
    /usr/sbin/exim -bd -oX <ip>.<port>
    another words, if you wanted the IP address 192.168.0.1 to listen on port 80, you could use:

    Code:
    /usr/sbin/exim -bd -oX 192.168.0.1.80
    You may run into some binding problems, because I believe cPanel by default will setup Apache to listen to all on all of the IPs on the server. This will need to be dealt with, since an IP cannot listen for two daemons on the same port.
     
Loading...

Share This Page