Hi, My /var/log/mail file is full of imap messages, which is about the one thing in there that I'm not interested in. How can I tell syslog to ignore them. Apparently changing the config of the imap server requires a recompile which I'd like to avoid. Cheers, Paul.
On Thu, 2005-03-31 at 14:33 +0100, Paul Gardiner wrote:
Hi, My /var/log/mail file is full of imap messages, which is about the one thing in there that I'm not interested in. How can I tell syslog to ignore them. Apparently changing the config of the imap server requires a recompile which I'd like to avoid.
Don't know about the config but you can delete the imap entries from your current messages file by doing: cd /var/log;cat messages|grep -v imap>tmp;mv tmp messages;rcsyslog reload The "-v" tells grep to ignore any lines that have imap in it, use the string that is appropriate for you. I use this occasionally to reduce the size of my messages file. -- Ken Schneider UNIX since 1989, linux since 1994, SuSE since 1998 * Only reply to the list please* "The day Microsoft makes something that doesn't suck is probably the day they start making vacuum cleaners." -Ernst Jan Plugge
From: "Ken Schneider" <suse-list@bout-tyme.net>
On Thu, 2005-03-31 at 14:33 +0100, Paul Gardiner wrote:
Hi, My /var/log/mail file is full of imap messages, which is about the one thing in there that I'm not interested in. How can I tell syslog to ignore them. Apparently changing the config of the imap server requires a recompile which I'd like to avoid.
Don't know about the config but you can delete the imap entries from your current messages file by doing:
cd /var/log;cat messages|grep -v imap>tmp;mv tmp messages;rcsyslog reload
The "-v" tells grep to ignore any lines that have imap in it, use the string that is appropriate for you. I use this occasionally to reduce the size of my messages file.
Ta, but I really wanted to stop them going in at all. I do similar to what you suggest when monitoring, with the line tail -f /var/log/mail | sed -e '/imapd/d' Cheers, Paul.
The Thursday 2005-03-31 at 15:38 +0100, Paul Gardiner wrote:
Ta, but I really wanted to stop them going in at all. I do similar to what you suggest when monitoring, with the line
tail -f /var/log/mail | sed -e '/imapd/d'
I don't think you can. The syslog daemon records what the program tell it to record, with the "facility" and "priority" the program wants. Meaning that, yes, you have to recompile. However... there is some hope. SuSE definition in /etc/syslog.conf is mail.* -/var/log/mail I would recommend you try something like this instead: mail.notice -/var/log/mail mail.err /var/log/mail.err mail.debug -/var/log/mail.debug Now, file "/var/log/mail.debug" will have the same information as your old "/var/log/mail" had. But the new "/var/log/mail" will have much less information, only those of level "notice". Less verbose, that is. Then, you should also reconfigure logrotate appropriately. You can use different settings for each file. -- Cheers, Carlos Robinson
participants (3)
-
Carlos E. R.
-
Ken Schneider
-
Paul Gardiner