Before new mail arrives - agent

Hi, I’m trying to create an agent (Before new mail arrives) that executes the following formula but don’t seem to be working:

@If(@IsAvailable(“X_Bulk”); @Command([Folder];“JunkMail”;“1”);“”)

All the agent needs to do is check if the incoming email has an “X_Bulk” field, if yes, then “Move” to the JunkMail folder. But the desired result is not being achieved.

Is my formula wrong cuz running the agent test doesn’t give me any info.

Subject: Before new mail arrives - agent

Pls ignore. I found a solution via lotusscript, small and handy bunch of code.