rewrite: add in log/tmp folders; minor cleanup on deliver smtp

Found this when testing live email delivers.