NOTE: This method is called only if you
implemented IwodPop3Notify interface in your application,
and wodPop3Server1.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 events
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 property.
You should understand that this notification method is
in the middle of the chain between user's command
and wodPop3Server's processor. This means that
before wodPop3Server receives this command and examine it,
you will receive this notification where you can
change Command argument. Changing this argument
will directly affect wodPop3Server's behaviour. For
instance, if user sends command 'USER test' you can
do
Command = "USER
joe"
and then after it user sends 'PASS test' and you
change it to
Command = "PASS
joe"
Do you have idea what will happen? wodPop3Server will
receive username/password combination as you changed it, so
it will try to login user joe/joe instead of (for
example) test/test. Later you can change any
particular command like this.
If you don't like how wodPop3Server reacts on
specific command, you can implement it yourself different
way. For instance, if you want 'TOP' command NOT to
work, you can just do something like this:
If Ucase$(Left$(Command, 3)) =
"TOP" Then
Command = ""
User.Send "-ERR
command unrecognized" & vbCrLf
End If
This way wodPop3Server will just ignore command because
Command is set to empty string, and
you already sent some reply, so no protocol violations are
made.
More, if you want to implement new command, for instance
'HELP' command you should do same as above - test
if command is entered, set Command
argument to empty string, and Send some
response manually using POP3 protocol
specification.