Whitelist-only email server

Darren Pilgrim darren.pilgrim at bitfreak.org
Wed Jul 19 15:59:11 UTC 2006


User Ernie wrote:
> Has anybody set up a whitelist-only email server on FreeBSD that rejects all
> emails except ones that are in the users personal whitelist?

	I did one such system using Postfix, Courier-IMAP and Squirrelmail with 
a MySQL backend.  I modified the address book forms to include a 
white-listing checkbox.  Users added addresses to their address books, 
then checked the "Allow this person to send me email" checkbox, with the 
effect of setting a "whitelist" column in the address table to either 0 
or 1.  I configured Postfix with seperate inbound and submission ports 
and added check_sender_access on the inbound port and 
check_recipient_access on the submission port.  Both were mysql maps to 
Squirrelmail's address table:

SELECT email FROM `address` WHERE email='%s' AND whitelist=1

The check_recipient_access and a submission port were included because I 
felt it reasonable to require users to permit a response in order to 
send a message to someone.  This was later combined with a Squirrelmail 
plugin that added automatic address collection and the whitelist column 
defaulted to 1.

-- 
Darren Pilgrim


More information about the freebsd-isp mailing list