-   Red Hat (
-   -   write mail log to /var/log/maillog (

jimmyjiang 01-11-2008 04:47 PM

write mail log to /var/log/maillog
I accidently delelte /var/log/maillog, after I recreate it, but postfix wouldn't write any mail log into it anymore, I restart postfix, no help, anyone know why?

Micro420 01-11-2008 10:50 PM

Who owns the /var/log/maillog file? Permissions?

Here's my settings for maillog when doing ls -laZ


-rw-------  root root system_u:object_r:var_log_t      maillog

jimmyjiang 01-14-2008 09:50 AM

[root@localhost ~]# ls -las /var/log/maillog
72 -rw-r--r-- 1 root root 63330 Jan 14 09:44 /var/log/maillog

but the problem is I deleted the origial maillog file, this one is I recreated myself. looks like postfix not really this file exits, so it didn't write any maillog in it. anyway to fix it?

Berhanie 01-15-2008 05:29 PM

restart syslog:

kill -HUP `cat /var/run/`
or, whichever way your distro does it.

Micro420 01-15-2008 07:18 PM

Assuming that restarting the syslog or reboot does not work, and you have SElinux enabled, then you need to change the context of the file. That's why I did ls -laZ.

All times are GMT -5. The time now is 10:47 PM.