1 .\" 2 .\" Copyright (c) 2008-2014, Simon Schubert <2@0x2c.org>. 3 .\" Copyright (c) 2008 4 .\" The DragonFly Project. All rights reserved. 5 .\" 6 .\" Redistribution and use in source and binary forms, with or without 7 .\" modification, are permitted provided that the following conditions 8 .\" are met: 9 .\" 10 .\" 1. Redistributions of source code must retain the above copyright 11 .\" notice, this list of conditions and the following disclaimer. 12 .\" 2. Redistributions in binary form must reproduce the above copyright 13 .\" notice, this list of conditions and the following disclaimer in 14 .\" the documentation and/or other materials provided with the 15 .\" distribution. 16 .\" 3. Neither the name of The DragonFly Project nor the names of its 17 .\" contributors may be used to endorse or promote products derived 18 .\" from this software without specific, prior written permission. 19 .\" 20 .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23 .\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 24 .\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25 .\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, 26 .\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 27 .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 28 .\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29 .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 30 .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 .\" SUCH DAMAGE. 32 .\" 33 .Dd May 20, 2017 34 .Dt DMA 8 35 .Os 36 .Sh NAME 37 .Nm dma 38 .Nd DragonFly Mail Agent 39 .Sh SYNOPSIS 40 .Nm 41 .Op Fl DiOt 42 .Op Fl A Ns Ar mode 43 .Op Fl b Ns Ar mode 44 .Op Fl f Ar sender 45 .Op Fl L Ar tag 46 .Op Fl o Ns Ar option 47 .Op Fl r Ar sender 48 .Op Fl q Ns Op Ar arg 49 .Op Ar recipient ... 50 .Sh DESCRIPTION 51 .Nm 52 is a small Mail Transport Agent (MTA), designed for home and office use. 53 It accepts mails from locally installed Mail User Agents (MUA) and 54 delivers the mails either locally or to a remote destination. 55 Remote delivery includes several features like TLS/SSL support and SMTP 56 authentication. 57 .Pp 58 .Nm 59 is not intended as a replacement for real, big MTAs like 60 .Xr sendmail 8 61 or 62 .Xr postfix 1 . 63 Consequently, 64 .Nm 65 does not listen on port 25 for incoming connections. 66 .Pp 67 The options are as follows: 68 .Bl -tag -width indent 69 .It Fl A Ns Ar mode 70 .Fl \&Ac 71 acts as a compatibility option for sendmail. 72 .It Fl b Ns Ar mode 73 .Bl -tag -width indent 74 .It Fl bp 75 List all mails currently stored in the mail queue. 76 .It Fl bq 77 Queue the mail, but do not attempt to deliver it. 78 See also the 79 .Sq DEFER 80 config file setting below. 81 .El 82 .Pp 83 All other 84 .Ar mode Ns 85 s are ignored. 86 .It Fl D 87 Do not run in the background. 88 Useful for debugging. 89 .It Fl f Ar sender 90 Set sender address (envelope-from) to 91 .Ar sender . 92 This overrides the value of the environment variable 93 .Ev EMAIL . 94 .It Fl i 95 Ignore dots alone on lines by themselves in incoming messages. 96 This should be set if you are reading data from a file. 97 .It Fl L Ar tag 98 Set the identifier used in syslog messages to the supplied 99 .Ar tag . 100 This is a compatibility option for sendmail. 101 .It Fl O 102 This is a compatibility option for sendmail. 103 .It Fl o Ns Ar option 104 Specifying 105 .Fl oi 106 is synonymous to 107 .Fl i . 108 All other options are ignored. 109 .It Fl q Ns Op Ar arg 110 Process saved messages in the queue. 111 The argument is optional and ignored. 112 .It Fl r Ar sender 113 Same as 114 .Fl f . 115 .It Fl t 116 Obtain recipient addresses from the message header. 117 .Nm 118 will parse the 119 .Li To: , 120 .Li Cc: , 121 and 122 .Li Bcc: 123 headers. 124 The 125 .Li Bcc: 126 header will be removed independent of whether 127 .Fl t 128 is specified or not. 129 .El 130 .Sh CONFIGURATION 131 .Nm 132 can be configured with two config files: 133 .Pp 134 .Bl -bullet -compact 135 .It 136 auth.conf 137 .It 138 dma.conf 139 .El 140 .Pp 141 These two files are stored per default in 142 .Pa /etc/dma . 143 .Sh FILE FORMAT 144 Every file contains parameters of the form 145 .Sq name value . 146 Lines containing boolean values are set to 147 .Sq NO 148 if the line is commented and to 149 .Sq YES 150 if the line is uncommented. 151 Empty lines or lines beginning with a 152 .Sq # 153 are ignored. 154 Parameter names and their values are case sensitive. 155 .Sh PARAMETERS 156 .Ss auth.conf 157 SMTP authentication can be configured in 158 .Pa auth.conf . 159 Each line has the format 160 .Dq Li user|smarthost:password . 161 .Ss dma.conf 162 Most of the behaviour of 163 .Nm 164 can be configured in 165 .Pa dma.conf . 166 .Bl -tag -width 4n 167 .It Ic SMARTHOST Xo 168 (string, default=empty) 169 .Xc 170 If you want to send outgoing mails via a smarthost, set this variable to 171 your smarthosts address. 172 .It Ic PORT Xo 173 (numeric, default=25) 174 .Xc 175 Use this port to deliver remote emails. 176 Only useful together with the 177 .Sq SMARTHOST 178 option, because 179 .Nm 180 will deliver all mails to this port, regardless of whether a smarthost is set 181 or not. 182 .It Ic ALIASES Xo 183 (string, default=/etc/aliases) 184 .Xc 185 Path to the local aliases file. 186 Just stick with the default. 187 The aliases file is of the format 188 .Dl nam: dest1 dest2 ... 189 In this case, mails to 190 .Li nam 191 will instead be delivered to 192 .Li dest1 193 and 194 .Li dest2 , 195 which in turn could be entries in 196 .Pa /etc/aliases . 197 The special name 198 .Ql * 199 can be used to create a catch-all alias, which gets used if no other 200 matching alias is found. 201 Use the catch-all alias only if you do not want any local mail to be 202 delivered. 203 .It Ic SPOOLDIR Xo 204 (string, default=/var/spool/dma) 205 .Xc 206 Path to 207 .Nm Ap s 208 spool directory. 209 Just stick with the default. 210 .It Ic AUTHPATH Xo 211 (string, default=not set) 212 .Xc 213 Path to the 214 .Sq auth.conf 215 file. 216 .It Ic SECURETRANSFER Xo 217 (boolean, default=commented) 218 .Xc 219 Uncomment if you want TLS/SSL secured transfer. 220 .It Ic STARTTLS Xo 221 (boolean, default=commented) 222 .Xc 223 Uncomment if you want to use STARTTLS. 224 Only useful together with 225 .Sq SECURETRANSFER . 226 .It Ic OPPORTUNISTIC_TLS Xo 227 (boolean, default=commented) 228 .Xc 229 Uncomment if you want to allow the STARTTLS negotiation to fail. 230 Most useful when 231 .Nm 232 is used without a smarthost, delivering remote messages directly to 233 the outside mail exchangers; in opportunistic TLS mode, the connection will 234 be encrypted if the remote server supports STARTTLS, but an unencrypted 235 delivery will still be made if the negotiation fails. 236 Only useful together with 237 .Sq SECURETRANSFER 238 and 239 .Sq STARTTLS . 240 .It Ic CERTFILE Xo 241 (string, default=empty) 242 .Xc 243 Path to your SSL certificate file. 244 .It Ic SECURE Xo 245 (boolean, default=commented) 246 .Xc 247 Uncomment this entry and change it to 248 .Sq INSECURE 249 to use plain text SMTP login over an insecure connection. 250 You have to rename this variable manually to prevent that you send your 251 password accidentally over an insecure connection. 252 .It Ic DEFER Xo 253 (boolean, default=commented) 254 .Xc 255 Uncomment if you want that 256 .Nm 257 defers your mail. 258 You have to flush your mail queue manually with the 259 .Fl q 260 option. 261 This option is handy if you are behind a dialup line. 262 .It Ic FULLBOUNCE Xo 263 (boolean, default=commented) 264 .Xc 265 Uncomment if you want the bounce message to include the complete original 266 message, not just the headers. 267 .It Ic MAILNAME Xo 268 (string, default=empty) 269 .Xc 270 The internet hostname 271 .Nm 272 uses to identify the host. 273 If not set or empty, the result of 274 .Xr gethostname 3 275 is used. 276 If 277 .Sq MAILNAME 278 is an absolute path to a file, the first line of this file will be used 279 as the hostname. 280 .It Ic MASQUERADE Xo 281 (string, default=empty) 282 .Xc 283 Masquerade the envelope-from addresses with this address/hostname. 284 Use this setting if mails are not accepted by destination mail servers 285 because your sender domain is invalid. 286 This setting is overridden by the 287 .Fl f 288 flag and the 289 .Ev EMAIL 290 environment variable. 291 .Pp 292 If 293 .Sq MASQUERADE 294 does not contain a 295 .Li @ 296 sign, the string is interpreted as a host name. 297 For example, setting 298 .Sq MASQUERADE 299 to 300 .Ql john@ 301 on host 302 .Ql hamlet 303 will send all mails as 304 .Ql john@hamlet ; 305 setting it to 306 .Ql percolator 307 will send all mails as 308 .Sm off 309 .Ql Va username @percolator . 310 .Sm on 311 .It Ic NULLCLIENT Xo 312 .Xc 313 Bypass aliases and local delivery, and instead forward all mails to 314 the defined 315 .Sq SMARTHOST . 316 .Sq NULLCLIENT 317 requires 318 .Sq SMARTHOST 319 to be set. 320 .El 321 .Ss Environment variables 322 The behavior of 323 .Nm 324 can be influenced by some environment variables. 325 .Bl -tag -width 4n 326 .It Ev EMAIL Xo 327 .Xc 328 Used to set the sender address (envelope-from). 329 Use a plain address, in the form of 330 .Li user@example.com . 331 This value will be overridden when the 332 .Fl f 333 flag is used. 334 .El 335 .Sh SEE ALSO 336 .Xr mailaddr 7 , 337 .Xr mailwrapper 8 , 338 .Xr sendmail 8 339 .Rs 340 .%A "J. B. Postel" 341 .%T "Simple Mail Transfer Protocol" 342 .%O RFC 821 343 .Re 344 .Rs 345 .%A "J. Myers" 346 .%T "SMTP Service Extension for Authentication" 347 .%O RFC 2554 348 .Re 349 .Rs 350 .%A "P. Hoffman" 351 .%T "SMTP Service Extension for Secure SMTP over TLS" 352 .%O RFC 2487 353 .Re 354 .Sh HISTORY 355 The 356 .Nm 357 utility first appeared in 358 .Dx 1.11 . 359 .Sh AUTHORS 360 .An -nosplit 361 .Nm 362 was written by 363 .An Matthias Schmidt Aq Mt matthias@dragonflybsd.org 364 and 365 .An Simon Schubert Aq Mt 2@0x2c.org . 366