mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 16:14:02 +00:00
puppet: Restrict postfix incoming addresses to postmaster and zulip.
This removes the possibility of local user enumeration via RCPT TO.
This commit is contained in:
committed by
Alex Vandiver
parent
ed8796f23f
commit
1c17583ad5
9
puppet/zulip/files/postfix/access
Normal file
9
puppet/zulip/files/postfix/access
Normal file
@@ -0,0 +1,9 @@
|
||||
# This is the list of email addresses that are accepted via SMTP;
|
||||
# these consist of only the addresses in `virtual`, as well as the
|
||||
# RFC822-specified postmaster.
|
||||
|
||||
/\+.*@/ OK
|
||||
/\..*@/ OK
|
||||
/^mm/ OK
|
||||
|
||||
/^postmaster@/ OK
|
@@ -1,3 +1,6 @@
|
||||
/\+.*@/ zulip@localhost
|
||||
/\..*@/ zulip@localhost
|
||||
/^mm/ zulip@localhost
|
||||
# Changes to this list require a corresponding change to `access` as
|
||||
# well.
|
||||
|
||||
/\+.*@/ zulip@localhost
|
||||
/\..*@/ zulip@localhost
|
||||
/^mm/ zulip@localhost
|
||||
|
@@ -67,4 +67,12 @@ class zulip::postfix_localmail {
|
||||
],
|
||||
}
|
||||
|
||||
file {'/etc/postfix/access':
|
||||
ensure => file,
|
||||
mode => '0644',
|
||||
owner => root,
|
||||
group => root,
|
||||
source => 'puppet:///modules/zulip/postfix/access',
|
||||
require => Package[postfix],
|
||||
}
|
||||
}
|
||||
|
@@ -16,6 +16,7 @@ smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
|
||||
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
|
||||
|
||||
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
|
||||
smtpd_recipient_restrictions = check_recipient_access regexp:/etc/postfix/access, reject
|
||||
myhostname = <%= @fqdn %>
|
||||
alias_maps = hash:/etc/aliases
|
||||
alias_database = hash:/etc/aliases
|
||||
|
Reference in New Issue
Block a user