asterisk seems to always output some characters as part of it's colorization mechanism, irrespective of whether stdin/stdout is attached to a tty or not. When issuing asterisk -rx "logger reload" from the logrotate postrotate script this causes "[0;37m[0m" to be emailed to be every morning when logrotate runs. This is purely due to colorization, and this can be trivially switched of by changing asterisk -rx "logger reload" to asterisk -rnx "logger reload". At the same time I also suggest adding || /bin/true to this reload line or logrotate sometimes exhibit some weird behavior. So basically the postrotate section should change to: postrotate /usr/sbin/asterisk -rnx "logger reload" || /bin/true endscript I'm also not 100 % sure how the custom and csv modules handles their output, so I'm not convinced that a logger reload will function for /var/log/asterisk/cdr-csv/*.csv /var/log/asterisk/cdr-custom/*.csv, looking at the source for csv it looks like it does a fopen()/fwrite()/fclose() cycle for each and every entry written, and the same for cdr_custom. So for that section the postrotate can simply be dropped. Reproducible: Always Steps to Reproduce:
+*asterisk-1.6.2.13-r2 (15 Oct 2010) + + 15 Oct 2010; <chainsaw@gentoo.org> +asterisk-1.6.2.13-r2.ebuild, + +files/1.6.2/asterisk-1.6.2.13-alarm-receiver-use-playtones.patch, + +files/1.6.2/asterisk-1.6.2.13-confbridge-menu-invocation.patch, + +files/1.6.2/asterisk-1.6.2.13-pbxstart-failed-spurious-bye.patch, + +files/1.6.2/asterisk.logrotate3: + Log rotation fixes by Jaco Kroon, closes bug #339799. Scavenged fixes from + upstream issue reports #17368, #17524 & #18010.