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.
# 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
Port | port number |
Hostname | my hostname |
ConnectionKeepTime | maximum connection keep time |
CommandTimeout | maximum time waiting command |
WithInetd | set true if using inetd |
LogFile | log filename (default: not logging) |
ErrorFile | error file (using if WithInetd = true) |
SyslogFacility | syslog facility (default: nil) |
AuthType | authentication type ('Passwd' or 'MySQL') |
MailboxType | mailbox type ('Maildir' or 'MySQL') |
MaildirUseFileSize | set true if using file size as message size |
MaildirExtended | set true if using Maildir++ file size |
PasswdLockDir | directory keeping lock file (when AuthType = 'Passwd') |
When AuthType or MailboxType is 'MySQL', set following parameters.
MySQL_Server | MySQL server hostname |
MySQL_User | MySQL connection user |
MySQL_Pass | MySQL connection password |
MySQL_DB | MySQL database name |
MySQLAuthQuery | select query |
Create database for TPOPS and create table using sql.txt.
% mysqladmin create tpops % mysql tpops < sql.txt
Set WithInetd = true in tpops.conf, and set /etc/inetd.conf:
pop3 stream tcp nowait root /usr/local/tpops/tpops tpops
and kill -HUP
Set WithInetd = false in tpops.conf, run /usr/local/tpops/tpops.
If login name don't include any character of '@','%','+', attempt to authenticate with 'username@domainname'.
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.
Add user information to user table:
uid | user ID (numeric) |
login | POP login name |
passwd | POP password |
mail address | |
maildir | Maildir (if using Maildir) |
Use MTA that support Maildir such as Postfix, qmail.
Entry mail message to msg table:
id | message ID |
uid | user ID |
timestamp | message timestamp |
header | header part |
body | body part |
size | message size |
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.
This program is under Ruby license.
0.4.8 2002-11-20 * Bug fix: don't output username on log when APOP. * Add syslog.