Quantcast
Channel: iRedMail
Viewing all articles
Browse latest Browse all 14144

postfix not writing to /var/log/maillog because of truncating

$
0
0

==== Required information ====
- iRedMail version: 0.9.0
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Apache
- Linux/BSD distribution name and version: CentOS 6.6
- Related log if you're reporting an issue:
====

Hi, yesterday I was trying to truncate postfix log files because I want to download it from production server to development server and analyze it.

I wrote a Perl script making use of 'move' command in File::Copy module and move /var/log/maillog to another file while postfix is still running. Then postfix didn't append /var/log/maillog at all. I also tried to touch a new /var/log/maillog but postfix didn't recognize this new file, even after restarting postfix service. But sending out emails still works fine.

So questions are:

1. Does anybody know how to make postfix still writing logs to /var/log/maillog in this case?

2. Somebody suggests using logrotate but I have never used this utility before, Could anybody confirm that logrotate could be used for my purpose and it did works for all iRedMail applications, i.e. postfix, devocat, etc?

Thanks.


Viewing all articles
Browse latest Browse all 14144

Trending Articles