1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
|
.\" $OpenBSD: popa3d.8,v 1.11 2004/07/17 20:54:24 brad Exp $
.\"
.\" Copyright (c) 2001-2003 Camiel Dobbelaar (cd@sentia.nl)
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd August 15, 2001
.Dt POPA3D 8
.Os
.Sh NAME
.Nm popa3d
.Nd "Post Office Protocol (POP3) server"
.Sh SYNOPSIS
.Nm
.Op Fl D | V
.Sh DESCRIPTION
.Nm
is a POP3 server.
It offers network access to user mailboxes through the POP3 protocol.
The server uses the
.Tn TCP
protocol
and listens at the port specified in the
.Dq pop3
service specification; see
.Xr services 5 .
.Pp
A POP3 server operates on local mailboxes on behalf of its remote
users.
Users can connect at any time to check their mailbox and fetch the
mail that has accumulated.
The advantage of this ``pull'' approach is that any user with a simple
POP3-capable mail reader program can receive mail, eschewing the need
for a full-fledged Mail Transfer Agent (MTA) and a permanent network
connection.
.Pp
Note that POP3 can only be used to retrieve mail, not to send it.
To send mail, the SMTP protocol is commonly used; see
.Xr sendmail 8 .
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl D
With this option set,
.Nm
will detach and become a daemon, accepting connections on the pop3
port and forking child processes to handle them.
This has lower overhead than starting
.Nm
from
.Xr inetd 8
and is thus useful on busy servers to reduce load.
.Pp
In this mode
.Nm
also does quite a few checks to significantly reduce the impact of
connection flood attacks.
.It Fl V
Show version information and exit.
.Pp
.El
.Pp
Alternatively,
.Nm
can be used through
.Xr inetd 8 .
This requires the following entry to be activated in
.Pa /etc/inetd.conf :
.Pp
.Pa pop3 stream tcp nowait root /usr/sbin/popa3d popa3d
.Pp
or, using
.Xr tcpd 8
for TCP-wrappers access control:
.Pp
.Pa pop3 stream tcp nowait root /usr/libexec/tcpd /usr/sbin/popa3d
.Pp
For access to a mailbox through the POP3 service, the username must
be in the password database.
Additionally,
.Nm
does not permit null passwords and will refuse to serve mail for
root (uid 0) users.
.Sh COMMANDS
A normal POP3 session progresses through three states: authorization,
transaction and update.
.Pp
After the TCP connection opens, the client must authenticate itself
to the server in the authorization state.
The following commands are supported in the authorization state.
All commands are case-insensitive.
.Bl -column "Command " -offset indent
.It Sy Command Ta Sy Description
.It USER name Ta "authenticate as user ``name''"
.It PASS string Ta "authenticate using password ``string''"
.It QUIT Ta "quit; do not enter update state"
.El
.Pp
When authorization is successful, the server enters the transaction
state.
The client can now list and retrieve messages or mark messages for
deletion.
The following commands are supported in the transaction state.
.Bl -column "Command " -offset indent
.It Sy Command Ta Sy Description
.It DELE msg Ta "mark message for deletion"
.It LAST Ta "show highest message number accessed (obsolete)"
.It LIST [msg] Ta "list message number and size"
.It NOOP Ta "do nothing"
.It QUIT Ta "quit; enter update state"
.It RETR msg Ta "retrieve message"
.It RSET Ta "clear deletion marks"
.It STAT Ta "return total number of messages and total size"
.It TOP msg n Ta "show top n lines of message body"
.It UIDL [msg] Ta "list message number and digest"
.El
.Pp
When the client issues the QUIT command in the transaction state,
the server enters the update state.
All messages that were marked for deletion are now removed.
The server then closes the connection.
.Sh FILES
.Bl -tag -width Ds
.It Pa /var/mail
User mail spools
.It Pa /etc/hosts.allow, /etc/hosts.deny
TCP-wrappers access controls may be defined here as described in
.Xr hosts_access 5 .
Valid if
.Nm
is started in daemon-mode, or if
.Nm
is running through
.Xr inetd 8
and is used in combination with
.Xr tcpd 8 .
.El
.Sh SEE ALSO
.Xr inetd 8 ,
.Xr sendmail 8
.Pp
Official Internet Protocol Standard
.%T STD 53 ,
also known as
.%T RFC 1939 .
.Pp
http://www.openwall.com/popa3d/
.Sh HISTORY
.Nm
first appeared in
.Ox 3.0 .
.Sh AUTHORS
Solar Designer
.Aq solar@openwall.com
.Sh CAVEATS
POP3 authenticates using cleartext passwords.
|