Maillog file on linux

I accidentally delta / var / log / maillog after I recreated it, but postfix will no longer write a mail log to it, I restart the postfix, don’t help, does anyone know why?

+3
source share
3 answers

maillog is usually managed by syslog, not postfix directly.

Restarting syslog should be enough, as permissions just guarantee that they are like other files in / var / log, and that should be enough.

On my debian system, all the logs belong to either root: adm or root: root, usually have 644 or 640 mode (u + rw, g + r, optional o + r)

And on debian / ubuntu restart syslog: /etc/init.d/sysklogd restart

On RHEL / CentOS: restarting the syslog service

+4

. . maillog :)

+1

You will need to check the permissions and ownership of the file so that the syslog process can write to it.

man chmod
man chown
0
source

Source: https://habr.com/ru/post/1710133/


All Articles