import poplib


def connect_pop3(mailserver, username, password):
    """Connect to a pop3 mailserver and return a handle to it
    """
    p = poplib.POP3(mailserver)
    p.user(username)
    p.pass_(password)

    return p