syslog won't log postfix to a new file

syslog won't log postfix to a new file

Post by qche » Sat, 08 Feb 2003 13:50:17



hi
problem happens on a solaris9 machine. by default the postfix log goes
into /var/adm/messages. I want to move the log out to /var/log/maillog.
I changed the /etc/syslog.conf to
#
*.debug                         /var/adm/messages


# Postfix log
mail.crit;mail.info;mail.debug                         /var/log/maillog
#

created a empty file by "touch /var/log/maillog"
restarted syslogd by "/etc/init.d/syslog stop/start"

but
/var/log/maillog stays at 0 byte.

if i remove the " mail.* /var/log/maillog " line, postfix log will show
up in /var/adm/messages again.

exect setup works in a solaris8 box.

any help is appreciated.

 
 
 

syslog won't log postfix to a new file

Post by Greg Andre » Sun, 09 Feb 2003 01:55:31



>created a empty file by "touch /var/log/maillog"

chown root:sys /var/log/maillog
chmod 600 /var/log/maillog

(the chmod is more likely to be the problem)

  -Greg
--
Do NOT reply via e-mail.
Reply in the newsgroup.

 
 
 

syslog won't log postfix to a new file

Post by qche » Sun, 09 Feb 2003 03:09:34




>>created a empty file by "touch /var/log/maillog"

> chown root:sys /var/log/maillog
> chmod 600 /var/log/maillog

> (the chmod is more likely to be the problem)

>   -Greg

Thanks.
"touch /var/log/maillog" created a
"-rw-r--r--   1 root other 0 Feb  6 23:44 /var/log/maillog" file. I
thought "chown root:sys" would work, but it didn't. file size stayed at
0. however "chmod 600" fixed the problem. which is kinda strange.why
would it work by removing the read permissions.
now the file is
"-rw-r--r--   1 root     sys        78086 Feb  7 13:06 /var/log/maillog"

qian

 
 
 

syslog won't log postfix to a new file

Post by qche » Sun, 09 Feb 2003 03:49:57


I decided to try it again from the begining,
stopped syslog and rm the /var/log/maillog

# touch /var/log/maillog
# ls -al /var/log/maillog
-rw-r--r--   1 root     other          0 Feb  7 13:35 /var/log/maillog
# /etc/init.d/syslog start
# ls -al /var/log/maillog
-rw-r--r--   1 root     other        366 Feb  7 13:36 /var/log/maillog
#
# chmod 600 /var/log/maillog
# ls -al /var/log/maillog
-rw-------   1 root     other      74063 Feb  7 13:41 /var/log/maillog
# chown root:sys /var/log/maillog
# ls -al /var/log/maillog
-rw-------   1 root     sys        76009 Feb  7 13:41 /var/log/maillog
#

now i am even more confused. ;-)

 
 
 

syslog won't log postfix to a new file

Post by Greg Andre » Sun, 09 Feb 2003 03:57:01



>I decided to try it again from the begining,
>stopped syslog and rm the /var/log/maillog

># touch /var/log/maillog
># ls -al /var/log/maillog
>-rw-r--r--   1 root     other          0 Feb  7 13:35 /var/log/maillog
># /etc/init.d/syslog start
># ls -al /var/log/maillog
>-rw-r--r--   1 root     other        366 Feb  7 13:36 /var/log/maillog

>now i am even more confused. ;-)

This suggests the original file wasn't owned by root, or your
original HUP of syslogd didn't work.

  -Greg
--
Do NOT reply via e-mail.
Reply in the newsgroup.