The "chat-keep-days" setting:
The /chat subsystem will try to discard messages that are older then chat-keep-days. The value of chat-keep-days can be a floating point number. So, for example, if you only want to keep chat messages for 12 hours, set this value to 0.5.
A value of 0.0 or less means that messages are retained forever.