dma: add queue-only mode (no instant delivery attempt)
[dragonfly.git] / libexec / dma / dma.8
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 .\"
32 .\" $DragonFly: src/libexec/dma/dma.8,v 1.10 2008/09/06 14:17:56 swildner Exp $
33 .\"
34 .Dd September 2, 2008
35 .Dt DMA 8
36 .Os
37 .Sh NAME
38 .Nm dma
39 .Nd DragonFly Mail Agent
40 .Sh SYNOPSIS
41 .Nm
42 .Op Fl DiO
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
49 .Op Fl q Ar arg
50 .Op Ar recipient ...
51 .Sh DESCRIPTION
52 .Nm
53 is a small Mail Transport Agent (MTA), designed for home and office use.
54 It accepts mails from locally installed Mail User Agents (MUA) and
55 delivers the mails either locally or to a remote destination.
56 Remote delivery includes several features like TLS/SSL support and SMTP
57 authentication.
58 .Pp
59 .Nm
60 is not intended as a replacement for real, big MTAs like
61 .Xr sendmail 8
62 or
63 .Xr postfix 1 .
64 Consequently,
65 .Nm
66 does not listen on port 25 for incoming connections.
67 .Pp
68 The options are as follows:
69 .Bl -tag -width indent
70 .It Fl A Ar mode
71 .Fl A Ns Ar c
72 acts as a compatibility option for sendmail.
73 .It Fl b Ar mode
74 .Bl -tag -width indent
75 .It Fl bp
76 List all mails currently stored in the mail queue.
77 .It Fl bq
78 Queue the mail, but don't attempt to deliver it.
79 See also the
80 .Sq DEFER
81 config file setting below.
82 .El
83 .Pp
84 All other
85 .Ar mode Ns
86 s are are ignored.
87 .It Fl D
88 Don't run in the background.
89 Useful for debugging.
90 .It Fl f Ar sender
91 Set sender address to
92 .Ar sender .
93 .It Fl i
94 Ignore dots alone on lines by themselves in incoming messages.
95 This should be set if you are reading data from a file.
96 .It Fl L Ar tag
97 Set the identifier used in syslog messages to the supplied
98 .Ar tag .
99 This is a compatibility option for sendmail.
100 .It Fl O
101 This is a compatibility option for sendmail.
102 .It Fl o Ar option
103 Specifying
104 .Fl o Ns Ar i
105 is synonymous to
106 .Fl i .
107 All other options are ignored.
108 .It Fl q Ar arg
109 Process saved messages in the queue.
110 The argument is required for compatibility with sendmail, and ignored.
111 .It Fl r Ar sender
112 Same as
113 .Fl f .
114 .El
115 .Sh CONFIGURATION
116 .Nm
117 can be configured with three config files:
118 .Pp
119 .Bl -bullet -compact
120 .It
121 auth.conf
122 .It
123 dma.conf
124 .It
125 virtusertable
126 .El
127 .Pp
128 These three files are stored per default in
129 .Pa /etc/dma .
130 .Sh FILE FORMAT
131 Every file contains parameters of the form
132 .Sq name value .
133 Lines containing boolean values are set to
134 .Sq NO
135 if the line is commented and to
136 .Sq YES
137 if the line is uncommented.
138 Empty lines or lines beginning with a
139 .Sq #
140 are ignored.
141 Parameter names and their values are case sensitive.
142 .Sh PARAMETERS
143 .Ss auth.conf
144 SMTP authentication can be configured in
145 .Pa auth.conf .
146 Each line has the format
147 .Dq Li user|smarthost:password .
148 .Ss dma.conf
149 Most of the behaviour of
150 .Nm
151 can be configured in
152 .Pa dma.conf .
153 .Bl -tag -width 4n
154 .It Ic SMARTHOST Xo
155 (string, default=empty)
156 .Xc
157 If you want to send outgoing mails via a smarthost, set this variable to
158 your smarthosts address.
159 .It Ic PORT Xo
160 (numeric, default=25)
161 .Xc
162 Use this port to deliver remote emails.
163 Only useful together with the
164 .Sq SMARTHOST
165 option, because
166 .Nm
167 will deliver all mails to this port, regardless of whether a smarthost is set
168 or not.
169 .It Ic ALIASES Xo
170 (string, default=/etc/mail/aliases)
171 .Xc
172 Path to the local aliases file.
173 Just stick with the default.
174 .It Ic SPOOLDIR Xo
175 (string, default=/var/spool/dma)
176 .Xc
177 Path to
178 .Nm Ap s
179 spool directory.
180 Just stick with the default.
181 .It Ic VIRTPATH Xo
182 (string, default=/etc/dma/virtusertable)
183 .Xc
184 Path to the
185 .Sq virtusertable
186 file.
187 .It Ic AUTHPATH Xo
188 (string, default=/etc/dma/auth.conf)
189 .Xc
190 Path to the
191 .Sq auth.conf
192 file.
193 .It Ic VIRTUAL Xo
194 (boolean, default=commented)
195 .Xc
196 Comment if you want virtual user support.
197 .It Ic SECURETRANS Xo
198 (boolean, default=commented)
199 .Xc
200 Comment if you want TLS/SSL secured transfer.
201 .It Ic STARTTLS Xo
202 (boolean, default=commented)
203 .Xc
204 Comment if you want to use STARTTLS.
205 Only useful together with
206 .Sq SECURETRANS .
207 .It Ic CERTFILE Xo
208 (string, default=empty)
209 .Xc
210 Path to your SSL certificate file.
211 .It Ic SECURE Xo
212 (boolean, default=commented)
213 .Xc
214 Change this entry to
215 .Sq INSECURE
216 to use plain text SMTP login over an insecure connection.
217 You have to rename this variable manually to prevent that you send your
218 password accidentally over an insecure connection.
219 .It Ic DEFER Xo
220 (boolean, default=commented)
221 .Xc
222 Comment if you want that
223 .Nm
224 defers your mail.
225 You have to flush your mail queue manually with the
226 .Fl q
227 option.
228 This option is handy if you are behind a dialup line.
229 .It Ic FULLBOUNCE Xo
230 (boolean, default=commented)
231 .Xc
232 Uncomment if you want the bounce message to include the complete original
233 message, not just the headers.
234 .It Ic MAILNAME Xo
235 (string, default=empty)
236 .Xc
237 The name to be used when introducing this host, if different from
238 the result of
239 .Xr hostname 1 .
240 If specified, this option overrides
241 .Sq MAILNAMEFILE .
242 .It Ic MAILNAMEFILE Xo
243 (string, default=empty)
244 .Xc
245 The name of the file to read the
246 .Sq MAILNAME
247 from.
248 .El
249 .Ss virtusertable
250 The
251 .Pa virtusertable
252 file specifies a virtual user table.
253 Each line has the format
254 .Dq Li localuser:mail-address .
255 Some smarthosts do not accept mails from unresolvable email address
256 (e.g.\& user@localhost) so you have to rewrite your outgoing email
257 address to a valid address.
258 .Sh SEE ALSO
259 .Xr mailaddr 7 ,
260 .Xr mailwrapper 8 ,
261 .Xr sendmail 8
262 .Rs
263 .%A "J. B. Postel"
264 .%T "Simple Mail Transfer Protocol"
265 .%O RFC 821
266 .Re
267 .Rs
268 .%A "J. Myers"
269 .%T "SMTP Service Extension for Authentication"
270 .%O RFC 2554
271 .Re
272 .Rs
273 .%A "P. Hoffman"
274 .%T "SMTP Service Extension for Secure SMTP over TLS"
275 .%O RFC 2487
276 .Re
277 .Sh HISTORY
278 The
279 .Nm
280 utility first appeared in
281 .Dx 1.11 .
282 .Sh AUTHORS
283 .Nm
284 was written by
285 .An Matthias Schmidt Aq matthias@dragonflybsd.org
286 and
287 .An Simon Schubert Aq corecode@dragonflybsd.org .