pop3-proxy.c revision 5f5870385cff47efd2f58e7892f251cf13761528
25757faf029c369a8318349dafe952e2358df1d8Timo Sirainen/* Copyright (c) 2004-2012 Dovecot authors, see the included COPYING file */
25757faf029c369a8318349dafe952e2358df1d8Timo Sirainenstatic void proxy_free_password(struct client *client)
25757faf029c369a8318349dafe952e2358df1d8Timo Sirainen safe_memset(client->proxy_password, 0, strlen(client->proxy_password));
25757faf029c369a8318349dafe952e2358df1d8Timo Sirainenstatic void get_plain_auth(struct client *client, string_t *dest)
25757faf029c369a8318349dafe952e2358df1d8Timo Sirainen base64_encode(str_data(str), str_len(str), dest);
25757faf029c369a8318349dafe952e2358df1d8Timo Sirainenstatic void proxy_send_login(struct pop3_client *client, struct ostream *output)
25757faf029c369a8318349dafe952e2358df1d8Timo Sirainen if (client->common.proxy_master_user == NULL) {
25757faf029c369a8318349dafe952e2358df1d8Timo Sirainen /* send USER command */
25757faf029c369a8318349dafe952e2358df1d8Timo Sirainen /* master user login - use AUTH PLAIN. */
25757faf029c369a8318349dafe952e2358df1d8Timo Sirainen (void)o_stream_send(output, str_data(str), str_len(str));
25757faf029c369a8318349dafe952e2358df1d8Timo Sirainen client->common.proxy_state = POP3_PROXY_LOGIN1;
case POP3_PROXY_BANNER:
case POP3_PROXY_STARTTLS:
case POP3_PROXY_LOGIN1:
case POP3_PROXY_LOGIN2: