.. -*- coding: utf-8; indent-tabs-mode: nil; -*-

bsmtp2dma
=========

Synopsis
--------

**bsmtp2dma** **-V**

**bsmtp2dma** [**-8**] [**-c** `address`] [**-d** `n`] [**-f** `address`] [**-h** `mailhost:port`] [**-l** `number`] [**-r** `address`] [**-s** `subject`] `recipient` ...


Description
-----------

A Bacula compatible mail submission programm and an alternative to Bacula's
:command:`bsmtp` SMTP client.

Bacula's :command:`bsmtp` needs an underlying mailer that listens on a
TCP port. :command:`bsmtp2dma` can be used if the underlying mailer does `not`
listen to an SMTP port (e.g. :manpage:`dma(8)`, :command:`ssmtp` et al.).

The underlying mailer should be compatible to :command:`sendmail`.


Options
-------

.. program:: bsmtp2dma

.. option:: -V

   Show the program version and usage and exit.

.. option:: -8

   Does nothing. Act as a compatibility option for :command:`bsmtp`.

.. option:: -c address

   Set the ``CC:`` header to `address`

.. option:: -d n

   Does nothing. Act as a compatibility option for :command:`bsmtp`.

.. option:: -f address

   Set the ``FROM:`` header to `address`.

   If not given it it set to the sender's address.

.. option:: -h mailhost:port

   Does nothing. Act as a compatibility option for :command:`bsmtp`.

.. option:: -l number

   Does nothing. Act as a compatibility option for :command:`bsmtp`.

.. option:: -r address

   Set the ``Reply-To:`` header to `address`.

.. option:: -s subject

   Set the "Subject:" header to `subject`.


Implementation Notes
--------------------

The body of the email message is read from standard input. Message is
terminated by sending the ``EOF`` character (:kbd:`Control-d` on many
systems) on the start of a new line, much like many :command:`mail`
commands.

The message is collected into a temporary file and send to all given
recipients by using the configured underlying mail command.


Files
-----

:command:`bsmtp2dma` reads a configuration file -- if available -- from
:file:`/usr/local/etc/local-bsdtools/bsmtp2dma.conf`.

It is a shell style configuration file which is sourced in at program start.

The following configuration settings are currently supported:

  ``MAILER``
      The absolute path to the underlying mail command.

      The default is :command:`/usr/sbin/sendmail`.


See Also
--------

:manpage:`bsmtp2dma.conf(5)`
