FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
Article Id 193353
This article describes about the command '# diagnose debug application emailfilter' and how to run anti spam debugging.

How to run antispam debuggingBefore FortiOS 6.4, the antispam debug command is:
# diagnose debug application emailfilter -1

# diagnose debug enable
In FortiOS 6.4 and later, the command has been changed to:
# diagnose sys scanunit debug antispam

# diagnose debug enable
Other complementary debug commands still same.

And below commands are helpful debug command for specific service and proxy:
# diagnose debug application pop3 -1

# diagnose debug application smtp -1

# diagnose debug application imap -1

# diagnose debug application proxy -1
It is possible to decide to add these debug commands when it is necessary to run anti spam debugging depends on what is the service to debug.