How to delete old messages automatically in a channel?

You can, but only using mmctl user delete oder the DeleteUser API call.

Please create a new topic for your next questions, this topic is already solved and we try to stick to a “one issue, one topic” policy. Thanks!