LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (http://www.linuxquestions.org/questions/red-hat-31/)
-   -   write mail log to /var/log/maillog (http://www.linuxquestions.org/questions/red-hat-31/write-mail-log-to-var-log-maillog-612947/)

jimmyjiang 01-11-2008 03:47 PM

write mail log to /var/log/maillog
 
hi,
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?
thanks!
jimmy

Micro420 01-11-2008 09:50 PM

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

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

Code:

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

jimmyjiang 01-14-2008 08: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 04:29 PM

restart syslog:
Code:

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

Micro420 01-15-2008 06: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 09:17 AM.