ERROR: Slooooow dooooown... this page load was delayed.


squirrelmail - PHP-based webmail ChangeLog

HOWTO


# SquirrelMail 1.4.22
# ===================
# Apache or another web server with PHP

# You may want to peruse the SquirrelMail Administrator's Manual
# before/during/after:
# http://squirrelmail.org/docs/admin/admin.html

# Get it
cd
test -f installed/squirrelmail-webmail-1.4.22.tar.bz2 &&
mv installed/squirrelmail-webmail-1.4.22.tar.bz2 .
test ! -f squirrelmail-webmail-1.4.22.tar.bz2 &&
wget http://downloads.sf.net/squirrelmail/\
squirrelmail-webmail-1.4.22.tar.bz2

# Verify tarball w/ md5sum:
echo "494016b82762e57dca009fd9cc77ac2e  \
squirrelmail-webmail-1.4.22.tar.bz2" | md5sum -c

# Verify tarball w/ sha1sum:
echo "46819275be27e9119e9a2fd976d441cee261ea55  \
squirrelmail-webmail-1.4.22.tar.bz2" | sha1sum -c

# Verify tarball w/ gpg:
( gpg --list-keys C56FE06C 2> /dev/null || gpg --recv-keys C56FE06C ) &&
wget -nc http://www.squirrelmail.org/sums/\
squirrelmail-webmail-1.4.22.tar.bz2.sig &&
  gpg --verify squirrelmail-webmail-1.4.22.tar.bz2.sig &&
   rm squirrelmail-webmail-1.4.22.tar.bz2.sig

# Become root
su

# Back up configuration from old versions of SquirrelMail:
for apachedir in /var/www/htdocs \
/usr/local/apache/htdocs /usr/local/apache2/htdocs;
do
  find $apachedir -type d -name "squirrelmail-*" 2> /dev/null |
  while read smdir;
  do
    mkdir -p -m 0700 ~/backup/apache/$(basename $smdir)
    cp -a $smdir/config/config*.php \
     ~/backup/apache/$(basename $smdir)
  done
done

# Create directories for data and attachments.  Default is
# /var/local/squirrelmail, but since no /var/local, I stick with /var/lib...
test ! -d /var/lib/squirrelmail && mkdir -p /var/lib/squirrelmail
( cd /var/lib/squirrelmail
  test ! -d attach && mkdir -p attach
  test ! -d data && mkdir -p data
  chmod 730 . attach data )

# Make that directory owned by the user/group that runs Apache:
test -d /var/www && chown -R root:apache /var/lib/squirrelmail
test -d /usr/local/apache2 && chown -R root:daemon /var/lib/squirrelmail
test -d /usr/local/apache && chown -R root:nobody /var/lib/squirrelmail

# Instead of doing it as done below, you can also unpack SquirrelMail
# in to /usr/local instead, then use an Apache Alias and Directory
# configuration options to allow access to it.

# Unpack the tarball into your web root:
for apachedir in /var/www /usr/local/apache /usr/local/apache2;
do
  test ! -d $apachedir && continue
  tar xjvf squirrelmail-webmail-1.4.22.tar.bz2 -C ${apachedir}/htdocs/
  test "$apachedir" = "/var/www" &&
   chown -R root:apache ${apachedir}/htdocs/squirrelmail-webmail-1.4.22
  test "$apachedir" = "/usr/local/apache" &&
   chown -R root:nobody ${apachedir}/htdocs/squirrelmail-webmail-1.4.22
  test "$apachedir" = "/usr/local/apache2" &&
   chown -R root:daemon ${apachedir}/htdocs/squirrelmail-webmail-1.4.22
  chmod -R o-rwx ${apachedir}/htdocs/squirrelmail-webmail-1.4.22
  test -L ${apachedir}/htdocs/squirrelmail &&
   rm ${apachedir}/htdocs/squirrelmail
  test -d ${apachedir}/htdocs/squirrelmail &&
   mv -f ${apachedir}/htdocs/squirrelmail \
    ${apachedir}/htdocs/squirrelmail.old
  ln -sf ${apachedir}/htdocs/squirrelmail-webmail-1.4.22 \
   ${apachedir}/htdocs/squirrelmail
done

# Make sure Apache is configured to allow symlinks in htdocs (or
# remove the symlink and rename squirrelmail-webmail-1.4.22 to squirrelmail,
# or do it the Alias/Directory way)

