split SMGatweay into inbox and outbox