Skip to content
  • Matthias Andree's avatar
    imap.c, pop3.c: fix protocol regression of 6.4.22.rc1 · 616e8c70
    Matthias Andree authored
    fetchmail 6.4.22.rc1 clobbered its IMAP state too late, and lost
    information on the protocol version in many circumstances.
    Consequently, it tried to talk IMAP4 to IMAP4rev1 servers, which failed.
    
    This fix the clear_sessiondata() out to the new constructor and
    destructor, such that imap_getauth() only needs to call it after
    STARTTLS, when it must re-probe CAPABILITY anyways.
    
    This was the same bug for POP3, which however does not collect state
    from the greeting, so that the bug was without effect for POP3.
    
    Reported by: Corey Halpin, FreeBSD port maintainer.
    616e8c70