# Set Apache to allow .htaccess files under the squirrelmail directory.
# With Apache 2.x, you can add an extra config file for it, and add a
# line to httpd.conf to include it.
# /usr/local/apache2/conf/extra/httpd-squirrelmail.conf
# <Directory /usr/local/apache2/htdocs/squirrelmail>
#   AllowOverride AuthConfig Limit
# </Directory>
# (and restart it for the change to take effect)

# If you're upgrading it, go here for some info:
# http://squirrelmail.org/docs/admin/admin-4.html

# Run the (interactive) configuration script:
for apachedir in /var/www /usr/local/apache /usr/local/apache2;
do
  test ! -d $apachedir && continue
  cd ${apachedir}/htdocs/squirrelmail/config
  ./conf.pl
done

# Go here with a web browser:
# http://hostyouinstallediton.foo.org/squirrelmail/src/configtest.php

# Set up a cron job to clean up old files from /var/lib/squirrelmail/attach:
find /var/lib/squirrelmail/attach -type f -mtime +1 -exec rm {} \;

# Next, I would suggest tightening up the permissions of the files in
for apachedir in /var/www /usr/local/apache /usr/local/apache2;
do
  test ! -d $apachedir && continue
  cd ${apachedir}/htdocs/squirrelmail
  chown root:root README configure src/configtest.php
  chmod 600 README configure src/configtest.php
done

# Become yourself again
exit

# Save the tarball for later
cd
mkdir -p -m 0700 installed
rm -f installed/squirrelmail-webmail-*.tar.*
mv squirrelmail-webmail-1.4.22.tar.bz2 installed/

# When everything is done, go here to use it:
# http://hostyouinstallediton.foo.org/squirrelmail/


# SquirrelMail IMAP Proxy 1.2.7
# =============================
# This is pretty much just re-packaged up-imapproxy

# Prerequisites:
# tcp wrappers (optional)
# OpenSSL
# ncurses

# Get it
cd
test -f installed/squirrelmail-imap_proxy-1.2.7.tar.bz2 &&
mv installed/squirrelmail-imap_proxy-1.2.7.tar.bz2 .
test ! -f squirrelmail-imap_proxy-1.2.7.tar.bz2 &&
wget http://downloads.sf.net/squirrelmail/\
squirrelmail-imap_proxy-1.2.7.tar.bz2

# Verify tarball w/ md5sum:
echo "c46524414a2375310557686e723bd120  \
squirrelmail-imap_proxy-1.2.7.tar.bz2" | md5sum -c

# Verify tarball w/ sha1sum:
echo "58fed946eb61b9a42ac7d9f16abe10278268d3ee  \
squirrelmail-imap_proxy-1.2.7.tar.bz2" | sha1sum -c

# Verify tarball w/ gpg:
( gpg --list-keys C56FE06C 2> /dev/null || gpg --recv-keys C56FE06C ) &&
wget -nc http://www.squirrelmail.org/sums/\
squirrelmail-imap_proxy-1.2.7.tar.bz2.sig &&
  gpg --verify squirrelmail-imap_proxy-1.2.7.tar.bz2.sig &&
   rm squirrelmail-imap_proxy-1.2.7.tar.bz2.sig

# Extract it
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "squirrelmail-imap_proxy-*" -exec rm -r {} \;
tar xjvf ~/squirrelmail-imap_proxy-1.2.7.tar.bz2
cd squirrelmail-imap_proxy-1.2.7
test $UID = 0 && chown -R root:root .

# If your OpenSSL is installed under the usual source-installed location
# of /usr/local/ssl, pass --with-openssl=/usr/local/ssl to configure,
# otherwise just running configure should be enough

# Configure and build it
./configure --with-openssl=/usr/local/ssl
make

# Become root
su

# Install a sample configuration file
# ('make install-conf' uses root:bin and 0644, I prefer root:root and 0600)
test ! -f /etc/imapproxy.conf &&
install -m 0600 ./scripts/imapproxy.conf /etc/

# If your basename binary is in /usr/bin and not in /bin (sometimes
# there's a symlink from one to the other), fix it's path in the
# sample init script.  Not necessary if yours is in /bin/basename or
# you have a symlink there pointing to the real binary.
cat scripts/imapproxy.init | sed 's|/bin/basename|/usr/bin/basename|' \
> scripts/imapproxy.init.new
test -s scripts/imapproxy.init.new &&
( mv -f scripts/imapproxy.init scripts/imapproxy.init.old
   mv -f scripts/imapproxy.init.new scripts/imapproxy.init )

