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