Board index » cppbuilder » How to check APOP support?

How to check APOP support?


2005-06-22 07:41:07 PM
cppbuilder48
Hi,
is it possible to verfiy whether a Mail Server supports APOP? I know that it
is possible with IdSMTP->AuthSchemesSupported but how can I do this with
IdPOP3?
indy v9.0.18
 
 

Re:How to check APOP support?

"John" < XXXX@XXXXX.COM >wrote in message
Quote
is it possible to verfiy whether a Mail Server supports APOP?
I know that it is possible with IdSMTP->AuthSchemesSupported
but how can I do this with IdPOP3?
TIdPOP3 handles APOP for you automatically. You do not need to do anything
for it yourself.
The only reliable way to verify whether APOP is available is to look at the
server's Greeting text. If it includes a timestamp surrounded by angle
brackets, which resembles an e-mail message ID, then APOP is supported. The
Capabilities property *may* or *may not* include an APOP entry as well. RFC
2449, which introduces the CAPA command into the POP3 protocol,
intentionally leaves out support for the APOP command since the Greeting
text already provides the same thing.
Gambit
 

Re:How to check APOP support?

Quote
TIdPOP3 handles APOP for you automatically. You do not need to do
anything
for it yourself.
But TIdPOP3 has a "APOP" property. 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.
I think, I did not understand you correctly. :-( How or when does TIdPOP3
handles APOP automatically?
 

{smallsort}

Re:How to check APOP support?

"John" < XXXX@XXXXX.COM >wrote in message
Quote
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.
Quote
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.
Quote
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
 

Re:How to check APOP support?

"Remy Lebeau (TeamB)" < XXXX@XXXXX.COM >wrote in message
Quote
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.
This will be added to the latest snapshot of Indy 9 as well.
Gambit
 

Re:How to check APOP support?

Thank you very much for your help!
best regards,
John