a program to purge old messages according to retention config.