Earlier tonight I created a little script that will run in cron on a Linux server. The script counts the number of directories and files in a specific directory and if the count is above Y then it deletes directories and files older than X number of days. In the example script below the number of items (directories and files) that have to be located in the directory before the script to delete files older than a specific date is 10. If there are ten items then the script will delete items older than 90 days. Below the script is the entry made in a specific users cron on the Linux server.
Working on a friends server earlier this morning I noticed that he had logrotate configured but he did not have a configuration file for Postfix. Below is the quick one I whipped up for his environment including a brief explanation of each line of the configuration file below the script. Following the explanation of the various configurations is the command to actually force logrotate to run in debug mode so you can see what happens.