validate the generated email address and fall back to localhost.localdom...

...ain in case it is not valid

fixes #1899 

@karlitschek @Raydiation @LukasReschke @VicDeo THX