]> git.lizzy.rs Git - plan9front.git/blob - sys/man/8/smtp
/sys/man/*/*: fix perms (sorry)
[plan9front.git] / sys / man / 8 / smtp
1 .TH SMTP 8
2 .SH NAME
3 smtp, smtpd \-  mail transport
4 .SH SYNOPSIS
5 .in +0.5i
6 .ti -0.5i
7 .B upas/smtp
8 [
9 .B -aAdfipst
10 ] [
11 .B -b
12 .I busted-mx
13 ] ... [
14 .B -g
15 .I gateway
16 ] [
17 .B -h
18 .I host
19 ] [
20 .B -u
21 .I user
22 ] [
23 .BI . domain
24 ]
25 .I destaddr
26 .I sender
27 .I rcpt-list
28 .in -0.5i
29 .PP
30 .in +0.5i
31 .ti -0.5i
32 .B upas/smtpd
33 [
34 .B -adDfrg
35 ] [
36 .B -c
37 .I certfile
38 ] [
39 .B -h
40 .I mydom
41 ] [
42 .B -k
43 .I evilipaddr
44 ] [
45 .B -m
46 .I mailer
47 ] [
48 .B -n
49 .I netdir
50 ]
51 .in -0.5i
52 .SH DESCRIPTION
53 .I Smtp
54 sends the mail message from standard input
55 to the users
56 .I rcpt-list
57 on the host at network address
58 .I address
59 using the Simple Mail Transfer Protocol.
60 The options are:
61 .TF -
62 .PD
63 .TP
64 .B -a
65 if the server supports PLAIN or LOGIN authentication,
66 authenticate to the server using a password from
67 .IR factotum (4).
68 See RFCs 3207 and 2554.
69 This option implies
70 .BR -s .
71 .TP
72 .B -A
73 autistic server: don't wait for an SMTP greeting banner
74 but immediately send a
75 .L NOOP
76 command to provoke the server into responding.
77 .TP
78 .B -b
79 ignore
80 .I busted-mx
81 when trying MX hosts.
82 May be repeated.
83 .TP
84 .B -d
85 turn on debugging to standard error.
86 .TP
87 .B -f
88 just filter the converted message to standard
89 output rather than sending it.
90 .TP
91 .B -g
92 makes
93 .I gateway
94 the system to pass the message to if
95 .I smtp
96 can't find an address nor MX entry for the destination system.
97 .TP
98 .B -h
99 use
100 .I host
101 as the local system name;
102 it may be fully-qualified or not.  If not
103 specified, it will default to the contents of
104 .BR /dev/sysname .
105 .TP
106 .B -i
107 under
108 .BR -a ,
109 authenticate even if we can't start TLS.
110 .TP
111 .B -p
112 ping: just verify that the users named in the
113 .I rcpt-list
114 are valid users at
115 .IR destaddr ;
116 don't send any mail.
117 .TP
118 .B -s
119 if the server supports the ESMTP extension to use TLS encryption, turn it on for
120 this session.  See RFC3207 for details.
121 .TP
122 .B -t
123 preemtively establish TLS connection before SMTP handshake (SMTPS).
124 .TP
125 .B -u
126 specify a user name to be used in authentication.  The default name is
127 the current login id.
128 .PD
129 .PP
130 Finally if
131 .I .domain
132 is given, it is appended to the end of any unqualified system names
133 in the envelope or header.
134 .
135 .PP
136 .I Smtpd
137 receives a message using the Simple Mail Transfer Protocol.
138 Standard input and output are the protocol connection.
139 SMTP authentication by
140 .I login
141 and
142 .I cram-md5
143 protocols is supported; authenticated connections are permitted to relay.
144 .PP
145 The options are:
146 .TF -
147 .PD
148 .TP
149 .B -a
150 requires that all clients authenticate to be able to send mail.
151 .TP
152 .B -c
153 specifies a certificate to use for TLS.  Without this
154 option, the capability to start TLS will not be advertised.
155 .TP
156 .B -d
157 turns on debugging output,
158 with each connection's output going to a uniquely-named file in
159 .BR /sys/log/smtpdb .
160 .TP
161 .B -D
162 sleeps for 15 seconds usually at the start of the SMTP dialogue;
163 this deters some spammers.
164 Connections from Class A networks frequented by spammers will incur
165 a longer delay.
166 .TP
167 .B -f
168 prevents relaying from non-trusted networks.
169 It also tags messages from non-trusted sites when they deliver mail
170 from an address in a domain we believe we represent.
171 .TP
172 .B -g
173 turns on grey/white list processing.  All mail is rejected (with a
174 retry code) unless the sender's IP address is on the whitelist,
175 .BR /mail/grey/whitelist ,
176 an append only file.
177 Addresses can be added to the whitelist by the administrator.  However,
178 the usual way for addresses to be added is by
179 .I smtpd
180 itself.
181 Whenever a message is received and the sender's address isn't on the whitelist,
182 .I smtpd
183 first looks for the file
184 .BI /mail\%/grey\%/tmp\%/\| local\% /\| remote\% /\| recipient\fP,
185 where
186 .I local
187 and
188 .I remote
189 are IP addresses of the local and remote systems, respectively.
190 If it exists and was created more than a few minutes go,
191 the remote address is added to the whitelist.
192 If not, the file is created and the mail is rejected with a `try again' code.
193 The expectation is that spammers will not retry for more than a few minutes
194 and that others will.
195 .TP
196 .B -h
197 specifies the receiving domain.  If this flag is not specified, the
198 receiving domain is inferred from the host name.
199 .TP
200 .B -k
201 causes connections from the host at
202 the IP address,
203 .IR evilipaddr ,
204 to be dropped at program startup.  Multiple addresses
205 can be specified with several
206 .B -k
207 options.  This option should be used carefully;
208 it is intended to lessen the effects of denial of
209 service attacks or broken mailers which continually
210 connect.  The connections are not logged and the
211 remote system is not notified via the protocol.
212 .TP
213 .B -m
214 set the
215 .I mailer
216 to which
217 .I smtpd
218 passes a received message.
219 The default is
220 .BR /bin/upas/send .
221 .TP
222 .B -n
223 specifies the name of the network directory assigned to the incoming connection.
224 This is used to determine the peer IP address.  If this flag is not
225 specified, the peer address is determined using standard input.
226 .TP
227 .B -p
228 permits clients to authenticate using protocols which transfer
229 the password in the clear, e.g.
230 .I login
231 protocol. This should only be used if the connection has
232 previously encrypted using e.g.
233 .IR tlssrv (8).
234 .TP
235 .B -r
236 turns on forward DNS validation of non-trusted sender address.
237 .TP
238 .B -s
239 causes copies of blocked messages to be saved in a sub-directory of
240 .BR /mail/queue.dump .
241 .PP
242 .I Smtpd
243 is normally run by a network listener such as
244 .IR listen (8).
245 Most of the command line options are more conveniently
246 specified in the smtpd configuration file stored in
247 .BR /mail/lib/smtpd.conf .
248 .SH SOURCE
249 .TP
250 .B /sys/src/cmd/upas/smtp
251 .SH "SEE ALSO"
252 .IR aliasmail (8),
253 .IR faces (1),
254 .IR filter (1),
255 .IR mail (1),
256 .IR marshal (1),
257 .IR mlmgr (1),
258 .IR nedmail (1),
259 .IR qer (8),
260 .IR rewrite (6),
261 .IR send (8),
262 .IR tlssrv (8),
263 .IR upasfs (4)