I am trying to bring up squirrelmail using tomcat. I would like know if that is possible at all. This is because i already have tomcat running on that server for my application. Ido not want to start an apache server just for squirrelmail. PLease suggest if there is any documentation on this. I have googled a lot and could not find a solution.

In short my question is how to configure squirrelmail with tomcat


PHP/Java Bridge is what you're looking for.

  1. Download the JavaBridgeTemplate621.war file, and drop it into your Tomcat’s webapps directory. If unpackWARs="true" autoDeploy="true" is set in conf/server.xml, this file will be unpack automatically.

    Access to http://domain.com:8080/JavaBridgeTemplate621/test.php to see if it shows your phpinfo().

  2. Download SquirrelMail to /usr/share/tomcat6/webapps/JavaBridgeTemplate621 directory, copy the config file cp config/config_default.php config/config.php and then browse to http://domain.com:8080/JavaBridgeTemplate621/squirrelmail-webmail-1.4.22.

Good luck.

  • I am getting the following exception on the browser. java.io.IOException: PHP not found. Please install php-cgi. PHP test command was: [php-cgi, -v] php.java.bridge.Util$Process.start(Util.java:1145) php.java.servlet.fastcgi.FCGIProcess.start(FCGIProcess.java:68) php.java.bridge.http.SocketChannelFactory.doBind(SocketChannelFactory.java:125) php.java.bridge.http.FCGIConnectionFactory.runFcgi(FCGIConnectionFactory.java:88) php.java.bridge.http.FCGIConnectionFactory$1.run(FCGIConnectionFactory.java:109) – user1241438 Sep 15 '12 at 2:57
  • Which distro are you using? – quanta Sep 15 '12 at 3:02
  • when you distro you mean PHP/Java bridge? – user1241438 Sep 15 '12 at 3:06
  • I mean the operating system, if Linux, which distribution? – quanta Sep 15 '12 at 3:07
  • INFO: Deploying web application archive /opt/apps/apache-tomcat-7.0.30/webapps/javabridge.war Fatal Error: Failed to start PHP [php-cgi, -v], reason: java.io.IOException: Cannot run program "php-cgi" (in directory "/root"): error=2, No such file or directory Could not start FCGI server: java.io.IOException: PHP not found. Please install php-cgi. PHP test command was: [php-cgi, -v] Timeout waiting for PHP FastCGI daemon php.java.bridge.http.FCGIConnectException: Could not connect to server – user1241438 Sep 15 '12 at 3:08

Each webmail need to 5 things :

  1. MTA hostname
  2. MDA port number such as 143
  3. Your protocol of course webmails uses imap.
  4. SMTP hostname
  5. SMTP port number such as 25.

Please consider type of authentication , For example , Do you have SSL, TLS , plain text. It's doesn't related to tomcat or apache.

  • i guess my question is how to configure squirrelmail with tomcat – user1241438 Sep 14 '12 at 2:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.