xref: /dragonfly/libexec/dma/dma.8 (revision ef3ac1d1)
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.Dd February 13, 2014
33.Dt DMA 8
34.Os
35.Sh NAME
36.Nm dma
37.Nd DragonFly Mail Agent
38.Sh SYNOPSIS
39.Nm
40.Op Fl DiOt
41.Op Fl A Ns Ar mode
42.Op Fl b Ns Ar mode
43.Op Fl f Ar sender
44.Op Fl L Ar tag
45.Op Fl o Ns Ar option
46.Op Fl r Ar sender
47.Op Fl q Ns Op Ar arg
48.Op Ar recipient ...
49.Sh DESCRIPTION
50.Nm
51is a small Mail Transport Agent (MTA), designed for home and office use.
52It accepts mails from locally installed Mail User Agents (MUA) and
53delivers the mails either locally or to a remote destination.
54Remote delivery includes several features like TLS/SSL support and SMTP
55authentication.
56.Pp
57.Nm
58is not intended as a replacement for real, big MTAs like
59.Xr sendmail 8 .
60Consequently,
61.Nm
62does not listen on port 25 for incoming connections.
63.Pp
64The options are as follows:
65.Bl -tag -width indent
66.It Fl A Ns Ar mode
67.Fl \&Ac
68acts as a compatibility option for sendmail.
69.It Fl b Ns Ar mode
70.Bl -tag -width indent
71.It Fl bp
72List all mails currently stored in the mail queue.
73.It Fl bq
74Queue the mail, but don't attempt to deliver it.
75See also the
76.Sq DEFER
77config file setting below.
78.El
79.Pp
80All other
81.Ar mode Ns
82s are ignored.
83.It Fl D
84Don't run in the background.
85Useful for debugging.
86.It Fl f Ar sender
87Set sender address (envelope-from) to
88.Ar sender .
89This overrides the value of the environment variable
90.Ev EMAIL .
91.It Fl i
92Ignore dots alone on lines by themselves in incoming messages.
93This should be set if you are reading data from a file.
94.It Fl L Ar tag
95Set the identifier used in syslog messages to the supplied
96.Ar tag .
97This is a compatibility option for sendmail.
98.It Fl O
99This is a compatibility option for sendmail.
100.It Fl o Ns Ar option
101Specifying
102.Fl oi
103is synonymous to
104.Fl i .
105All other options are ignored.
106.It Fl q Ns Op Ar arg
107Process saved messages in the queue.
108The argument is optional and ignored.
109.It Fl r Ar sender
110Same as
111.Fl f .
112.It Fl t
113Obtain recipient addresses from the message header.
114.Nm
115will parse the
116.Li To: ,
117.Li Cc: ,
118and
119.Li Bcc:
120headers.
121The
122.Li Bcc:
123header will be removed independent of whether
124.Fl t
125is specified or not.
126.El
127.Sh CONFIGURATION
128.Nm
129can be configured with two config files:
130.Pp
131.Bl -bullet -compact
132.It
133auth.conf
134.It
135dma.conf
136.El
137.Pp
138These two files are stored per default in
139.Pa /etc/dma .
140.Sh FILE FORMAT
141Every file contains parameters of the form
142.Sq name value .
143Lines containing boolean values are set to
144.Sq NO
145if the line is commented and to
146.Sq YES
147if the line is uncommented.
148Empty lines or lines beginning with a
149.Sq #
150are ignored.
151Parameter names and their values are case sensitive.
152.Sh PARAMETERS
153.Ss auth.conf
154SMTP authentication can be configured in
155.Pa auth.conf .
156Each line has the format
157.Dq Li user|smarthost:password .
158.Ss dma.conf
159Most of the behaviour of
160.Nm
161can be configured in
162.Pa dma.conf .
163.Bl -tag -width 4n
164.It Ic SMARTHOST Xo
165(string, default=empty)
166.Xc
167If you want to send outgoing mails via a smarthost, set this variable to
168your smarthosts address.
169.It Ic PORT Xo
170(numeric, default=25)
171.Xc
172Use this port to deliver remote emails.
173Only useful together with the
174.Sq SMARTHOST
175option, because
176.Nm
177will deliver all mails to this port, regardless of whether a smarthost is set
178or not.
179.It Ic ALIASES Xo
180(string, default=/etc/aliases)
181.Xc
182Path to the local aliases file.
183Just stick with the default.
184The aliases file is of the format
185.Dl nam: dest1 dest2 ...
186In this case, mails to
187.Li nam
188will instead be delivered to
189.Li dest1
190and
191.Li dest2 ,
192which in turn could be entries in
193.Pa /etc/aliases .
194The special name
195.Ql *
196can be used to create a catch-all alias, which gets used if no other
197matching alias is found.
198Use the catch-all alias only if you don't want any local mail to be
199delivered.
200.It Ic SPOOLDIR Xo
201(string, default=/var/spool/dma)
202.Xc
203Path to
204.Nm Ap s
205spool directory.
206Just stick with the default.
207.It Ic AUTHPATH Xo
208(string, default=not set)
209.Xc
210Path to the
211.Sq auth.conf
212file.
213.It Ic SECURETRANS Xo
214(boolean, default=commented)
215.Xc
216Uncomment if you want TLS/SSL secured transfer.
217.It Ic STARTTLS Xo
218(boolean, default=commented)
219.Xc
220Uncomment if you want to use STARTTLS.
221Only useful together with
222.Sq SECURETRANS .
223.It Ic OPPORTUNISTIC_TLS Xo
224(boolean, default=commented)
225.Xc
226Uncomment if you want to allow the STARTTLS negotiation to fail.
227Most useful when
228.Nm
229is used without a smarthost, delivering remote messages directly to
230the outside mail exchangers; in opportunistic TLS mode, the connection will
231be encrypted if the remote server supports STARTTLS, but an unencrypted
232delivery will still be made if the negotiation fails.
233Only useful together with
234.Sq SECURETRANS
235and
236.Sq STARTTLS .
237.It Ic CERTFILE Xo
238(string, default=empty)
239.Xc
240Path to your SSL certificate file.
241.It Ic SECURE Xo
242(boolean, default=commented)
243.Xc
244Uncomment this entry and change it to
245.Sq INSECURE
246to use plain text SMTP login over an insecure connection.
247You have to rename this variable manually to prevent that you send your
248password accidentally over an insecure connection.
249.It Ic DEFER Xo
250(boolean, default=commented)
251.Xc
252Uncomment if you want that
253.Nm
254defers your mail.
255You have to flush your mail queue manually with the
256.Fl q
257option.
258This option is handy if you are behind a dialup line.
259.It Ic FULLBOUNCE Xo
260(boolean, default=commented)
261.Xc
262Uncomment if you want the bounce message to include the complete original
263message, not just the headers.
264.It Ic MAILNAME Xo
265(string, default=empty)
266.Xc
267The internet hostname
268.Nm
269uses to identify the host.
270If not set or empty, the result of
271.Xr gethostname 3
272is used.
273If
274.Sq MAILNAME
275is an absolute path to a file, the first line of this file will be used
276as the hostname.
277.It Ic MASQUERADE Xo
278(string, default=empty)
279.Xc
280Masquerade the envelope-from addresses with this address/hostname.
281Use this setting if mails are not accepted by destination mail servers
282because your sender domain is invalid.
283This setting is overridden by the
284.Fl f
285flag and the
286.Ev EMAIL
287environment variable.
288.Pp
289If
290.Sq MASQUERADE
291does not contain a
292.Li @
293sign, the string is interpreted as a host name.
294For example, setting
295.Sq MASQUERADE
296to
297.Ql john@
298on host
299.Ql hamlet
300will send all mails as
301.Ql john@hamlet ;
302setting it to
303.Ql percolator
304will send all mails as
305.Ql Sm off Va username @percolator .
306.Sm on
307.It Ic NULLCLIENT Xo
308.Xc
309Bypass aliases and local delivery, and instead forward all mails to
310the defined
311.Sq SMARTHOST .
312.Sq NULLCLIENT
313requires
314.Sq SMARTHOST
315to be set.
316.El
317.Ss Environment variables
318The behavior of
319.Nm
320can be influenced by some environment variables.
321.Bl -tag -width 4n
322.It Ev EMAIL Xo
323.Xc
324Used to set the sender address (envelope-from).
325Use a plain address, in the form of
326.Li user@example.com .
327This value will be overridden when the
328.Fl f
329flag is used.
330.El
331.Sh SEE ALSO
332.Xr mailaddr 7 ,
333.Xr mailwrapper 8 ,
334.Xr sendmail 8
335.Rs
336.%A "J. B. Postel"
337.%T "Simple Mail Transfer Protocol"
338.%O RFC 821
339.Re
340.Rs
341.%A "J. Myers"
342.%T "SMTP Service Extension for Authentication"
343.%O RFC 2554
344.Re
345.Rs
346.%A "P. Hoffman"
347.%T "SMTP Service Extension for Secure SMTP over TLS"
348.%O RFC 2487
349.Re
350.Sh HISTORY
351The
352.Nm
353utility first appeared in
354.Dx 1.11 .
355.Sh AUTHORS
356.An -nosplit
357.Nm
358was written by
359.An Matthias Schmidt Aq Mt matthias@dragonflybsd.org
360and
361.An Simon Schubert Aq Mt 2@0x2c.org .
362