🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #3766

Re: How to check APOP support?

#3766
From: Remy Lebeau (TeamB)
Date: Wed, 22 Jun 2005 23:20
40 lines
2737 bytes
"John" <qwertzuiopmiller@web.de> wrote in message
news:42b9cdf2@newsgroups.borland.com...

> But TIdPOP3 has a "APOP" property.

In Indy 9, yes.  In Indy 10, it has been replaced with an AuthType property,
and also an AutoLogin property has been added.

> If it is "false" TIdPOP3 send the username and password in plain
> text, so everyone (hackers, ect.) can read it. If I set the property
> to "true" and the server does not support APOP, the operation fails
> and I get an exception error. I (or the user) have first to deactivate
> APOP manually.

It is your own responsibility to set the APOP property before calling
Connect().  It is your own responsibility to determine whether you want
TIdPOP3 to attempt APOP or not.

The only way to do that in Indy 9 is to set APOP to True, then connect and
catch the exception if APOP is not supported.  If not supported then
disconnect, change the APOP property to False, and reconnect.

In Indy 10, it is a little more streamlined.  You can set AutoLogin to
False, then connect, then parse the Greeting banner, then set the AuthType
accordingly, and then finally call Login().  You do not need to reconnect in
between.  The only downside is that you have to parse the Greeting banner
manually.  If you wait a day or so, the latest development snapshot of Indy
10 will have a new property added that Connect() updates to indicate whether
APOP is supported or not.

> I think, I did not understand you correctly. :-( How or when does
> TIdPOP3 handles APOP automatically?

It automatically determines whether the server actually supports APOP before
sending the APOP command.  But you are still responsible for telling TIdPOP3
whether to use APOP in the first place.


Gambit
Technical Details
Message-ID: <42b9f251$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <42b94e54@newsgroups.borland.com> <42b9bb9d$1@newsgroups.borland.com> <42b9cdf2@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,65f0406daea03567
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <42b94e54@newsgroups.borland.com> <42b9bb9d$1@newsgroups.borland.com> <42b9cdf2@newsgroups.borland.com>
Subject: Re: How to check APOP support?
Date: Wed, 22 Jun 2005 16:20:49 -0700
Lines: 42
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.41
Message-ID: <42b9f251$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1119482449 68.69.17.41 (22 Jun 2005 16:20:49 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail