Re: [Exim] filtering by email address

Pàgina inicial
Delete this message
Reply to this message
Autor: Philip Hazel
Data:  
A: Jeremy C. Reed
CC: exim-users
Assumpte: Re: [Exim] filtering by email address
On Mon, 10 Jan 2000, Jeremy C. Reed wrote:

> I want to do this so my family members don't get any spam (or other
> inappropriate mail). For example, ziff@??? will not
> receive a mail from joe@??? unless joe@??? is in his accept
> list. (I also want to have separate accept lists for each user.)


Arrange for each user you want to control to have a file called
.acceptlist, ignoring for the moment how this gets maintained. Then,
turn on receiver_verify and make the following your first director:

verify_known_sender:
driver = smartuser
require_files = /home/$local_part/.acceptlist
senders = ! /home/$local_part/.acceptlist
new_address = :fail: Sender unknown

That will stop such messages even getting into your host. (Replace
/home/$local_part with whatever the correct path to your user's home
directories is.) As written above, the accept list is interpolated into
the senders list and can contain wild cards. If there are no wild cards
and the lists get very long, it would be more efficient to convert them
into some indexed format, e.g. cdb and use a cdb lookup.

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.