common: New function to validate domain names.
* common/mbox-util.c (is_valid_domain_name): New. * common/t-mbox-util.c (run_dns_test): New test.
(cherry picked from commit ddee9f9409fb5a089883eab0fadef7b9b7e61e72)
- Signed-off-by: Werner Koch <wk@gnupg.org>