[Japanese page]

TPOPS

TPOPS is POP3 server. This support RFC 1939 and is implemented by Ruby. Supported mailbox type is Maildir. The user account and mail message can be controled by MySQL table.

Download

Requirement

Install

  1. extract tarball.
    # cd /usr/local
    # tar xpvfz /tmp/tpops-0.4.7.tar.gz
    # chown -R root:root tpops-0.4.7
    # ln -s tpops-0.4.7 tpops
    
  2. make tpops.conf. The example and default value are in tpops.conf.sample.
    Portport number
    Hostnamemy hostname
    ConnectionKeepTimemaximum connection keep time
    CommandTimeoutmaximum time waiting command
    WithInetdset true if using inetd
    LogFilelog filename (default: not logging)
    ErrorFileerror file (using if WithInetd = true)
    SyslogFacilitysyslog facility (default: nil)
    AuthTypeauthentication type ('Passwd' or 'MySQL')
    MailboxTypemailbox type ('Maildir' or 'MySQL')
    MaildirUseFileSizeset true if using file size as message size
    MaildirExtendedset true if using Maildir++ file size
    PasswdLockDirdirectory keeping lock file (when AuthType = 'Passwd')

    When AuthType or MailboxType is 'MySQL', set following parameters.

    MySQL_ServerMySQL server hostname
    MySQL_UserMySQL connection user
    MySQL_PassMySQL connection password
    MySQL_DBMySQL database name
    MySQLAuthQueryselect query
  3. If AuthType or MailboxType is 'MySQL'

    Create database for TPOPS and create table using sql.txt.

    % mysqladmin create tpops
    % mysql tpops < sql.txt
    

Start

  1. If using inetd (default)

    Set WithInetd = true in tpops.conf, and set /etc/inetd.conf:

    pop3	stream	tcp	nowait	root	/usr/local/tpops/tpops	tpops

    and kill -HUP .

  2. If not using inetd

    Set WithInetd = false in tpops.conf, run /usr/local/tpops/tpops.

Starting option

Add user

  1. If AuthType is 'Passwd' (default)

    Add user to OS. If MailboxType is 'Maildir' then ~/Maildir is used. If you use APOP, set APOPPasswdFile in tpops.conf. This file is BDB::Hash that key is loginname and value is plain password. If APOP is used, password is searched from this file.

  2. If AuthType is 'MySQL'

    Add user information to user table:

    uiduser ID (numeric)
    loginPOP login name
    passwdPOP password
    mailmail address
    maildirMaildir (if using Maildir)

Entry mail

  1. If MaildirType is 'Maildir' (default)

    Use MTA that support Maildir such as Postfix, qmail.

  2. If MaildirType is 'MySQL'

    Entry mail message to msg table:

    idmessage ID
    uiduser ID
    timestampmessage timestamp
    headerheader part
    bodybody part
    sizemessage size

Log File

If set tpops.conf in tpops.conf, log to file when user logout. log format is:

IPaddr login-date login-time logout-date logout-time login-name login-msgs login-msgsize logout-msgs logout-msgsize

If set SyslogFacility, TPOPS write syslog. SyslogFacility is integer or symbol like Syslog::LOG_MAIL.

License

This program is under Ruby license.

History

0.4.8	2002-11-20
	* Bug fix: don't output username on log when APOP.
	* Add syslog.

TOMITA Masahiro
Last modified: Sat Jan 18 20:26:56 JST 2003