Re: How can I handle the NOOP command?

Giganews Newsgroups
Subject: Re: How can I handle the NOOP command?
Posted by:  Remy Lebeau \(Indy Team\) (
Date: Sun, 18 Mar 2007

"Fumio Kawamata" <fum…> wrote in message

> I want to handle the NOOP command for my POP3 proxy program.

Handle in what way exactly?

> On the other hand, I found several descriptions that the NOOP
> command has some meaning for keeping connection, in internet
> web pages. I also found such description in Indy documents.
> It is described in the ITdPOP3.KeepAlive method's help.

The only thing the KeepAlive() method does is sends the NOOP command
and then reads the reply.  Nothing else.  The contents of the reply
are not processed in any way, so they are completely irrelevant.  The
mere presence of sending the NOOP command and then receiving a reply
is enough to keep the connection alive.  And this is only needed for
servers that automatically disconnect the connection after a
configured amount of idle time.

> I want to transfer the NOOP command to the actual POP3 server
> if my proxy program receives the NOOP command from the mail
> client. (Because it is a business of the proxy).

Why don't you simply send your own NOOPs to the target server on your
own time frame regardless of whether you get NOOPs from the client?

> Should I derive a new class from TIdPOP3Server in this case?

You could, though that is not strictly necessary.  You could simply
add an OnCommand event handler to the NOOP entry in the
TIdPOP3Server.CommandHandlers collection instead.  There is no handler
assigned by default, because default text is assigned that doesn't
usually require extra processing from the user's code.




In response to

How can I handle the NOOP command? posted by Fumio Kawamata on Sun, 18 Mar 2007