Within the OpenTRS all trouble tickets are handled as normal e-mails. In case you want to attach something (e.g. a fax) it will be attached as an e-mail attachment. All tickets are stored on the harddrive in clear text format. The headers are stored in a databasei, too. The database is used to sort the tickets and to give quick access to them. For detailed information about this mechanism have a look in the source code.