# When you set up SquirrelMail IMAP Proxy to start on boot-up, if it will
# be running on the same host that the IMAP server is, make sure it starts
# after the IMAP server does.
#
# EITHER copy the sample init script to /etc/rc.d/rc.imapproxy:
cp scripts/imapproxy.init /etc/rc.d/rc.imapproxy
chmod 700 /etc/rc.d/rc.imapproxy
rm -f /etc/rc.d/init.d/imapproxy /etc/rc.d/rc?.d/S99imapproxy \
/etc/rc.d/rc?.d/K10imapproxy
# then add something to rc.local to start it like this:
# # SquirrelMail IMAP Proxy
# if [ -x /etc/rc.d/rc.imapproxy ]; then
#   /etc/rc.d/rc.imapproxy start
# fi
#
# ...OR set it up the SysV-init way:
install -m 0755 ./scripts/imapproxy.init /etc/rc.d/init.d/imapproxy
for rl in 2 3 4 5; do
  test ! -d /etc/rc.d/rc${rl}.d && mkdir -p /etc/rc.d/rc${rl}.d
  ( cd /etc/rc.d/rc${rl}.d ; ln -sf ../init.d/imapproxy S99imapproxy )
done
( cd /etc/rc.d/rc0.d ; ln -sf ../init.d/imapproxy K10imapproxy )
( cd /etc/rc.d/rc6.d ; ln -sf ../init.d/imapproxy K10imapproxy )
rm -f /etc/rc.d/rc.imapproxy

# Create a user and group for the proxy server to run as:
getent group | grep "^imapproxy:" > /dev/null 2>&1 || groupadd imapproxy
id imapproxy > /dev/null 2>&1 || useradd -g imapproxy imapproxy

# Create the empty chroot directory if not already there (openssh commonly
# uses the same one):
test ! -d /var/empty && install -d -o root -g sys /var/empty

## If you installed imapproxy for the first time, you'll find a heavily
## commented imapproxy.conf in /etc.  Here's an example of one that I'm using
## for a server that has IMP running on it for webmail:
# server_hostname localhost
# cache_size 3072
# listen_port 1143
# server_port 143
# cache_expiration_time 300
# proc_username imapproxy
# proc_groupname imapproxy
# stat_filename /var/run/pimpstats
# protocol_log_filename /var/log/imapproxy_protocol.log
# syslog_facility LOG_MAIL
# send_tcp_keepalives no
# enable_select_cache no
# foreground_mode no
# force_tls no
# chroot_directory /var/empty
# enable_admin_commands no
#
# Then you set up the client (SquirrelMail, IMP, RoundCube, whatever) to
# connect to localhost:1143

## If you want 'imapproxy' to show up in 'netstat -l' output, add a line
## like this to /etc/services:
# imapproxy       1143/tcp

# Actually install in.imapproxyd and pimpstat
make install

# If this was an upgrade, stop the running imapproxy:
test -x /etc/rc.d/init.d/imapproxy && /etc/rc.d/init.d/imapproxy stop
test -x /etc/rc.d/rc.imapproxy && /etc/rc.d/rc.imapproxy stop

# (re-)Start it:
test -x /etc/rc.d/init.d/imapproxy && /etc/rc.d/init.d/imapproxy start
test -x /etc/rc.d/rc.imapproxy && /etc/rc.d/rc.imapproxy start

# If you have stat_filename set in your config file, you can now run
# /usr/local/sbin/pimpstat to monitor connections to it

# If you have logrotate, set it to rotate the log file:
cat << EOF > /etc/logrotate.d/imapproxy
/var/log/imapproxy_protocol.log {
    rotate 6
    daily
    notifempty
}
EOF

# Make sure your non-root user can remove the source later
chown -R $(logname) .
chmod -R u+w .

# Become yourself again
exit

# Save the tarball for later
cd
mkdir -p -m 0700 installed
rm -f installed/squirrelmail-imap_proxy-*.tar.*
mv squirrelmail-imap_proxy-1.2.7.tar.bz2 installed/

List of HOWTOs

Web page itself last updated: 2023-12-20 8:06pm (EST -0500)
HOWTO last updated: 2013-09-03 10:02pm
Copyright © 2001-2024 Jason Englander. All Rights reserved.
[HTML5]