import re


def check_fqdn(name):
    """
    Check if a hostname is fully qualified, it must only contain
    letters, - and have dots.
    """
    # StackOverflow #11809631
    if re.match(r'(?=^.{4,253}$)(^((?!-)[a-zA-Z0-9-]{1,63}(?<!-)\.)+[a-zA-Z]'
                '{2,63}\.?$)', name):
        return True
    else:
        return False