Web Mail


Single IP

Project Links
resume
about me
about server
user land
webmail

Photo Albums
bpfountz
lpfountz
twice DIGITAL

Web Pages
bpfountz
lpfountz

Reviews
3054CB
Netgate Q&A
5354AP1 Aries2

You are visiting...
The DigitalPimp


created by:
 Ben Pfountz
Untitled Document
Setting Up sqwebmail

FreeBSD 4.10-STABLE

The Digitalpimp Collection

Ben Pfountz

December 29, 2004

 

Note: This ports requires many other ports as prerequesites.

 

Install ispell from ports:

cd /usr/ports/textproc/ispell

make install

make clean

 

Install expect from ports:

cd /usr/ports/lang/expect

make install WITHOUT_X11=yes

make clean

 

Install gpgme for security/encryption from ports:

cd /usr/ports/security/gpgme

make install

make clean

 

Install courier-authlib from ports:

cd /usr/ports/mail/courier-authlib

make install

make clean

 

 

Install maildrop from source:

download, unzip, and change into the source directory

./configure --enable-syslog=1

check maildrop/config.h, and set DEFAULT_DEF=./Maildir

gmake

gmake install-strip

gmake install-man

 

enable filtering in sqwebmail:

create the file maildirfilterconfig in each user's Maildir, and put in it:

MAILDIRFILTER=../.mailfilter

MAILDIR=./Maildir

 

enable filtering in qmail:

create the file .qmail in each user's home directory, and put in it:

| /usr/local/bin/maildrop

 

Install courier-authlib:

Download, unzip, and change into the source directory.

As a regular user, run the following commands:

./configure

gmake

gmake install

gmake install-migrate

gmake install-configure

 

 

Remove old sqwebmail:

/bin/rm -Rf /usr/local/www/webmail/cgi-bin/*
/bin/rm -Rf /usr/local/www/webmail/imagedir/*
/bin/rm -Rf /usr/lib/sqwebmail

 

Install sqwebmail:

download, unzip, and change into the source directory

as a regualr user run the following commands:

./configure \
--enable-imagedir=/usr/local/www/webmail/imagedir/ \
--enable-cgibindir=/usr/local/www/webmail/cgi-bin/ \
--with-ispell=/usr/local/bin/ispell \
--enable-https \
--enable-softtimeout=3600 \
--without-authmysql \
--with-maxargsize=10485760 \
--with-maxformargsize=10485760 \
--with-maxmsgsize=10485760 \
--enable-autopurge=0 \
--with-calendarpurge=3650 \
--with-trashquota \
--enable-bannerprog=/usr/home/bpfountz/projects/digitalpimp/webmail_msg \
--with-syslog=MAIL

gmake configure-check

gmake

gmake check

su to root and run the following commands:

gmake install-strip

gmake install-configure

 

Add the following lines to /etc/pam.conf

webmail auth required pam_unix.so try_first_pass
webmail account required pam_unix.so  
webmail account required pam_permit.so  

 

Restore the startup authentication script:

/usr/local/etc/rc.d/webmail.sh

Note: You can just hack one out, as long as it runs /usr/lib/sqwebmail/libexec/sqwebmaild.rc with 'start' and 'stop' as parameters.

 

check /usr/local/etc/authlib/authdaemonrc, set daemons=2

 

restore /usr/local/www/webmail/imagedir/index.php:

<?
header( "Location: /webmail/cgi-bin/sqwebmail");
?>

 

Configure apache with correct webmail paths (put just below the /cgi-bin/ alias):

# The script alias for webmail access
#
ScriptAlias /webmail/cgi-bin/ "/usr/local/www/webmail/cgi-bin/"
<Directory "/usr/local/www/webmail/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
Alias /webmail/ "/usr/local/www/webmail/imagedir/"
<Directory "/usr/local/www/webmail">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

 

Rewrite /usr/local/share/sqwebmail/sendit.sh to remove @digitalpimp.princenet from Return_Path

#!/usr/local/bin/ksh

#
# strip the domain from the 'rcptto' field
#
eval "/usr/bin/sed 's/@[^ >]*/@ben.pfountz.com/' |&"
print -p $1
exec 3>&p;exec 3>&-
read -p user

#
# send the mail
#
exec /var/qmail/bin/qmail-inject -f "$user"

chmod the above script to a+x

 

To enable encryption for each user, from each user's home directory, type

/usr/lib/sqwebmail/share/sqwebmail/webgpg /usr/home/[homedir]/Maildir

 

Note: be careful with restoring the permissions on the above files.

 

Enable calendaring

create the file calendarmode in the configuration directory (/usr/local/share/sqwebmail)
The calendarmode file should contain a single word: either of the following 2 words

"local" - enable account calendaring

"net" - enable calendaring in groupware mode.

restart sqwebmail via sqwebmail.sh

 

 

 

THE FOLLOWING IS UNTESTED IN VERSION 5.0.0


Update your scripts to allow for password changing...

restore the following files:

/usr/local/share/sqwebmail/libexec/authlib/authsystem.passwd

/usr/local/share/sqwebmail/libexec/authlib/whoamit


 

Install Notes
a7v bios
os notes
os install
kernel cfg
ports update
vinum
soft updates
quotas
public pmsns
firewall
named
ppp
dhcpd
samba
apache+modssl
mod_php5
proftpd
qmail
blackhole
courier-imap
shared-folders
sqwebmail
skeleton
dependencies
nut
automount
net-snmpd
mrtg
system update
system config
formt floppy
wireless IPsec
bdes cdrw's
MySQL
Cert Auth
CPES AD 1
CPES AD 2
CPES Grp Plcy
AD1 <-> AD2
AD Reference