The mail gateway is a simple script which contacts RT's REST interface for communication with the back end API. Depending on you rate of incoming tickets, you could use the standalone web server that comes with RT and configure it so that only the REST directory is available. -Todd