.\"
+.\" Copyright (c) 2008-2014, Simon Schubert <2@0x2c.org>.
.\" Copyright (c) 2008
.\" The DragonFly Project. All rights reserved.
.\"
.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $DragonFly: src/libexec/dma/dma.8,v 1.10 2008/09/06 14:17:56 swildner Exp $
-.\"
-.Dd April 22, 2010
+.Dd February 13, 2014
.Dt DMA 8
.Os
.Sh NAME
.El
.Sh CONFIGURATION
.Nm
-can be configured with three config files:
+can be configured with two config files:
.Pp
.Bl -bullet -compact
.It
dma.conf
.El
.Pp
-These three files are stored per default in
+These two files are stored per default in
.Pa /etc/dma .
.Sh FILE FORMAT
Every file contains parameters of the form
will deliver all mails to this port, regardless of whether a smarthost is set
or not.
.It Ic ALIASES Xo
-(string, default=/etc/mail/aliases)
+(string, default=/etc/aliases)
.Xc
Path to the local aliases file.
Just stick with the default.
+The aliases file is of the format
+.Dl nam: dest1 dest2 ...
+In this case, mails to
+.Li nam
+will instead be delivered to
+.Li dest1
+and
+.Li dest2 ,
+which in turn could be entries in
+.Pa /etc/aliases .
+The special name
+.Ql *
+can be used to create a catch-all alias, which gets used if no other
+matching alias is found.
+Use the catch-all alias only if you don't want any local mail to be
+delivered.
.It Ic SPOOLDIR Xo
(string, default=/var/spool/dma)
.Xc
spool directory.
Just stick with the default.
.It Ic AUTHPATH Xo
-(string, default=/etc/dma/auth.conf)
+(string, default=not set)
.Xc
Path to the
.Sq auth.conf
Uncomment if you want to use STARTTLS.
Only useful together with
.Sq SECURETRANS .
+.It Ic OPPORTUNISTIC_TLS Xo
+(boolean, default=commented)
+.Xc
+Uncomment if you want to allow the STARTTLS negotiation to fail.
+Most useful when
+.Nm
+is used without a smarthost, delivering remote messages directly to
+the outside mail exchangers; in opportunistic TLS mode, the connection will
+be encrypted if the remote server supports STARTTLS, but an unencrypted
+delivery will still be made if the negotiation fails.
+Only useful together with
+.Sq SECURETRANS
+and
+.Sq STARTTLS .
.It Ic CERTFILE Xo
(string, default=empty)
.Xc
.It Ic MAILNAME Xo
(string, default=empty)
.Xc
-The name to be used when introducing this host, if different from
-the result of
-.Xr hostname 1 .
-If specified, this option overrides
-.Sq MAILNAMEFILE .
-.It Ic MAILNAMEFILE Xo
+The internet hostname
+.Nm
+uses to identify the host.
+If not set or empty, the result of
+.Xr gethostname 3
+is used.
+If
+.Sq MAILNAME
+is an absolute path to a file, the first line of this file will be used
+as the hostname.
+.It Ic MASQUERADE Xo
(string, default=empty)
.Xc
-The name of the file to read the
-.Sq MAILNAME
-from.
+Masquerade the envelope-from addresses with this address/hostname.
+Use this setting if mails are not accepted by destination mail servers
+because your sender domain is invalid.
+This setting is overridden by the
+.Fl f
+flag and the
+.Ev EMAIL
+environment variable.
+.Pp
+If
+.Sq MASQUERADE
+does not contain a
+.Li @
+sign, the string is interpreted as a host name.
+For example, setting
+.Sq MASQUERADE
+to
+.Ql john@
+on host
+.Ql hamlet
+will send all mails as
+.Ql john@hamlet ;
+setting it to
+.Ql percolator
+will send all mails as
+.Ql Sm off Va username @percolator .
+.Sm on
+.It Ic NULLCLIENT Xo
+.Xc
+Bypass aliases and local delivery, and instead forward all mails to
+the defined
+.Sq SMARTHOST .
+.Sq NULLCLIENT
+requires
+.Sq SMARTHOST
+to be set.
.El
.Ss Environment variables
The behavior of
.Nm
can be influenced by some environment variables.
-.Pp
.Bl -tag -width 4n
.It Ev EMAIL Xo
.Xc
utility first appeared in
.Dx 1.11 .
.Sh AUTHORS
+.An -nosplit
.Nm
was written by
-.An Matthias Schmidt Aq matthias@dragonflybsd.org
+.An Matthias Schmidt Aq Mt matthias@dragonflybsd.org
and
-.An Simon Schubert Aq corecode@dragonflybsd.org .
+.An Simon Schubert Aq Mt 2@0x2c.org .