	Installing tpop3d 1.5.x on FreeBSD and intergrating with vexim2.


TPOP3D is a very advanced POP3 server written by Chris Lightfoot and
is homed at http://www.ex-parrot.com/~chris/tpop3d.

The intention of tpop3d developers has been to write a server which is
fast, extensible, and secure. tpop3d supports traditional (BSD-format)
mailspools and Maildir. It also supports MySQL, perl, and external
authentication methods. Recently tpop3d has been extended to support
SSL, besides bulletins.

NB: The configuration below is used on a production box which has over
20,000 pop accounts and runs pretty well. You can tune it to match your
requirements.

-Odhiambo Washington [wash@wananchi.it], 20031107.


      This HOWTO describes the steps you will take to install tpop3d on
      FreeBSD (4.x/5.x) and intergrate it with vexim2.

      cd /usr/ports/mail/tpop3d && make install clean
      cd /usr/local/etc
      cp tpop3d.conf.dist tpop3d.conf
      vi tpop3d.conf

     Apart from the other specifications, your tpop3d.conf should contain::
	listen-address: a.b.c.d:110(server.name.tld)
	max-children: 30
	log-bad-passwords: true
	append-domain: true
	timeout-seconds: 600
	log-stderr: false
	no-detach: false
	mailbox: maildir:$mailstore/$(domain)/$(user)/Maildir
	auth-pam-enable: yes
	auth-pam-mail-group: $gid from variables.php 
	auth-mysql-enable: true
	auth-mysql-mail-group: $gid from variables.php
	auth-mysql-hostname: HOSTNAME_OF_SQL_SERVER
	auth-mysql-database: vexim_db_name
	auth-mysql-username: vexim_db_username
	auth-mysql-password: vexim_db_password
	auth-mysql-pass-query: SELECT CONCAT(pop,'/Maildir'),CONCAT('{crypt}', users.crypt),\
                       users.uid,'maildir' FROM users WHERE username='$(local_part)@$(domain)'     
      Finally, perform these steps to move the startup scripts into
      place, and start the daemons:
      cd /usr/local/etc/rc.d
      mv tpop3d.sh.dist tpop3d.sh
      /usr/local/etc/rc.d/tpop3d.sh start

    Of course your MySQL server should be running already.

Enjoy!!
