# How to use T-Hist to generate statistics for unsupported mailers

To use `T-Hist` with unsupported mailers, you need to convert the mailer logs to one of the binary log formats supported by `T-Hist`.
The easiest way is converting to binary log of `Binkd` and `T-Mail` before version 2603 (so-called old format).

The binary log file of `Binkd` consists of 28 byte records. Each record has the following structure:
```C
struct {
    u16    fZone;		// FTN-address Zone number
    u16    fNet;		// FTN-address Net number
    u16    fNode;		// FTN-address Node number
    u16    fPoint;		// FTN-address Point number
    u32    fSTime;		// Unix-timestamp of sesion start
    u32    fLTime;		// session duration in seconds
    u32    fBReceive;	// number of bytes received
    u32    fBSent;		// number of bytes sent
    u8     fFReceive;	// number of files received
    u8     fFSent;   	// number of files sent
    u16    fStatus;   	// session status
} TS;

// u8  - unsigned char 8 bit
// u16 - unsigned int 16 bit
// u32 - unsigned int 32 bit

// session status fStatus:
//	1 - successfully outgoing session
//	2 - successfully incoming session
//	3 - any failed session (for example, aborted)
```

The structure of binary log taken from `Binkd` repository on [GitHub](https://github.com/pgul/binkd), file https://github.com/pgul/binkd/blob/master/binlog.c

`T-Hist` does not use information about the number of received and sent files (`fFReceive` and `fFSent`), so these fields can be left blank.

It should also be noted that the session direction indicated in the status (incoming or outgoing session) for `Binkd` is opposite to that indicated by `T-Mail`.
Therefore, you must use the `SwapInOut Yes` parameter in the configuration file when processing the `Binkd` binary log.
If you set the session status as follows:
```C
// session status fStatus:
//	1 - successfully incoming session
//	2 - successfully outgoing session
//	3 - any failed session (for example, aborted)
```
then the `SwapInOut Yes` parameter is not needed.