debian/rules: Use `git' potty wrapper.
[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
2117e02e
MW
145.IR recip .)
146.I host
147may include a colon and a port number to use instead of the
148normal SMTP port, 25:
149
150.EX
151 inside.af.mil:firewall.af.mil:26
152.EE
153
154.I relay
155may be empty;
156this tells
157.B qmail-remote
158to look up MX records as usual.
159.I smtproutes
160may include wildcards:
161
162.EX
163 .af.mil:
164 :heaven.af.mil
165.EE
166
167Here
168any address ending with
169.B .af.mil
170(but not
171.B af.mil
172itself)
173is routed by its MX records;
174any other address is artificially routed to
175.BR heaven.af.mil .
176
177The
178.B qmail
179system does not protect you if you create an artificial
180mail loop between machines.
181However,
182you are always safe using
183.I smtproutes
184if you do not accept mail from the network.
185.TP 5
186.I timeoutconnect
187Number of seconds
188.B qmail-remote
189will wait for the remote SMTP server to accept a connection.
190Default: 60.
191The kernel normally imposes a 75-second upper limit.
192.TP 5
193.I timeoutremote
194Number of seconds
195.B qmail-remote
196will wait for each response from the remote SMTP server.
197Default: 1200.
198.SH "SEE ALSO"
199addresses(5),
200envelopes(5),
201qmail-control(5),
202qmail-send(8),
203qmail-smtpd(8),
212b6f5d 204qmail-tcpok(8),
2117e02e 205qmail-tcpto(8)