Hello,

I thought I'd let the people here know how to speed up webmail,
regardless of the templates used. This eliminates the problem where you
are forced to use a nonstandard (other than 80) port for webmail because
you need 80 for other stuff.

The idea:

-Setup webmail on any port desired (8080 here) and optionally blocking
external access to that port.
-Setup Apache with mod_proxy, mod_gzip & mod_expires.
-Determine the external ip address to use by the users.

I use this config in httpd.conf:

<VirtualHost [external IP address]>
  CustomLog "|z:/bin/apache/bin/custrotate.exe z:/tmp/logs/accessprx
21600" combined
  ProxyPass / http://localhost:8080/ ## can be another box too, so
apache & imail don't have to be on the same box
  ProxyPassReverse / http://localhost:8080/
  CacheDefaultExpire 0.1
  CacheRoot z:/tmp/proxycache
  CacheGcInterval 1.5
  CacheSize 15000
  <Location />
    <IfModule mod_gzip.c>
      mod_gzip_on Yes
      mod_gzip_minimum_file_size  750
      mod_gzip_maximum_file_size  0
      mod_gzip_maximum_inmem_size 500000
      mod_gzip_item_include mime .*/.*
      mod_gzip_item_exclude mime image/.*
      mod_gzip_dechunk yes
      mod_gzip_temp_dir z:/tmp
      mod_gzip_keep_workfiles No
    </IfModule> 
    ExpiresActive On
    ExpiresByType image/gif "access plus 15 days"
  </Location>
</VirtualHost>


You get this:

-Webmail is accessible on [external IP address]:80, without taking port
80 on other IP's.
-All images are cached on first hit and then served from apache (fast)
instead of the crappy imail webserver (slow).
-All html output (also all dynamic pages) is compressed using gzip. All
major browsers support this, and if it isn't supported it won't be
compressed. It's totally transparent to the user and it will have a
compression ratio of an average 70% -> major speed improvement.
-Images will remain in the users cache for 15 days, instead of being
retrieved every time.

I suggest that if you want to try this out you don't do it in a
production environment and that you know how Apache works, or you'll end
up with an open forward proxy for all h4x0rz to use.

But if you get it right and you have a large userbase it it worth the
trouble.

-- 
Regards,

Terrence Koeman

Technical Director/Administrator
MediaMonks B.V. (www.mediamonks.nl)

Please quote all replies in correspondence.

Attachment: smime.p7s
Description: application/pkcs7-signature

Reply via email to