Skip to content
This repository was archived by the owner on Nov 27, 2021. It is now read-only.
Open
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,8 @@ Determines which email address should be used for the redirecting. Defaults to "

#### `relayhost`

Determines which host should be used as relayhost for outgoing emails. Defaults
to "smtp.${::domain}".
Determines which host should be used as relayhost for outgoing emails. By default
no relay host is set and e-mail is transmitted directly.

#### `relayport`

Expand Down
2 changes: 1 addition & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
$myhostname = $::fqdn,
$mydestination = "${::fqdn}, localhost.${::domain}, localhost",
$recipient = "admin@${::domain}",
$relayhost = "smtp.${::domain}",
$relayhost = undef,
$relayport = 25,
$sasl_user = undef,
$sasl_pass = undef,
Expand Down
4 changes: 4 additions & 0 deletions templates/Debian/etc/postfix/main.cf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = <%= scope['::postfix::mydestination'] %>

<% if scope['::postfix::relayhost'] -%>
relayhost = [<%= scope['::postfix::relayhost'] -%>]:<%= scope['::postfix::relayport'] %>
<% end -%>

mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
Expand Down
5 changes: 4 additions & 1 deletion templates/Gentoo/etc/postfix/main.cf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,10 @@ mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
#relayhost = [mailserver.isp.tld]
#relayhost = uucphost
#relayhost = [an.ip.add.ress]
relayhost = <%= scope.lookupvar('::postfix::relayhost') %>
#
<% if scope['::postfix::relayhost'] -%>
relayhost = [<%= scope['::postfix::relayhost'] -%>]:<%= scope['::postfix::relayport'] %>
<% end -%>

# REJECTING UNKNOWN RELAY USERS
#
Expand Down
4 changes: 4 additions & 0 deletions templates/Ubuntu/etc/postfix/main.cf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = <%= scope['::postfix::mydestination'] %>

<% if scope['::postfix::relayhost'] -%>
relayhost = [<%= scope['::postfix::relayhost'] -%>]:<%= scope['::postfix::relayport'] %>
<% end -%>

mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
Expand Down