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.

Help Needed to open port 27 for exim

Discussion in 'General Discussion' started by Haloweb, Jan 23, 2007.

  1. Haloweb

    Haloweb Well-Known Member

    Joined:
    Jul 2, 2004
    Messages:
    88
    Likes Received:
    0
    Trophy Points:
    6
    Hi Everyone

    I hope somone can give me a pointer here

    I have enabled exim to run on port 27,
    I have open port 27 in CSF
    I have set ASSP to listen on port 27

    however when I do a portscan it shows no services running on that port
    also cant send mail on it natrually

    does anyone have any ideas ?

    thanks in advance
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    In csf make sure 27 is added to TCP_IN and restart csf. On the server try:

    netstat -lpn | grep exim

    And make sure that exim is bound to 0.0.0.0:27. IF it is, that should be all you need to do other than changing your email client to use port 27 when connecting to your server instead of port 25.
     
  3. Haloweb

    Haloweb Well-Known Member

    Joined:
    Jul 2, 2004
    Messages:
    88
    Likes Received:
    0
    Trophy Points:
    6
    Thanks Chirpy

    netstat -lpn | grep exim shows
    tcp 0 0 127.0.0.1:27 0.0.0.0:* LISTEN 7412/exim

    I restarted csf and exim however still no luck sending mail and a port scan reveals
    that no services are running on the port
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Have you tried connecting to port 27 from an external source with:

    telnet 11.22.33.44 27

    Where 11.22.33.44 is your servers IP. In fact, if you try that from shell on the server that would be a good test too.
     
  5. Haloweb

    Haloweb Well-Known Member

    Joined:
    Jul 2, 2004
    Messages:
    88
    Likes Received:
    0
    Trophy Points:
    6
    well my telnet is deactivated / blocked so I tried via shell
    and I cant connect - really confusing, could a old Apf config file
    somewhere be causing this ? perhaps iptables ?
     
    #5 Haloweb, Jan 23, 2007
    Last edited: Jan 23, 2007
  6. dezignguy

    dezignguy Well-Known Member

    Joined:
    Sep 26, 2004
    Messages:
    534
    Likes Received:
    0
    Trophy Points:
    16
    If you're using ASSP (spam filter), then you need to run exim and assp on different ports, not the same port. ASSP acts as a mail proxy, it opens a connection to your mail server when messages come to assp. Your mailserver shouldn't be directly accessible from the outside.

    So what I do, is put this at the top of exim.conf (use the cpanel editor so your changes don't get overwritten every time exim is updated)

    Code:
    local_interfaces = 127.0.0.1.125
    
    That will make Exim listen on the local (loopback) interface, on port 125. (Notice that the port is added to the end with another period before it).

    Then you setup ASSP to listen on port 25, (or port 25 and port 27), and then also configure it to forward the connections to the mailserver on port 125.

    You should be able to find more info on setting up ASSP with cpanel/exim by searching for my other posts on this topic.
     
  7. Haloweb

    Haloweb Well-Known Member

    Joined:
    Jul 2, 2004
    Messages:
    88
    Likes Received:
    0
    Trophy Points:
    6
    Thanks dezignguy

    I had my DC run a test and according to them they could connect
    on a test account they had set up so it seems that perhaps the ISP
    Major South African ISP has possibly blocked all ports for mail except
    25 forcing users to use their SMTP which is extremely unreliable.
     
  8. dezignguy

    dezignguy Well-Known Member

    Joined:
    Sep 26, 2004
    Messages:
    534
    Likes Received:
    0
    Trophy Points:
    16
    If port 25 is blocked for outside networks, then I would use a higher port number... I use port 225 for an alternate port for customers who have isps that block the default smtp port. Many people use port 26 as an alternate port, but I have seen at least a few ISPs block port 26 along with port 25.

    It doesn't particularly matter what port # you use as an alternate port... just so you set it up correctly, and the ISP shouldn't be able to block it.
     
  9. Haloweb

    Haloweb Well-Known Member

    Joined:
    Jul 2, 2004
    Messages:
    88
    Likes Received:
    0
    Trophy Points:
    6
    Thank you - I will try the other ports :)
     
Loading...

Share This Page