OpenSMTPD is ridiculously pleasant to configure, without sacrificing features like "I don't want my password in the configuration file".
we have recently finished an API for implementing filters and we're working on stabilizing the interface before making it public.