Jeff Atwood talks about this: http://blog.codinghorror.com/so-youd-like-to-send-some-email.... . And its unlikely that the code takes care of all these things. For example, how are you going to configure the reverse ptr in code?
https://github.com/JoshData/mailinabox/commit/ec11241a7a619a...
* Test/alert if your PTR mismatches your HELO name
* If your IP is on any of the major RBLs
* Point admins toward AOL/Yahoo/ReturnPath whitelists and feedback loops.