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