In the properties of the Default SMTP Virtual Servers (in ESM, Server, Protocols, SMTP folder), Access Tab, Relay button: Disable the ability for authenticated users to relay "regardless of the list above".
Delete everything in the "C:\Program Files\Exchsrvr\Mailroot\vs
i 1\Queue" folder (assuming it's overrun with spam).
My suggestion is to shut down SMTP inbound from the internet temporarily while you run the command below. Also alert users that they may need to contact remote users to have them resend inbound messages and that they may need to resend any messages they sent recently.
Download aqadmcli.exe from
ftp://ftp.microsoft.com/pss/Tools/Exchange%20Support%20Tools/Aqadmcli/aqadmcli.exeRun aqadmcli.exe from the command prompt on the server
> setserver <ExchangeSERVERNAME>
> delmsg flags=all
Repeat until the Queue is clear. Could take a while.
- The Exchange outbound queue is populated by the database so once you clear it, the database will repopulate it until all messages are either delivered (via SMTP) or deleted (via aqadmcli).
Re-enable SMTP from outside.