In the database definition in slapd.conf, put
# index since the unique overlay will search for matching mail attributes index mail eq
overlay unique unique_attributes mail
If unique overlay is not compiled in, you'll need to recompile with ./configure ... --enable-unique