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