Add set_myhostname()
and set_mydestination()
for postfix
This commit is contained in:
parent
fec1c66422
commit
f787b3ad79
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
#
|
||||
# Rattail -- Retail Software Framework
|
||||
# Copyright © 2010-2018 Lance Edgar
|
||||
# Copyright © 2010-2019 Lance Edgar
|
||||
#
|
||||
# This file is part of Rattail.
|
||||
#
|
||||
|
@ -24,8 +24,6 @@
|
|||
Fabric library for Postfix
|
||||
"""
|
||||
|
||||
from __future__ import unicode_literals, absolute_import
|
||||
|
||||
from rattail_fabric2 import apt
|
||||
|
||||
|
||||
|
@ -66,6 +64,20 @@ def set_config(c, setting, value):
|
|||
c.sudo("postconf -e '{}={}'".format(setting, value))
|
||||
|
||||
|
||||
def set_myhostname(c, hostname):
|
||||
"""
|
||||
Configure the 'myhostname' setting with the given string.
|
||||
"""
|
||||
set_config(c, 'myhostname', hostname)
|
||||
|
||||
|
||||
def set_mydestination(c, *destinations):
|
||||
"""
|
||||
Configure the 'mydestinations' setting with the given strings.
|
||||
"""
|
||||
set_config(c, 'mydestination', ', '.join(destinations))
|
||||
|
||||
|
||||
def set_relayhost(c, relayhost):
|
||||
"""
|
||||
Configure the 'relayhost' setting with the given string
|
||||
|
|
Loading…
Reference in a new issue