diff --git a/REFERENCE.md b/REFERENCE.md
index bbc59bf3..04ffca69 100644
--- a/REFERENCE.md
+++ b/REFERENCE.md
@@ -124,6 +124,10 @@ The following parameters are available in the `postfix` class:
* [`masquerade_domains`](#-postfix--masquerade_domains)
* [`masquerade_exceptions`](#-postfix--masquerade_exceptions)
* [`mta`](#-postfix--mta)
+* [`mta_virtual_content`](#-postfix--mta_virtual_content)
+* [`mta_virtual_source`](#-postfix--mta_virtual_source)
+* [`mta_transport_content`](#-postfix--mta_transport_content)
+* [`mta_transport_source`](#-postfix--mta_transport_source)
* [`mydestination`](#-postfix--mydestination)
* [`mynetworks`](#-postfix--mynetworks)
* [`myorigin`](#-postfix--myorigin)
@@ -477,6 +481,42 @@ This option is mutually exclusive with the satellite Boolean.
Default value: `false`
+##### `mta_virtual_content`
+
+Data type: `Optional[String]`
+
+A free form string that defines the contents of the virtual file. Only used if mta is true.
+This parameter is mutually exclusive with mta_virtual_source.
+
+Default value: `undef`
+
+##### `mta_virtual_source`
+
+Data type: `Optional[String]`
+
+A String whose value is a location for the source file to be used for the virtual file.
+Only used if mta is true. This parameter is mutually exclusive with mta_virtual_content.
+
+Default value: `undef`
+
+##### `mta_transport_content`
+
+Data type: `Optional[String]`
+
+A free form string that defines the contents of the transport file. Only used if mta is true.
+This parameter is mutually exclusive with mta_transport_source.
+
+Default value: `undef`
+
+##### `mta_transport_source`
+
+Data type: `Optional[String]`
+
+A String whose value is a location for the source file to be used for the transport file.
+Only used if mta is true. This parameter is mutually exclusive with mta_transport_content.
+
+Default value: `undef`
+
##### `mydestination`
Data type: `String`
diff --git a/manifests/init.pp b/manifests/init.pp
index eb012871..616552e7 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -187,6 +187,22 @@
# A Boolean to define whether to configure Postfix as a mail transfer agent.
# This option is mutually exclusive with the satellite Boolean.
#
+# @param mta_virtual_content
+# A free form string that defines the contents of the virtual file. Only used if mta is true.
+# This parameter is mutually exclusive with mta_virtual_source.
+#
+# @param mta_virtual_source
+# A String whose value is a location for the source file to be used for the virtual file.
+# Only used if mta is true. This parameter is mutually exclusive with mta_virtual_content.
+#
+# @param mta_transport_content
+# A free form string that defines the contents of the transport file. Only used if mta is true.
+# This parameter is mutually exclusive with mta_transport_source.
+#
+# @param mta_transport_source
+# A String whose value is a location for the source file to be used for the transport file.
+# Only used if mta is true. This parameter is mutually exclusive with mta_transport_content.
+#
# @param mydestination
# A string to define the mydestination parameter in main.cf (postconf(5)).
# Example: `example.com, foo.example.com`.
@@ -286,6 +302,10 @@
Optional[Array[String[1]]] $masquerade_domains = undef,
Optional[Array[String[1]]] $masquerade_exceptions = undef,
Boolean $mta = false,
+ Optional[String] $mta_virtual_content = undef,
+ Optional[String] $mta_virtual_source = undef,
+ Optional[String] $mta_transport_content = undef,
+ Optional[String] $mta_transport_source = undef,
String $mydestination = '$myhostname, localhost.$mydomain, localhost', # postfix_mydestination
String $mynetworks = '127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128', # postfix_mynetworks
String $myorigin = $facts['networking']['fqdn'],
@@ -371,6 +391,14 @@
include postfix::ldap
}
+ if $mta_virtual_content and $mta_virtual_source {
+ fail('You must provide either \'mta_virtual_content\' or \'mta_virtual_source\', not both.')
+ }
+
+ if $mta_transport_content and $mta_transport_source {
+ fail('You must provide either \'mta_transport_content\' or \'mta_transport_source\', not both.')
+ }
+
if $mta {
if $satellite {
fail('enabling both the $mta and $satellite parameters is not supported. Please disable one.')
diff --git a/manifests/mta.pp b/manifests/mta.pp
index d3eb41a0..d46bb2af 100644
--- a/manifests/mta.pp
+++ b/manifests/mta.pp
@@ -51,10 +51,14 @@
}
postfix::hash { "${postfix::confdir}/virtual":
- ensure => 'present',
+ ensure => 'present',
+ content => $postfix::mta_virtual_content,
+ source => $postfix::mta_virtual_source,
}
postfix::hash { "${postfix::confdir}/transport":
- ensure => 'present',
+ ensure => 'present',
+ content => $postfix::mta_transport_content,
+ source => $postfix::mta_transport_source,
}
}