Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: closing port 25

  1. #1
    Join Date
    Aug 2008
    Posts
    7
    Rep Power
    7

    Default closing port 25

    I want to disable port 25 on my server, but doing that will prevent sending out emails from webmail. Is there any way to work around?

    Thank you.

  2. #2
    Join Date
    Aug 2007
    Location
    Pune, India
    Posts
    46
    Rep Power
    8

    Default

    I am not sure the entire process to achive the goal, but I think modifying zimbraSmtpPort will help you.

    su - zimbra
    zmprov gs `zmhostname` |grep zimbraSmtpPort

    You can modify it with:
    zmprov ms `zmhostname` zimbraSmtpPort "<value>"

    Or empty it:
    zmprov ms `zmhostname` zimbraSmtpPort ""

    zmcontrol stop
    zmcontrol start
    - Irfan




  3. #3
    Join Date
    Aug 2008
    Posts
    7
    Rep Power
    7

    Default

    It's not working. Error appears right after changing the port

    2008-08-24 19:09:34,974 WARN [btpool0-7] [name=sender@domain.com;mid=64;ip=<my-ip-here>;ua=ZimbraWebClient - FF3.0 (Mac)/5.0.4_GA_2101.RHEL4;] smtp - exception occurred during SendMsg
    com.zimbra.cs.mailbox.MailSender$SafeMessagingExce ption: Connection refused; chained exception is:
    java.net.ConnectException: Connection refused
    at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTra nsport.java:1378)
    at com.sun.mail.smtp.SMTPTransport.protocolConnect(SM TPTransport.java:399)
    at javax.mail.Service.connect(Service.java:275)
    at javax.mail.Service.connect(Service.java:156)
    at javax.mail.Service.connect(Service.java:105)
    at javax.mail.Transport.send0(Transport.java:168)
    at javax.mail.Transport.send(Transport.java:98)
    at com.zimbra.cs.mailbox.MailSender.sendMessage(MailS ender.java:445)
    at com.zimbra.cs.mailbox.MailSender.sendMimeMessage(M ailSender.java:249)
    at com.zimbra.cs.mailbox.MailSender.sendMimeMessage(M ailSender.java:115)
    at com.zimbra.cs.service.mail.SendMsg.doSendMessage(S endMsg.java:184)
    at com.zimbra.cs.service.mail.SendMsg.handle(SendMsg. java:150)
    at com.zimbra.soap.SoapEngine.dispatchRequest(SoapEng ine.java:391)
    at com.zimbra.soap.SoapEngine.dispatch(SoapEngine.jav a:250)
    at com.zimbra.soap.SoapEngine.dispatch(SoapEngine.jav a:156)
    at com.zimbra.soap.SoapServlet.doPost(SoapServlet.jav a:266)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:727)
    at com.zimbra.cs.servlet.ZimbraServlet.service(Zimbra Servlet.java:177)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:820)
    at org.mortbay.jetty.servlet.ServletHolder.handle(Ser vletHolder.java:487)
    at org.mortbay.jetty.servlet.ServletHandler$CachedCha in.doFilter(ServletHandler.java:1093)
    at org.mortbay.servlet.UserAgentFilter.doFilter(UserA gentFilter.java:81)
    at org.mortbay.servlet.GzipFilter.doFilter(GzipFilter .java:132)
    at org.mortbay.jetty.servlet.ServletHandler$CachedCha in.doFilter(ServletHandler.java:1084)
    at org.mortbay.jetty.servlet.ServletHandler.handle(Se rvletHandler.java:360)
    at org.mortbay.jetty.security.SecurityHandler.handle( SecurityHandler.java:216)
    at org.mortbay.jetty.servlet.SessionHandler.handle(Se ssionHandler.java:181)
    at org.mortbay.jetty.handler.ContextHandler.handle(Co ntextHandler.java:716)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebA ppContext.java:406)
    at org.mortbay.jetty.handler.ContextHandlerCollection .handle(ContextHandlerCollection.java:211)
    at org.mortbay.jetty.handler.HandlerCollection.handle (HandlerCollection.java:114)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(Ha ndlerWrapper.java:139)
    at org.mortbay.jetty.handler.RewriteHandler.handle(Re writeHandler.java:176)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(Ha ndlerWrapper.java:139)
    at org.mortbay.jetty.Server.handle(Server.java:313)
    at org.mortbay.jetty.HttpConnection.handleRequest(Htt pConnection.java:506)
    at org.mortbay.jetty.HttpConnection$RequestHandler.co ntent(HttpConnection.java:844)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser. java:644)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpPa rser.java:211)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnec tion.java:381)
    at org.mortbay.io.nio.SelectChannelEndPoint.run(Selec tChannelEndPoint.java:396)
    at org.mortbay.thread.BoundedThreadPool$PoolThread.ru n(BoundedThreadPool.java:442)
    2008-08-24 19:09:34,975 INFO [btpool0-7] [name=sender@domain.com;mid=64;ip=<my-ip-here>;ua=ZimbraWebClient - FF3.0 (Mac)/5.0.4_GA_2101.RHEL4;] SoapEngine - handler exception
    com.zimbra.common.service.ServiceException: system failure: MessagingException
    ExceptionId:btpool0-7:1219630174975:64f2a37572bf6470
    Code:service.FAILURE
    at com.zimbra.common.service.ServiceException.FAILURE (ServiceException.java:253)
    at com.zimbra.cs.mailbox.MailSender.sendMimeMessage(M ailSender.java:325)
    at com.zimbra.cs.mailbox.MailSender.sendMimeMessage(M ailSender.java:115)
    at com.zimbra.cs.service.mail.SendMsg.doSendMessage(S endMsg.java:184)
    at com.zimbra.cs.service.mail.SendMsg.handle(SendMsg. java:150)
    at com.zimbra.soap.SoapEngine.dispatchRequest(SoapEng ine.java:391)
    at com.zimbra.soap.SoapEngine.dispatch(SoapEngine.jav a:250)
    at com.zimbra.soap.SoapEngine.dispatch(SoapEngine.jav a:156)
    at com.zimbra.soap.SoapServlet.doPost(SoapServlet.jav a:266)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:727)
    at com.zimbra.cs.servlet.ZimbraServlet.service(Zimbra Servlet.java:177)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:820)
    at org.mortbay.jetty.servlet.ServletHolder.handle(Ser vletHolder.java:487)
    at org.mortbay.jetty.servlet.ServletHandler$CachedCha in.doFilter(ServletHandler.java:1093)
    at org.mortbay.servlet.UserAgentFilter.doFilter(UserA gentFilter.java:81)
    at org.mortbay.servlet.GzipFilter.doFilter(GzipFilter .java:132)
    at org.mortbay.jetty.servlet.ServletHandler$CachedCha in.doFilter(ServletHandler.java:1084)
    at org.mortbay.jetty.servlet.ServletHandler.handle(Se rvletHandler.java:360)
    at org.mortbay.jetty.security.SecurityHandler.handle( SecurityHandler.java:216)
    at org.mortbay.jetty.servlet.SessionHandler.handle(Se ssionHandler.java:181)
    at org.mortbay.jetty.handler.ContextHandler.handle(Co ntextHandler.java:716)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebA ppContext.java:406)
    at org.mortbay.jetty.handler.ContextHandlerCollection .handle(ContextHandlerCollection.java:211)
    at org.mortbay.jetty.handler.HandlerCollection.handle (HandlerCollection.java:114)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(Ha ndlerWrapper.java:139)
    at org.mortbay.jetty.handler.RewriteHandler.handle(Re writeHandler.java:176)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(Ha ndlerWrapper.java:139)
    at org.mortbay.jetty.Server.handle(Server.java:313)
    at org.mortbay.jetty.HttpConnection.handleRequest(Htt pConnection.java:506)
    at org.mortbay.jetty.HttpConnection$RequestHandler.co ntent(HttpConnection.java:844)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser. java:644)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpPa rser.java:211)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnec tion.java:381)
    at org.mortbay.io.nio.SelectChannelEndPoint.run(Selec tChannelEndPoint.java:396)
    at org.mortbay.thread.BoundedThreadPool$PoolThread.ru n(BoundedThreadPool.java:442)
    Caused by: com.zimbra.cs.mailbox.MailSender$SafeMessagingExce ption: Connection refused; chained exception is:
    java.net.ConnectException: Connection refused
    at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTra nsport.java:1378)
    at com.sun.mail.smtp.SMTPTransport.protocolConnect(SM TPTransport.java:399)
    at javax.mail.Service.connect(Service.java:275)
    at javax.mail.Service.connect(Service.java:156)
    at javax.mail.Service.connect(Service.java:105)
    at javax.mail.Transport.send0(Transport.java:168)
    at javax.mail.Transport.send(Transport.java:98)
    at com.zimbra.cs.mailbox.MailSender.sendMessage(MailS ender.java:445)
    at com.zimbra.cs.mailbox.MailSender.sendMimeMessage(M ailSender.java:249)
    ... 33 more

  4. #4
    Join Date
    Aug 2007
    Location
    Pune, India
    Posts
    46
    Rep Power
    8

    Default

    You need to set the zimbraSmtpPort to some value and make the smtp listen on that port. Like if you want to disable port 25 on Zimbra, you should change the postfix listening port and change that in above command as well.
    - Irfan




  5. #5
    Join Date
    Aug 2008
    Posts
    7
    Rep Power
    7

    Default

    Here are what I have done

    1. use zimbraSmtpPort changes port to 2525

    2. edit master.cf, change
    smtp inet n - n - - smtpd
    to
    2525 inet n - n - - smtpd

    3. close port 25, open port 2525 on firewall
    4. restart zmcontrol

    After that, I cannot receive emails from outside, such as Yahoo, Gmail, etc. Did I do wrong way? Please advice

    Thank you.

  6. #6
    Join Date
    Aug 2007
    Location
    Pune, India
    Posts
    46
    Rep Power
    8

    Default

    Do u get a bounceback on yahoo or google? Does the email reach your server? Can you check /var/log/zimbra.log if that email even reached Zimbra server?
    - Irfan




  7. #7
    Join Date
    Aug 2008
    Posts
    7
    Rep Power
    7

    Default

    No, the messages didn't reach to Zimbra server. They were queued on yahoo, google mail servers, and after I switched back to port 25, all messages were delivered after few minutes.

    Please pay attention that I have waited for few hours when switching to port 2525, not only few minutes.

    Thanks.

  8. #8
    Join Date
    May 2006
    Location
    England.
    Posts
    927
    Rep Power
    10

    Default

    Wouldnt the MX record for the domain need to know the new port also? I mean the data is being sent to port 25 at your IP address so if you close port 25 the traffic cannot be recieved?

    I'm likely missing the point here but I thought that changing the port in this way would only work for outbound mail, not inbound.

    Would a better question be to ask why you need to change the port, as there may be a better solution?

  9. #9
    Join Date
    Aug 2008
    Posts
    7
    Rep Power
    7

    Default

    Customer doesn't want to enable port 25 completely. So, I am trying to find out a method to replace port 25 by another port.

    Thanks.

  10. #10
    Join Date
    Aug 2007
    Location
    Pune, India
    Posts
    46
    Rep Power
    8

    Default

    You should can disable port 25 on zimbra. But u also need to configure another box which listens on 25 and forward emails to zimbra on modified port. I dont think that makes much difference.

    Another solution you can try is to configure submission on zimbra postfix, which makes portfix listen on two ports i.e. 587 and 25. And set several restrictions on 587. Many ISPs lock down 25 outbound so their customers can't connect to port 25 on anybody else's servers. I am not sure if you are looking for this.

    Racker Hacker » Enable submission port 587 in Postfix
    - Irfan




Similar Threads

  1. initializing ldap...FAILED(256)ERROR
    By manjunath in forum Installation
    Replies: 39
    Last Post: 06-07-2013, 10:27 AM
  2. zmclamdctl is not running after upgrade
    By Darren in forum Installation
    Replies: 24
    Last Post: 10-10-2008, 09:10 AM
  3. [SOLVED] Build Zimbra..a little problem...
    By Abdelmonam Kouka in forum Developers
    Replies: 33
    Last Post: 05-22-2008, 05:10 AM
  4. Error 256 on Installation
    By RuinExplorer in forum Installation
    Replies: 5
    Last Post: 10-19-2006, 09:19 AM
  5. Getting problems in FC4 while instalation
    By kitty_bhoo in forum Installation
    Replies: 13
    Last Post: 09-12-2006, 10:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •