mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	puppet: Only match incoming gateway address on our mail domain.
79931051bd allows outgoing emails from
localhost, but outgoing recipients are still subjected to virtualmaps.
This caused all outgoing email from Zulip with destination addresses
containing `.`, `+`, or starting with `mm`, to be redirected back
through the email gateway.
Bracket the virualmap addresses used for local delivery to the mail
gateway with a restriction on the domain matching the
`postfix.mailname` configuration, regex-escaped, so those only apply
to email destined for that domain.
The hostname is _not_ moved from `mydestination` to
`virtual_alias_domains`, as that would preclude delivery to
actually-local addresses, like `postmaster@`.
			
			
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							961d1d0a68
						
					
				
				
					commit
					a53092687e
				
			@@ -45,7 +45,7 @@ class zulip::postfix_localmail {
 | 
			
		||||
    mode    => '0644',
 | 
			
		||||
    owner   => root,
 | 
			
		||||
    group   => root,
 | 
			
		||||
    source  => 'puppet:///modules/zulip/postfix/virtual',
 | 
			
		||||
    content => template('zulip/postfix/virtual.erb'),
 | 
			
		||||
    require => Package[postfix],
 | 
			
		||||
    notify  => Service['postfix'],
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,7 @@
 | 
			
		||||
if /@<%= Regexp.escape(@postfix_mailname) %>\.?$/
 | 
			
		||||
# Changes to this list require a corresponding change to `access` as
 | 
			
		||||
# well.
 | 
			
		||||
 | 
			
		||||
/\+.*@/  zulip@localhost
 | 
			
		||||
/\..*@/  zulip@localhost
 | 
			
		||||
/^mm/    zulip@localhost
 | 
			
		||||
endif
 | 
			
		||||
		Reference in New Issue
	
	Block a user