Overwriting /etc/newsyslog.conf

Niklaas Baudet von Gersdorff stdin at niklaas.eu
Tue Nov 22 17:32:54 UTC 2016


I want to change the existing entry in /etc/newsyslog.conf for
/var/log/maillog

  /var/log/maillog      640  7     *  @T00  JC

to save more than 7 rotations e.g.,

  /var/log/maillog      640  10    *  @T00  JC

I want to refrain from changing /etc/newsyslog.conf directly
(maybe the file will be updated future releases). So I thought
about adding the line above to
/usr/local/etc/newsyslog.conf.d/custom.conf that is included in
/etc/newsyslog.conf.

Will newsyslog take the first occurrence (in /etc/newsyslog.conf)
or the last one (in this case in
/usr/local/etc/newsyslog.conf.d/custom.conf) of
/var/log/maillog's entry to perform log rotation accordingly?

I tried to find a comment on this in newsyslog.conf(5) but wasn't
successful. Does anybody have experience with this?

    Niklaas


More information about the freebsd-questions mailing list