add .Mt to man pages in libexec/
[dragonfly.git] / libexec / dma / dma.8
CommitLineData
f67beddd
MS
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.\"
9907d093 32.Dd January 9, 2012
f67beddd
MS
33.Dt DMA 8
34.Os
35.Sh NAME
36.Nm dma
37.Nd DragonFly Mail Agent
38.Sh SYNOPSIS
39.Nm
ff48fce6 40.Op Fl DiOt
a696990f
SS
41.Op Fl A Ns Ar mode
42.Op Fl b Ns Ar mode
f67beddd
MS
43.Op Fl f Ar sender
44.Op Fl L Ar tag
a696990f 45.Op Fl o Ns Ar option
f67beddd 46.Op Fl r Ar sender
a696990f 47.Op Fl q Ns Op Ar arg
f67beddd
MS
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
9fe4c5f3 55authentication.
f67beddd
MS
56.Pp
57.Nm
58is not intended as a replacement for real, big MTAs like
e0dc2ba8 59.Xr sendmail 8 .
f67beddd
MS
60Consequently,
61.Nm
62does not listen on port 25 for incoming connections.
63.Pp
64The options are as follows:
65.Bl -tag -width indent
a696990f
SS
66.It Fl A Ns Ar mode
67.Fl \&Ac
f67beddd 68acts as a compatibility option for sendmail.
a696990f 69.It Fl b Ns Ar mode
a9337db7
SS
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
b575ab8a 82s are ignored.
f67beddd
MS
83.It Fl D
84Don't run in the background.
85Useful for debugging.
86.It Fl f Ar sender
c8b07ee5 87Set sender address (envelope-from) to
f67beddd 88.Ar sender .
c8b07ee5
SW
89This overrides the value of the environment variable
90.Ev EMAIL .
f67beddd
MS
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.
28b8d48f
MS
98.It Fl O
99This is a compatibility option for sendmail.
a696990f 100.It Fl o Ns Ar option
f67beddd 101Specifying
a696990f 102.Fl oi
f67beddd
MS
103is synonymous to
104.Fl i .
105All other options are ignored.
a696990f 106.It Fl q Ns Op Ar arg
f67beddd 107Process saved messages in the queue.
a696990f 108The argument is optional and ignored.
f67beddd
MS
109.It Fl r Ar sender
110Same as
111.Fl f .
ff48fce6
SS
112.It Fl t
113Obtain recipient addresses from the message header.
a696990f
SS
114.Nm
115will parse the
ff48fce6
SS
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.
f67beddd
MS
126.El
127.Sh CONFIGURATION
128.Nm
9907d093 129can be configured with two config files:
f67beddd
MS
130.Pp
131.Bl -bullet -compact
132.It
133auth.conf
134.It
135dma.conf
f67beddd
MS
136.El
137.Pp
9907d093 138These two files are stored per default in
f67beddd 139.Pa /etc/dma .
f67beddd
MS
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 .
f67beddd
MS
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
ffd21410
SW
177will deliver all mails to this port, regardless of whether a smarthost is set
178or not.
f67beddd 179.It Ic ALIASES Xo
c8b07ee5 180(string, default=/etc/aliases)
f67beddd
MS
181.Xc
182Path to the local aliases file.
183Just stick with the default.
c8b07ee5
SW
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.
f67beddd
MS
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.
f67beddd 207.It Ic AUTHPATH Xo
c8b07ee5 208(string, default=not set)
f67beddd
MS
209.Xc
210Path to the
211.Sq auth.conf
212file.
f67beddd
MS
213.It Ic SECURETRANS Xo
214(boolean, default=commented)
215.Xc
1ec13189 216Uncomment if you want TLS/SSL secured transfer.
f67beddd
MS
217.It Ic STARTTLS Xo
218(boolean, default=commented)
219.Xc
1ec13189 220Uncomment if you want to use STARTTLS.
f67beddd
MS
221Only useful together with
222.Sq SECURETRANS .
c8b07ee5
SW
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 .
f67beddd
MS
237.It Ic CERTFILE Xo
238(string, default=empty)
239.Xc
240Path to your SSL certificate file.
b558d098
MS
241.It Ic SECURE Xo
242(boolean, default=commented)
243.Xc
c8b07ee5 244Uncomment this entry and change it to
b558d098
MS
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
1be1f152 248password accidentally over an insecure connection.
f67beddd
MS
249.It Ic DEFER Xo
250(boolean, default=commented)
251.Xc
1ec13189 252Uncomment if you want that
f67beddd
MS
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.
5ca28cf6
SS
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.
5754971c
SS
264.It Ic MAILNAME Xo
265(string, default=empty)
266.Xc
c8b07ee5
SW
267The internet hostname
268.Nm
269uses to identify the host.
270If not set or empty, the result of
5b40b550 271.Xr gethostname 3
c8b07ee5
SW
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
5754971c
SS
278(string, default=empty)
279.Xc
5b40b550 280Masquerade the envelope-from addresses with this address/hostname.
c8b07ee5
SW
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.El
308.Ss Environment variables
309The behavior of
310.Nm
311can be influenced by some environment variables.
c8b07ee5
SW
312.Bl -tag -width 4n
313.It Ev EMAIL Xo
314.Xc
315Used to set the sender address (envelope-from).
316Use a plain address, in the form of
317.Li user@example.com .
318This value will be overridden when the
319.Fl f
320flag is used.
f67beddd 321.El
f67beddd
MS
322.Sh SEE ALSO
323.Xr mailaddr 7 ,
324.Xr mailwrapper 8 ,
325.Xr sendmail 8
326.Rs
327.%A "J. B. Postel"
328.%T "Simple Mail Transfer Protocol"
329.%O RFC 821
330.Re
331.Rs
332.%A "J. Myers"
333.%T "SMTP Service Extension for Authentication"
334.%O RFC 2554
335.Re
336.Rs
337.%A "P. Hoffman"
338.%T "SMTP Service Extension for Secure SMTP over TLS"
339.%O RFC 2487
340.Re
341.Sh HISTORY
342The
343.Nm
344utility first appeared in
345.Dx 1.11 .
346.Sh AUTHORS
3f1f8d16 347.An -nosplit
f67beddd
MS
348.Nm
349was written by
3f1f8d16 350.An Matthias Schmidt Aq Mt matthias@dragonflybsd.org
f67beddd 351and
3f1f8d16 352.An Simon Schubert Aq Mt corecode@dragonflybsd.org .