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