Upstream qmail 1.01
[qmail] / qmail-remote.8
CommitLineData
2117e02e
MW
1.TH qmail-remote 8
2.SH NAME
3qmail-remote \- send mail via SMTP
4.SH SYNOPSIS
5.B qmail-remote
6.I host
7.I sender
8.I recip
9[
10.I recip ...
11]
12.SH DESCRIPTION
13.B qmail-remote
14reads a mail message from its input
15and sends the message
16to one or more recipients
17at a remote host.
18
19The remote host is
20.BR qmail-remote 's
21first argument,
22.IR host .
23.B qmail-remote
24sends the message to
25.IR host ,
26or to a mail exchanger for
27.I host
28listed in the Domain Name System,
29via the Simple Mail Transfer Protocol (SMTP).
30.I host
31can be either a fully-qualified domain name:
32
33.EX
34 silverton.berkeley.edu
35.EE
36
37or an IP address enclosed in brackets:
38
39.EX
40 [128.32.183.163]
41.EE
42
43The envelope recipient addresses are listed as
44.I recip
45arguments to
46.BR qmail-remote .
47The envelope sender address is listed as
48.I sender\fP.
49
50Note that
51.B qmail-remote
52does not take options
53and does not follow the
54.B getopt
55standard.
56.SH TRANSPARENCY
57End-of-file in SMTP is encoded as dot CR LF.
58A dot at the beginning of a line is encoded as dot dot.
59It is impossible in SMTP to send a message that does not end with a newline.
60.B qmail-remote
61converts the UNIX newline convention into the SMTP newline convention
62by inserting CR before each LF.
63
64It is a violation of the SMTP protocol
65to send a message that contains long lines or non-ASCII characters.
66However,
67.B qmail-remote
68will happily send such messages.
69It is the user's responsibility to avoid generating illegal messages.
70.SH "RESULTS"
71.B qmail-remote
72prints some number of
73.I recipient reports\fP,
74followed by a
75.I message report\fR.
76Each report is terminated by a 0 byte.
77Each report begins with a single letter:
78.TP 5
79r
80Recipient report: acceptance.
81.TP 5
82h
83Recipient report: permanent rejection.
84.TP 5
85s
86Recipient report: temporary rejection.
87.TP 5
88K
89Message report: success.
90.I host
91has taken responsibility for delivering the message to each
92acceptable recipient.
93.TP 5
94Z
95Message report: temporary failure.
96.TP 5
97D
98Message report: permanent failure.
99.PP
100After this letter comes a human-readable description of
101what happened.
102
103The recipient reports will always be printed in the same order as
104.BR qmail-remote 's
105.I recip
106arguments.
107Note that in failure cases there may be fewer
108recipient reports
109than
110.I recip
111arguments.
112
113.B qmail-remote
114always exits zero.
115.SH "CONTROL FILES"
116.TP 5
117.I helohost
118Current host name,
119for use solely in saying hello to the remote SMTP server.
120Default:
121.IR me ,
122if that is supplied;
123otherwise
124.B qmail-remote
125refuses to run.
126.TP 5
127.I smtproutes
128Artificial SMTP routes.
129Each route has the form
130.IR domain\fB:\fIrelay ,
131without any extra spaces.
132If
133.I domain
134matches
135.IR host ,
136.B qmail-remote
137will connect to
138.IR relay ,
139as if
140.I host
141had
142.I relay
143as its only MX.
144(It will also avoid doing any CNAME lookups on
145.I sender
146and
147.IR recip .)
148.I host
149may include a colon and a port number to use instead of the
150normal SMTP port, 25:
151
152.EX
153 inside.af.mil:firewall.af.mil:26
154.EE
155
156.I relay
157may be empty;
158this tells
159.B qmail-remote
160to look up MX records as usual.
161.I smtproutes
162may include wildcards:
163
164.EX
165 .af.mil:
166 :heaven.af.mil
167.EE
168
169Here
170any address ending with
171.B .af.mil
172(but not
173.B af.mil
174itself)
175is routed by its MX records;
176any other address is artificially routed to
177.BR heaven.af.mil .
178
179The
180.B qmail
181system does not protect you if you create an artificial
182mail loop between machines.
183However,
184you are always safe using
185.I smtproutes
186if you do not accept mail from the network.
187.TP 5
188.I timeoutconnect
189Number of seconds
190.B qmail-remote
191will wait for the remote SMTP server to accept a connection.
192Default: 60.
193The kernel normally imposes a 75-second upper limit.
194.TP 5
195.I timeoutremote
196Number of seconds
197.B qmail-remote
198will wait for each response from the remote SMTP server.
199Default: 1200.
200.SH "SEE ALSO"
201addresses(5),
202envelopes(5),
203qmail-control(5),
204qmail-send(8),
205qmail-smtpd(8),
206qmail-tcpto(8)