On 7/12/2013 4:44 PM, Donny Brooks wrote:
> We run postfix 2.6.6 on a CentOS 6.3 server with a OpenLDAP 2.4.23 as a 
> backend. Up until recently when a user would depart the agency we would just 
> change their password and forward their email to their supervisor. However 
> today we have had a user that has left that gets literally over a thousand 
> "coupon" emails a day. We need to stop this user from receiving emails 
> altogether.  
> 
> Temporarily I have removed the users ldap account completely and it appears 
> that emails are indeed bouncing with a error 550 5.1.1 like I want. Any idea 
> how to accomplish this without totally removing the users account?
> 


I find the "relocated" feature useful for this.
http://www.postfix.org/postconf.5.html#relocated_maps

# main.cf
relocated_maps = hash:/etc/postfix/relocated

The relocated table is a list of recipients to reject and a comment,
usually a new email address, but the comment can be anything.

# relocated
previous_resid...@example.com    u...@gmail.com
## or if you don't have a new address,
former_u...@example.com    unknown -- 12-07-2013


You can also use a check_recipient_access map in your
smtpd_recipient_restrictions list, but for this purpose I find the
relocated table easier.

You can also add the former recipient to the transport map pointing
to the error: transport, but I find the relocated table easier for
this purpose.


  -- Noel Jones

Reply via email to