if you are using postfix like I am, you can set up a list called 
relay_recipients with all your users in it in this format:
[email protected]          OK
add the line to your postfix main.cf file like this
relay_recipient_maps = hash:/etc/postfix/relay_recipients
pointing to where ever your file is.
Then after you compile the list, run
postmap /etc/postfix/relay_recipients
run that any time you edit the list.  
You can pull your AD users and export them to the list also.  Follow point 17 
of this tutorial:
http://www.howtoforge.com/the-perfect-spamsnake-ubuntu-jeos-12.04-lts-precise-pangolin-p4

You can set this to run as a script to keep this list updated and automatically 
"postmapped".

I imagine you can use a similar setup for exim or whatever mail you are using.

From: [email protected]
To: [email protected]
Date: Tue, 18 Jun 2013 11:13:16 +0000
Subject: [Baruwa] Rejecting mail for unrecognised recipients









Hi,
 
How do I set up Baruwa to reject / not accept email for addresses that are NOT 
on a list (or in the Baruwa DB)?
 
Kind Regards,
Ritchie Fraser
Systems Administrator
 
T : +44 (0) 1304 840506
F : +44 (0) 1304 840075
W : http://www.marinesoftware.co.uk
 
Marine Software Limited
Planned Maintenance, Stock Control, Project (Refit) Management, Purchasing,

Safety and ISM Document Management systems for the Marine Industry since 1991.
---------------------------------------------------------------------------------------------------------------------------
Unless otherwise agreed expressly in writing by Marine Software Limited, This 
communication and attachments are to be treated as confidential and the 
information in it may not
 be used or disclosed except for the purpose for which it was sent. If you are 
not the intended recipient of this communication you should notify the sender 
immediately, then destroy it without copying, disclosing or otherwise using its 
contents. Marine Software
 Limited. Registered in England & Wales. No 2576494 Registered Office. 4 
Ozengell Place, Eurokent Business Park, Ramsgate. Kent. United Kingdom. 
Internet communications cannot be guaranteed to be secure or error-free as 
information could be intercepted, corrupted,
 lost, destroyed, arrive late or incomplete, or contain viruses. Therefore, we 
do not accept responsibility for any errors or omissions that are present in 
this message, or any attachment, that have arisen as a result of e-mail 
transmission. Any views or opinions
 presented are solely those of the author and do not necessarily represent 
those of the company.
 




_______________________________________________
http://pledgie.com/campaigns/12056                                        
_______________________________________________
http://pledgie.com/campaigns/12056

Reply via email to