Separate SMTP script testing machinery.

Also add a -script flag to make it easier to iterate on testing.