Commit d9cd8883 d9cd8883ffbad01eb69cda7ae8332038b467aaf5 by Sergey Poznyakoff

Allow for `notls' parameter in pop URLs.

* libproto/pop/folder.c (_pop_record): Accept URL parameters.
* libproto/pop/mbox.c (pop_open): Don't start TLS if
the `notls' parameter is present in the URL.
1 parent 1e409dd4
......@@ -48,7 +48,7 @@ static struct _mu_record _pop_record =
MU_POP_PRIO,
MU_POP_SCHEME,
MU_RECORD_DEFAULT,
MU_URL_CRED | MU_URL_INET,
MU_URL_CRED | MU_URL_INET | MU_URL_PARAM,
MU_URL_HOST,
_url_pop_init, /* Url init. */
_mailbox_pop_init, /* Mailbox init. */
......
......@@ -169,6 +169,7 @@ pop_open (mu_mailbox_t mbox, int flags)
break;
if (WITH_TLS && !mpd->pops &&
mu_url_sget_param (mbox->url, "notls", NULL) == MU_ERR_NOENT &&
mu_pop3_capa_test (mpd->pop3, "STLS", NULL) == 0)
{
status = mu_pop3_stls (mpd->pop3);
......