Weblog entry #33 for lee
I recently started using an LDAP addressbook, and given my correspondents are automatically added into it, I decided to use it for whitelisting in my Exim user filter.
Firstly I added an entry into the LDAP server for exim and assigned it read access to the Addressbook database.
Then I added the following into my user exim filter file. I've placed it below the entries dealing with mailing lists, so lookups only happen for non-list (or "direct") email.
if "${lookup ldap {\
user=\"cn=exim,dc=example,dc=com\" pass=TRUSTNO1 \
ldap://localhost/o=Addressbook?cn?sub?(mail=${address:$h_From:}) \
}{yes}{no}}" is "yes"
then
#logwrite "userfilter_whitelist_ldap ${address:$h_From:}"
save /var/mail/foo/bar/whitelist/
finish
endif
Basically the filter extracts an email address from the "From:" header (alternatively the $reply_address or $sender_address variables could be used) and checks to see if there is a corresponding name listed in the database.
Comments on this Entry
[ Parent | Reply to this comment ]
I have been trying to get a addressbook going with read/write using evolution.
I have followed the instructions from your weblog
I have skipped the TLS part since I cant find the /etc/ssl directory on my fedora core 8 box.
I use evolution. I can see the addressboook created, and all the features in the evolution schema. When I try to create an entry and hit "OK" I get permission denied. I have chmod 700 even 777 the /var/lib/ldap/evolution that I have included in the slapd.conf. I still get the permission denied error
Any comments/suggestions are appreciated.
Please help
THanks
Regards
JImmy
[ Parent | Reply to this comment ]