]> git.lizzy.rs Git - plan9front.git/blob - sys/man/8/smtp
more stuff
[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 -aAdfips
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 -u
123 specify a user name to be used in authentication.  The default name is
124 the current login id.
125 .PD
126 .PP
127 Finally if
128 .I .domain
129 is given, it is appended to the end of any unqualified system names
130 in the envelope or header.
131 .
132 .PP
133 .I Smtpd
134 receives a message using the Simple Mail Transfer Protocol.
135 Standard input and output are the protocol connection.
136 SMTP authentication by
137 .I login
138 and
139 .I cram-md5
140 protocols is supported; authenticated connections are permitted to relay.
141 .PP
142 The options are:
143 .TF -
144 .PD
145 .TP
146 .B -a
147 requires that all clients authenticate to be able to send mail.
148 .TP
149 .B -c
150 specifies a certificate to use for TLS.  Without this
151 option, the capability to start TLS will not be advertised.
152 .TP
153 .B -d
154 turns on debugging output,
155 with each connection's output going to a uniquely-named file in
156 .BR /sys/log/smtpdb .
157 .TP
158 .B -D
159 sleeps for 15 seconds usually at the start of the SMTP dialogue;
160 this deters some spammers.
161 Connections from Class A networks frequented by spammers will incur
162 a longer delay.
163 .TP
164 .B -f
165 prevents relaying from non-trusted networks.
166 It also tags messages from non-trusted sites when they deliver mail
167 from an address in a domain we believe we represent.
168 .TP
169 .B -g
170 turns on grey/white list processing.  All mail is rejected (with a
171 retry code) unless the sender's IP address is on the whitelist,
172 .BR /mail/grey/whitelist ,
173 an append only file.
174 Addresses can be added to the whitelist by the administrator.  However,
175 the usual way for addresses to be added is by
176 .I smtpd
177 itself.
178 Whenever a message is received and the sender's address isn't on the whitelist,
179 .I smtpd
180 first looks for the file
181 .BI /mail\%/grey\%/tmp\%/\| local\% /\| remote\% /\| recipient\fP,
182 where
183 .I local
184 and
185 .I remote
186 are IP addresses of the local and remote systems, respectively.
187 If it exists and was created more than a few minutes go,
188 the remote address is added to the whitelist.
189 If not, the file is created and the mail is rejected with a `try again' code.
190 The expectation is that spammers will not retry for more than a few minutes
191 and that others will.
192 .TP
193 .B -h
194 specifies the receiving domain.  If this flag is not specified, the
195 receiving domain is inferred from the host name.
196 .TP
197 .B -k
198 causes connections from the host at
199 the IP address,
200 .IR evilipaddr ,
201 to be dropped at program startup.  Multiple addresses
202 can be specified with several
203 .B -k
204 options.  This option should be used carefully;
205 it is intended to lessen the effects of denial of
206 service attacks or broken mailers which continually
207 connect.  The connections are not logged and the
208 remote system is not notified via the protocol.
209 .TP
210 .B -m
211 set the
212 .I mailer
213 to which
214 .I smtpd
215 passes a received message.
216 The default is
217 .BR /bin/upas/send .
218 .TP
219 .B -n
220 specifies the name of the network directory assigned to the incoming connection.
221 This is used to determine the peer IP address.  If this flag is not
222 specified, the peer address is determined using standard input.
223 .TP
224 .B -p
225 permits clients to authenticate using protocols which transfer
226 the password in the clear, e.g.
227 .I login
228 protocol. This should only be used if the connection has
229 previously encrypted using e.g.
230 .IR tlssrv (8).
231 .TP
232 .B -r
233 turns on forward DNS validation of non-trusted sender address.
234 .TP
235 .B -s
236 causes copies of blocked messages to be saved in a sub-directory of
237 .BR /mail/queue.dump .
238 .PP
239 .I Smtpd
240 is normally run by a network listener such as
241 .IR listen (8).
242 Most of the command line options are more conveniently
243 specified in the smtpd configuration file stored in
244 .BR /mail/lib/smtpd.conf .
245 .SH SOURCE
246 .TP
247 .B /sys/src/cmd/upas/smtp
248 .SH "SEE ALSO"
249 .IR aliasmail (8),
250 .IR faces (1),
251 .IR filter (1),
252 .IR mail (1),
253 .IR marshal (1),
254 .IR mlmgr (1),
255 .IR nedmail (1),
256 .IR qer (8),
257 .IR rewrite (6),
258 .IR send (8),
259 .IR tlssrv (8),
260 .IR upasfs (4)