dma: add recipient parsing from headers
[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.\"
ffd21410 32.\" $DragonFly: src/libexec/dma/dma.8,v 1.10 2008/09/06 14:17:56 swildner Exp $
f67beddd 33.\"
9fe4c5f3 34.Dd September 2, 2008
f67beddd
MS
35.Dt DMA 8
36.Os
37.Sh NAME
38.Nm dma
39.Nd DragonFly Mail Agent
40.Sh SYNOPSIS
41.Nm
ff48fce6 42.Op Fl DiOt
f67beddd
MS
43.Op Fl A Ar mode
44.Op Fl b Ar mode
45.Op Fl f Ar sender
46.Op Fl L Ar tag
47.Op Fl o Ar option
48.Op Fl r Ar sender
e3690cec 49.Op Fl q Ar arg
f67beddd
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
9fe4c5f3 57authentication.
f67beddd
MS
58.Pp
59.Nm
60is not intended as a replacement for real, big MTAs like
61.Xr sendmail 8
62or
50bb7f28 63.Xr postfix 1 .
f67beddd
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
70.It Fl A Ar mode
71.Fl A Ns Ar c
72acts as a compatibility option for sendmail.
73.It Fl b Ar mode
a9337db7
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.
f67beddd
MS
87.It Fl D
88Don't run in the background.
89Useful for debugging.
90.It Fl f Ar sender
91Set sender address to
92.Ar sender .
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.
28b8d48f
MS
100.It Fl O
101This is a compatibility option for sendmail.
f67beddd
MS
102.It Fl o Ar option
103Specifying
104.Fl o Ns Ar i
105is synonymous to
106.Fl i .
107All other options are ignored.
e3690cec 108.It Fl q Ar arg
f67beddd 109Process saved messages in the queue.
e3690cec 110The argument is required for compatibility with sendmail, and ignored.
f67beddd
MS
111.It Fl r Ar sender
112Same as
113.Fl f .
ff48fce6
SS
114.It Fl t
115Obtain recipient addresses from the message header.
116.Nm will parse the
117.Li To: ,
118.Li Cc: ,
119and
120.Li Bcc:
121headers.
122The
123.Li Bcc:
124header will be removed independent of whether
125.Fl t
126is specified or not.
f67beddd
MS
127.El
128.Sh CONFIGURATION
129.Nm
130can be configured with three config files:
131.Pp
132.Bl -bullet -compact
133.It
134auth.conf
135.It
136dma.conf
137.It
138virtusertable
139.El
140.Pp
141These three files are stored per default in
142.Pa /etc/dma .
f67beddd
MS
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 .
f67beddd
MS
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
ffd21410
SW
180will deliver all mails to this port, regardless of whether a smarthost is set
181or not.
f67beddd
MS
182.It Ic ALIASES Xo
183(string, default=/etc/mail/aliases)
184.Xc
185Path to the local aliases file.
186Just stick with the default.
187.It Ic SPOOLDIR Xo
188(string, default=/var/spool/dma)
189.Xc
190Path to
191.Nm Ap s
192spool directory.
193Just stick with the default.
194.It Ic VIRTPATH Xo
195(string, default=/etc/dma/virtusertable)
196.Xc
197Path to the
198.Sq virtusertable
199file.
f67beddd
MS
200.It Ic AUTHPATH Xo
201(string, default=/etc/dma/auth.conf)
202.Xc
203Path to the
204.Sq auth.conf
205file.
f67beddd
MS
206.It Ic VIRTUAL Xo
207(boolean, default=commented)
208.Xc
209Comment if you want virtual user support.
210.It Ic SECURETRANS Xo
211(boolean, default=commented)
212.Xc
213Comment if you want TLS/SSL secured transfer.
214.It Ic STARTTLS Xo
215(boolean, default=commented)
216.Xc
217Comment if you want to use STARTTLS.
218Only useful together with
219.Sq SECURETRANS .
220.It Ic CERTFILE Xo
221(string, default=empty)
222.Xc
223Path to your SSL certificate file.
b558d098
MS
224.It Ic SECURE Xo
225(boolean, default=commented)
226.Xc
227Change this entry to
228.Sq INSECURE
229to use plain text SMTP login over an insecure connection.
230You have to rename this variable manually to prevent that you send your
1be1f152 231password accidentally over an insecure connection.
f67beddd
MS
232.It Ic DEFER Xo
233(boolean, default=commented)
234.Xc
235Comment if you want that
236.Nm
237defers your mail.
238You have to flush your mail queue manually with the
239.Fl q
240option.
241This option is handy if you are behind a dialup line.
5ca28cf6
SS
242.It Ic FULLBOUNCE Xo
243(boolean, default=commented)
244.Xc
245Uncomment if you want the bounce message to include the complete original
246message, not just the headers.
5754971c
SS
247.It Ic MAILNAME Xo
248(string, default=empty)
249.Xc
250The name to be used when introducing this host, if different from
251the result of
252.Xr hostname 1 .
253If specified, this option overrides
254.Sq MAILNAMEFILE .
255.It Ic MAILNAMEFILE Xo
256(string, default=empty)
257.Xc
258The name of the file to read the
259.Sq MAILNAME
260from.
f67beddd
MS
261.El
262.Ss virtusertable
263The
264.Pa virtusertable
265file specifies a virtual user table.
266Each line has the format
267.Dq Li localuser:mail-address .
268Some smarthosts do not accept mails from unresolvable email address
ffd21410 269(e.g.\& user@localhost) so you have to rewrite your outgoing email
f67beddd
MS
270address to a valid address.
271.Sh SEE ALSO
272.Xr mailaddr 7 ,
273.Xr mailwrapper 8 ,
274.Xr sendmail 8
275.Rs
276.%A "J. B. Postel"
277.%T "Simple Mail Transfer Protocol"
278.%O RFC 821
279.Re
280.Rs
281.%A "J. Myers"
282.%T "SMTP Service Extension for Authentication"
283.%O RFC 2554
284.Re
285.Rs
286.%A "P. Hoffman"
287.%T "SMTP Service Extension for Secure SMTP over TLS"
288.%O RFC 2487
289.Re
290.Sh HISTORY
291The
292.Nm
293utility first appeared in
294.Dx 1.11 .
295.Sh AUTHORS
296.Nm
297was written by
298.An Matthias Schmidt Aq matthias@dragonflybsd.org
299and
300.An Simon Schubert Aq corecode@dragonflybsd.org .