Source code for fabtools.require.postfix

"""
Postfix
=======

This module provides high-level tools for managing the Postfix_ email server.

.. _Postfix: http://www.postfix.org/

"""

from fabtools.deb import (
    install,
    is_installed,
    preseed_package,
)
from fabtools.require.service import started


[docs]def server(mailname): """ Require a Postfix email server. This makes sure that Postfix is installed and started. :: from fabtools import require # Handle incoming email for our domain require.postfix.server('example.com') """ # Ensure the package is installed if not is_installed('postfix'): preseed_package('postfix', { 'postfix/main_mailer_type': ('select', 'Internet Site'), 'postfix/mailname': ('string', mailname), 'postfix/destinations': ('string', '%s, localhost.localdomain, localhost ' % mailname), }) install('postfix') # Ensure the service is started started('postfix')
Read the Docs v: 0.17.0
Versions
latest
0.17.0
0.16.0
0.15.0
0.14.0
0.13.0
0.12.0
0.11.0
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.