Yes, it's very important +1. Just now I have done it for /var/log/postfix.log; the size was 750MB+.
Step 1: Create the Logrotate Configuration for Postfix
sudo nano /etc/logrotate.d/postfix
Step 2: Add the following configuration to handle the rotation of /var/log/postfix.log
su root syslog
/var/log/postfix.log {
weekly
rotate 4
compress
notifempty
delaycompress
missingok
postrotate
/usr/sbin/postfix reload > /dev/null
endscript
create 640 root adm
}
Step 3: Test the Logrotate Configuration:
sudo logrotate -d /etc/logrotate.d/postfix
Step 4: Force Log Rotation (Optional): If /var/log/postfix.log is already large and you want to rotate it immediately, you can force log rotation: sudo logrotate -f /etc/logrotate.d/postfix