Description
-
Called when user issues new command.
Return Type
-
None
Syntax
-
object.Command Owner, User,
Command
The Command Method syntax has these parts:
object |
An expression evaluating to an object
of type IwodImapNotify. |
Owner |
Required. A wodImapServer
object. |
User |
Required. An ImapUser object.
Reference to user that issued command. |
Command |
Required. A String value. String
expression that represents command and parameters
entered. |
Remarks
- NOTE: This method is called only if you
implemented IwodImapNotify interface in your application, and
wodImapServer1.Notification
property has received reference to instance of your
implementation.
-
- This notification method will be called each time user
issues some command, no matter what user's state is set
to. For instance, after Connecting
notification you will not receive any additional
notifications until user sends username/password combination.
However, if you're interested if he's testing your
server for some other commands or vulnerabilities, you can
just track down every command he sends using this
notification.
You should understand that this notification is called in the
middle of the chain between user's command and IMAP
server's processor. This means that before IMAP server
receives this command and evaluate it, you will receive this
notification where *you can change Command parameter*.
Changing this parameter will directly affect IMAP
server's behaviour. For instance, if user sends command
'LOGIN test test' you can do
-
- Command = "LOGIN joe joe"
-
- Do you have idea what will happen? IMAP server will
receive (false!) username/password combination as you changed
it, so it will try to login user joe/joe instead of
test/test. Later you can change any particular command like
this.
If you don't like how IMAP server reacts on specific
command, you can change that too. Just use Send method to send
custom data, and set Command argument to empty string - and
wodImapServer will ignore this command (you already sent
response, didn't you?) But - try to read IMAP
specifications before you do anything like that.
More, if you want to implement new command, for instance
'HELP' command you should do: test if command is
entered, set Command parameter to empty string, and Send some
response manually using IMAP protocol specification.
|