Fixed validation to be closer to RFC-5321.

Fixed #6