aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pop2.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/pop2.c b/pop2.c
index 3be6fcd2..6d3980f9 100644
--- a/pop2.c
+++ b/pop2.c
@@ -61,11 +61,19 @@ static int pop2_getauth(int sock, struct query *ctl, char *buf)
int status;
(void)buf;
+
if (ctl->sslproto && !strcasecmp(ctl->sslproto, "tls1") && !ctl->use_ssl)
{
report(stderr, GT_("POP2 does not support STLS. Giving up.\n"));
return PS_SOCKET;
}
+
+ if (ctl->server.authentication != A_ANY && ctl->server.authentication != A_PASSWORD)
+ {
+ report(stderr, GT_("POP2 only supports password authentication. Giving up.\n"));
+ return PS_AUTHFAIL;
+ }
+
strlcpy(shroud, ctl->password, sizeof(shroud));
status = gen_transact(sock,
"HELO %s %s",