From 7feb75607413687c38c51197a73611cb30d39127 Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Thu, 9 Sep 2021 21:01:09 -0600 Subject: * Alpine will delete passwords that do not work from internal memory and the local password cache (password file or system local cache.) --- imap/src/c-client/mail.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'imap/src/c-client/mail.c') diff --git a/imap/src/c-client/mail.c b/imap/src/c-client/mail.c index 730201c2..471269c0 100644 --- a/imap/src/c-client/mail.c +++ b/imap/src/c-client/mail.c @@ -58,6 +58,8 @@ static mailcache_t mailcache = mm_cache; static rfc822out_t mail822out = NIL; /* RFC-822 output generator (new style) */ static rfc822outfull_t mail822outfull = NIL; + /* Erase password (client side) */ +static deletepwd_t erase_password = NIL; /* SMTP verbose callback */ static smtpverbose_t mailsmtpverbose = mm_dlog; /* proxy copy routine */ @@ -581,6 +583,11 @@ void *mail_parameters (MAILSTREAM *stream,long function,void *value) case GET_SENDCOMMAND: ret = (void *) mailsendcommand; break; + case SET_ERASEPASSWORD: + erase_password = (deletepwd_t) value; + case GET_ERASEPASSWORD: + ret = (void *) erase_password; + break; case SET_SERVICENAME: servicename = (char *) value; @@ -6242,7 +6249,12 @@ unsigned int mail_lookup_auth_name (char *mechanism,long flags) return i; return 0; } - +/* Client side callback warning to delete wrong password */ +void delete_password(NETMBX *mb, char *user) +{ + deletepwd_t ep = mail_parameters(NULL, GET_ERASEPASSWORD, NULL); + if (ep) (ep)(mb, user); +} /* Standard TCP/IP network driver */ static NETDRIVER tcpdriver = { -- cgit v1.2.3-54-g00ecf