Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,15 +180,16 @@ user and .forward.
- *Module Default*: '+'


main_relayhost (default: empty)
main_relayhost & main_relayhost_port (default: empty)
-------------------------------
The next-hop destination of non-local mail; overrides non-local domains in recipient addresses.
This information is overruled with relay_transport, sender_dependent_default_transport_maps,
default_transport, sender_dependent_relayhost_maps and with the transport(5) table.
In the case of SMTP, specify a domain name, hostname, hostname:port, [hostname]:port, [hostaddress]
or [hostaddress]:port. The form [hostname] turns off MX lookups.

- *Module Default*: "mailhost.${::domain}"
- *Module Default* for host: "mailhost.${::domain}"
- *Module Default* for port: '25'


main_setgid_group (default: postdrop)
Expand Down
5 changes: 4 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
$main_queue_directory = 'USE_DEFAULTS',
$main_recipient_delimiter = '+',
$main_relayhost = "mailhost.${::domain}",
$main_relayhost_port = '25',
$main_setgid_group = 'USE_DEFAULTS',
$packages = 'USE_DEFAULTS',
$service_enable = 'true',
Expand Down Expand Up @@ -113,7 +114,8 @@
'USE_DEFAULTS' => $default_main_recipient_delimiter,
default => $main_recipient_delimiter }

$main_relayhost_real = $main_relayhost
$main_relayhost_real = $main_relayhost
$main_relayhost_port_real = $main_relayhost_port

$main_setgid_group_real = $main_setgid_group ? {
'USE_DEFAULTS' => $default_main_setgid_group,
Expand Down Expand Up @@ -151,6 +153,7 @@
validate_absolute_path($main_queue_directory_real)
# main_recipient_delimiter can not be checkek, it can contain nothing to everything
if is_domain_name($main_relayhost_real) == false { fail("main_relayhost must be a domain name and is set to <${$main_relayhost_real}>") }
if is_integer($main_relayhost_port_real) == false { fail("main_relayhost_port must be an integer and is set to <${$main_relayhost_port_real}>") }
if empty($main_setgid_group_real) == true { fail("main_setgid_group must contain a valid value and is set to <${main_setgid_group_real}>") }
if empty($packages_real) == true { fail("packages must contain a valid value and is set to <${packages_real}>") }
validate_re($service_enable_real, '^(true|false|manual)$', "service_enable may be either 'true', 'false' or 'manual' and is set to <${service_enable_real}>")
Expand Down
2 changes: 1 addition & 1 deletion templates/main.cf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ queue_directory = <%= @main_queue_directory_real %>
recipient_delimiter = <%= @main_recipient_delimiter_real %>

# relayhost =
relayhost = <%= @main_relayhost_real %>
relayhost = <%= @main_relayhost_real %>:<%= @main_relayhost_port_real %>

# setgid_group = postdrop
setgid_group = <%= @main_setgid_group_real %>