semantic-release-bot 6b9607634c chore(release): 2.0.1 [skip ci]
## [2.0.1](https://github.com/saltstack-formulas/postfix-formula/compare/v2.0.0...v2.0.1) (2022-01-25)

### Bug Fixes

* **config:** set default_database_type; fixes [#118](https://github.com/saltstack-formulas/postfix-formula/issues/118) ([3bd3d1c](3bd3d1c74e))

### Code Refactoring

* **config:** add `default_database_type` as default value ([6da70d2](6da70d21bb))

### Continuous Integration

* **3003.1:** update inc. AlmaLinux, Rocky & `rst-lint` [skip ci] ([3284d38](3284d38a36))
* **gemfile+lock:** use `ssf` customised `inspec` repo [skip ci] ([cfed974](cfed974000))
* **kitchen:** move `provisioner` block & update `run_command` [skip ci] ([31a3836](31a3836cd6))
* **kitchen+ci:** update with `3004` pre-salted images/boxes [skip ci] ([dec042a](dec042aa43))
* **kitchen+ci:** update with latest `3003.2` pre-salted images [skip ci] ([9688f36](9688f36aa1))
* **kitchen+ci:** update with latest CVE pre-salted images [skip ci] ([76134b4](76134b47c7))
* add `arch-master` to matrix and update `.travis.yml` [skip ci] ([c631eca](c631eca02e))
* add Debian 11 Bullseye & update `yamllint` configuration [skip ci] ([c11c07d](c11c07d6a6))
* **kitchen+gitlab:** adjust matrix to add `3003` [skip ci] ([04564a7](04564a7ad6))
* **kitchen+gitlab:** remove Ubuntu 16.04 & Fedora 32 (EOL) [skip ci] ([d56006f](d56006f8d2))

### Tests

* standardise use of `share` suite & `_mapdata` state [skip ci] ([4c394a7](4c394a76fa))
2022-01-25 12:19:23 +00:00
..
2022-01-25 12:19:23 +00:00
2022-01-25 12:19:23 +00:00

.. _readme:

postfix-formula
===============

|img_travis| |img_sr|

.. |img_travis| image:: https://travis-ci.com/saltstack-formulas/postfix-formula.svg?branch=master
   :alt: Travis CI Build Status
   :scale: 100%
   :target: https://travis-ci.com/saltstack-formulas/postfix-formula
.. |img_sr| image:: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
   :alt: Semantic Release
   :scale: 100%
   :target: https://github.com/semantic-release/semantic-release

A SaltStack formula to install and configure Postfix mail server.

.. contents:: **Table of Contents**

General notes
-------------

See the full `SaltStack Formulas installation and usage instructions
<https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html>`_.

If you are interested in writing or contributing to formulas, please pay attention to the `Writing Formula Section
<https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#writing-formulas>`_.

If you want to use this formula, please pay attention to the ``FORMULA`` file and/or ``git tag``,
which contains the currently released version. This formula is versioned according to `Semantic Versioning <http://semver.org/>`_.

See `Formula Versioning Section <https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#versioning>`_ for more details.

Contributing to this repo
-------------------------

**Commit message formatting is significant!!**

Please see `How to contribute <https://github.com/saltstack-formulas/.github/blob/master/CONTRIBUTING.rst>`_ for more details.

Available states
----------------

.. contents::
   :local:

``postfix``
^^^^^^^^^^^

Installs and starts postfix SMTP server

``postfix.config``
^^^^^^^^^^^^^^^^^^

Manages postfix main.cf and optionally the master.cf configuration file. Generates mappings.

``postfix.policyd-spf``
^^^^^^^^^^^^^^^^^^^^^^^

Installs and configures policyd-spf

``postfix.postgrey``
^^^^^^^^^^^^^^^^^^^^

Installs and starts Postgrey service

``postfix.mysql``
^^^^^^^^^^^^^^^^^

Installs postfix mysql package ( Debian only)

``postfix.pcre``
^^^^^^^^^^^^^^^^

Installs postfix pcre package ( Debian only)

``postfix.postsrsd``
^^^^^^^^^^^^^^^^^^^^

Installs postfix postsrsd package


Testing
-------

Linux testing is done with ``kitchen-salt``.

Requirements
^^^^^^^^^^^^

* Ruby
* Docker

.. code-block:: bash

   $ gem install bundler
   $ bundle install
   $ bin/kitchen test [platform]

Where ``[platform]`` is the platform name defined in ``kitchen.yml``,
e.g. ``debian-9-2019-2-py3``.

``bin/kitchen converge``
^^^^^^^^^^^^^^^^^^^^^^^^

Creates the docker instance and runs the main state(s), ready for testing.

``bin/kitchen verify``
^^^^^^^^^^^^^^^^^^^^^^

Runs the ``inspec`` tests on the actual instance.

``bin/kitchen destroy``
^^^^^^^^^^^^^^^^^^^^^^^

Removes the docker instance.

``bin/kitchen test``
^^^^^^^^^^^^^^^^^^^^

Runs all of the stages above in one go: i.e. ``destroy`` + ``converge`` + ``verify`` + ``destroy``.

``bin/kitchen login``
^^^^^^^^^^^^^^^^^^^^^

Gives you SSH access to the instance for manual testing.