fixed various bugs in original commit; tested using dovecot's LMTP; added minimal documentation to help others use these additions