]> git.ipfire.org Git - people/ms/dma.git/blob - dma.8
d34b3d6df0f5ee3ce25c505f57797bc99c164468
[people/ms/dma.git] / dma.8
1 .\"
2 .\" Copyright (c) 2008
3 .\" The DragonFly Project. All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\"
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in
13 .\" the documentation and/or other materials provided with the
14 .\" distribution.
15 .\" 3. Neither the name of The DragonFly Project nor the names of its
16 .\" contributors may be used to endorse or promote products derived
17 .\" from this software without specific, prior written permission.
18 .\"
19 .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
22 .\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23 .\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
24 .\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
25 .\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
27 .\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28 .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
29 .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\" $DragonFly: src/libexec/dma/dma.8,v 1.10 2008/09/06 14:17:56 swildner Exp $
33 .\"
34 .Dd April 22, 2010
35 .Dt DMA 8
36 .Os
37 .Sh NAME
38 .Nm dma
39 .Nd DragonFly Mail Agent
40 .Sh SYNOPSIS
41 .Nm
42 .Op Fl DiOt
43 .Op Fl A Ns Ar mode
44 .Op Fl b Ns Ar mode
45 .Op Fl f Ar sender
46 .Op Fl L Ar tag
47 .Op Fl o Ns Ar option
48 .Op Fl r Ar sender
49 .Op Fl q Ns Op Ar arg
50 .Op Ar recipient ...
51 .Sh DESCRIPTION
52 .Nm
53 is a small Mail Transport Agent (MTA), designed for home and office use.
54 It accepts mails from locally installed Mail User Agents (MUA) and
55 delivers the mails either locally or to a remote destination.
56 Remote delivery includes several features like TLS/SSL support and SMTP
57 authentication.
58 .Pp
59 .Nm
60 is not intended as a replacement for real, big MTAs like
61 .Xr sendmail 8
62 or
63 .Xr postfix 1 .
64 Consequently,
65 .Nm
66 does not listen on port 25 for incoming connections.
67 .Pp
68 The options are as follows:
69 .Bl -tag -width indent
70 .It Fl A Ns Ar mode
71 .Fl \&Ac
72 acts as a compatibility option for sendmail.
73 .It Fl b Ns Ar mode
74 .Bl -tag -width indent
75 .It Fl bp
76 List all mails currently stored in the mail queue.
77 .It Fl bq
78 Queue the mail, but don't attempt to deliver it.
79 See also the
80 .Sq DEFER
81 config file setting below.
82 .El
83 .Pp
84 All other
85 .Ar mode Ns
86 s are are ignored.
87 .It Fl D
88 Don't run in the background.
89 Useful for debugging.
90 .It Fl f Ar sender
91 Set sender address (envelope-from) to
92 .Ar sender .
93 This overrides the value of the environment variable
94 .Ev EMAIL .
95 .It Fl i
96 Ignore dots alone on lines by themselves in incoming messages.
97 This should be set if you are reading data from a file.
98 .It Fl L Ar tag
99 Set the identifier used in syslog messages to the supplied
100 .Ar tag .
101 This is a compatibility option for sendmail.
102 .It Fl O
103 This is a compatibility option for sendmail.
104 .It Fl o Ns Ar option
105 Specifying
106 .Fl oi
107 is synonymous to
108 .Fl i .
109 All other options are ignored.
110 .It Fl q Ns Op Ar arg
111 Process saved messages in the queue.
112 The argument is optional and ignored.
113 .It Fl r Ar sender
114 Same as
115 .Fl f .
116 .It Fl t
117 Obtain recipient addresses from the message header.
118 .Nm
119 will parse the
120 .Li To: ,
121 .Li Cc: ,
122 and
123 .Li Bcc:
124 headers.
125 The
126 .Li Bcc:
127 header will be removed independent of whether
128 .Fl t
129 is specified or not.
130 .El
131 .Sh CONFIGURATION
132 .Nm
133 can be configured with three config files:
134 .Pp
135 .Bl -bullet -compact
136 .It
137 auth.conf
138 .It
139 dma.conf
140 .El
141 .Pp
142 These three files are stored per default in
143 .Pa /etc/dma .
144 .Sh FILE FORMAT
145 Every file contains parameters of the form
146 .Sq name value .
147 Lines containing boolean values are set to
148 .Sq NO
149 if the line is commented and to
150 .Sq YES
151 if the line is uncommented.
152 Empty lines or lines beginning with a
153 .Sq #
154 are ignored.
155 Parameter names and their values are case sensitive.
156 .Sh PARAMETERS
157 .Ss auth.conf
158 SMTP authentication can be configured in
159 .Pa auth.conf .
160 Each line has the format
161 .Dq Li user|smarthost:password .
162 .Ss dma.conf
163 Most of the behaviour of
164 .Nm
165 can be configured in
166 .Pa dma.conf .
167 .Bl -tag -width 4n
168 .It Ic SMARTHOST Xo
169 (string, default=empty)
170 .Xc
171 If you want to send outgoing mails via a smarthost, set this variable to
172 your smarthosts address.
173 .It Ic PORT Xo
174 (numeric, default=25)
175 .Xc
176 Use this port to deliver remote emails.
177 Only useful together with the
178 .Sq SMARTHOST
179 option, because
180 .Nm
181 will deliver all mails to this port, regardless of whether a smarthost is set
182 or not.
183 .It Ic ALIASES Xo
184 (string, default=/etc/aliases)
185 .Xc
186 Path to the local aliases file.
187 Just stick with the default.
188 .It Ic SPOOLDIR Xo
189 (string, default=/var/spool/dma)
190 .Xc
191 Path to
192 .Nm Ap s
193 spool directory.
194 Just stick with the default.
195 .It Ic AUTHPATH Xo
196 (string, default=not set)
197 .Xc
198 Path to the
199 .Sq auth.conf
200 file.
201 .It Ic SECURETRANS Xo
202 (boolean, default=commented)
203 .Xc
204 Uncomment if you want TLS/SSL secured transfer.
205 .It Ic STARTTLS Xo
206 (boolean, default=commented)
207 .Xc
208 Uncomment if you want to use STARTTLS.
209 Only useful together with
210 .Sq SECURETRANS .
211 .It Ic OPPORTUNISTIC_TLS Xo
212 (boolean, default=commented)
213 .Xc
214 Uncomment if you want to allow the STARTTLS negotiation to fail.
215 Most useful when
216 .Nm
217 is used without a smarthost, delivering remote messages directly to
218 the outside mail exchangers; in opportunistic TLS mode, the connection will
219 be encrypted if the remote server supports STARTTLS, but an unencrypted
220 delivery will still be made if the negotiation fails.
221 Only useful together with
222 .Sq SECURETRANS
223 and
224 .Sq STARTTLS .
225 .It Ic CERTFILE Xo
226 (string, default=empty)
227 .Xc
228 Path to your SSL certificate file.
229 .It Ic SECURE Xo
230 (boolean, default=commented)
231 .Xc
232 Uncomment this entry and change it to
233 .Sq INSECURE
234 to use plain text SMTP login over an insecure connection.
235 You have to rename this variable manually to prevent that you send your
236 password accidentally over an insecure connection.
237 .It Ic DEFER Xo
238 (boolean, default=commented)
239 .Xc
240 Uncomment if you want that
241 .Nm
242 defers your mail.
243 You have to flush your mail queue manually with the
244 .Fl q
245 option.
246 This option is handy if you are behind a dialup line.
247 .It Ic FULLBOUNCE Xo
248 (boolean, default=commented)
249 .Xc
250 Uncomment if you want the bounce message to include the complete original
251 message, not just the headers.
252 .It Ic MAILNAME Xo
253 (string, default=empty)
254 .Xc
255 The internet hostname
256 .Nm
257 uses to identify the host.
258 If not set or empty, the result of
259 .Xr gethostname 2
260 is used.
261 If
262 .Sq MAILNAME
263 is an absolute path to a file, the first line of this file will be used
264 as the hostname.
265 .It Ic MASQUERADE Xo
266 (string, default=empty)
267 .Xc
268 Masquerade the envelope from addresses with this address/hostname.
269 Use this setting if mails are not accepted by destination mail servers
270 because your sender domain is invalid.
271 This setting is overridden by the
272 .Fl f
273 flag and the
274 .Ev EMAIL
275 environment variable.
276 .Pp
277 If
278 .Sq MASQUERADE
279 does not contain a
280 .Li @
281 sign, the string is interpreted as a host name.
282 For example, setting
283 .Sq MASQUERADE
284 to
285 .Ql john@
286 on host
287 .Ql hamlet
288 will send all mails as
289 .Ql john@hamlet ;
290 setting it to
291 .Ql percolator
292 will send all mails as
293 .Ql Sm off Va username @percolator .
294 .Sm on
295 .El
296 .Ss Environment variables
297 The behavior of
298 .Nm
299 can be influenced by some environment variables.
300 .Pp
301 .Bl -tag -width 4n
302 .It Ev EMAIL Xo
303 .Xc
304 Used to set the sender address (envelope-from).
305 Use a plain address, in the form of
306 .Li user@example.com .
307 This value will be overridden when the
308 .Fl f
309 flag is used.
310 .El
311 .Sh SEE ALSO
312 .Xr mailaddr 7 ,
313 .Xr mailwrapper 8 ,
314 .Xr sendmail 8
315 .Rs
316 .%A "J. B. Postel"
317 .%T "Simple Mail Transfer Protocol"
318 .%O RFC 821
319 .Re
320 .Rs
321 .%A "J. Myers"
322 .%T "SMTP Service Extension for Authentication"
323 .%O RFC 2554
324 .Re
325 .Rs
326 .%A "P. Hoffman"
327 .%T "SMTP Service Extension for Secure SMTP over TLS"
328 .%O RFC 2487
329 .Re
330 .Sh HISTORY
331 The
332 .Nm
333 utility first appeared in
334 .Dx 1.11 .
335 .Sh AUTHORS
336 .Nm
337 was written by
338 .An Matthias Schmidt Aq matthias@dragonflybsd.org
339 and
340 .An Simon Schubert Aq corecode@dragonflybsd.org .