def iterExtensions(fname):
    """
    >>> list(iterExtensions("test.tar.gz"))
    ['tar.gz', 'gz']
    >>> list(iterExtensions("a.b.c.d.e"))
    ['b.c.d.e', 'c.d.e', 'd.e', 'e']
    >>> list(iterExtensions("a..b"))
    ['.b', 'b']
    >>> list(iterExtensions("a"))
    []
    >>>
    """
    parts = fname.split('.')
    partlen = len(parts)
    if not parts or partlen == 1:
        return None

    i = 1
    while i < partlen:
        yield '.'.join(parts[i:])
        i += 1
    return None