Solved

Getting rid of ipop3d connections from system log

Posted on 1998-10-11
2
245 Views
Last Modified: 2013-11-13
I have some 150 mail users on a Redhat linux box, and my system log /var/log/messages gets flooded with messages like this one: (certain users check their mail every 60 secs...)

Oct 11 11:35:37 foobar ipop3d[6869]: connect from x.x.x.x

I want to get rid of them without having to put mail.none in syslog.conf, because I want to keep other mail related messages. I guess it's fairly simple once you know the trick, but the manpages for syslog.conf don't make much sense to me :-(
0
Comment
Question by:FloydATC
2 Comments
 
LVL 1

Accepted Solution

by:
ghjm earned 100 total points
Comment Utility
As far as I can see, there is no way to do what you want using config files. The syslog.conf file is not capable of preventing these messages without also preventing other messages that you want to see, and the ipop3d daemon itself has no options for setting the log level.

But of course this is what we all like about Linux: When the going gets tough, go get the source code.

Assuming you have RedHat 5.1 in a box, mount the second CD and go to ...cdrom/SRPMS. Install the imap/pop source code with "rpm --install imap-4.1.final-1.src.rpm". Then, unpack the source with "rpm -bp /usr/src/redhat/SPECS/imap-4.1.final.spec". This will install the imap/pop3 source code under /usr/src/redhat/BUILD/imap-4.1.FINAL.

The files you are interested in are ipopd/ipop3d.c, ipopd/ipop2d.c, and imapd/imapd.c. Edit each of these files and search for "syslog". If you're a C programmer, just figure it out. Otherwise: For each syslog that you don't want to see any more, comment out the call using C comments: /* this is a comment */. Put the /* right before the word "syslog" and the */ right after the next semicolon (;). It is important that you comment out the entire statement, which may extend to the next line, or it won't compile.

Once you're finished making changes, cd to the base imap-4.1.FINAL directory and type
"make lnx" - if you get compilation errors, you did something wrong while editing. If the compile finishes successfully, you will have executable binaries called imapd/imapd, ipopd/ipop3d, and ipopd/ipop2d. You can install these manually or else type "make install" to have it done automatically. IF THIS IS A PRODUCTION SYSTEM, MAKE SURE TO KEEP COPIES OF THE ORIGINAL BINARIES IN CASE SOMETHING GOES WRONG. Usually you do this by renaming the original /usr/sbin/ipop3d (etc) files to ipop3d.old (etc). If worst comes to worst, you can still reinstall (perhaps with --force) from the original imapd rpm file (the precompiled binary, off RedHat CD #1). And make sure to test your newly compiled binaries before you unleash them on users...

A slicker way to approach the problem would be to write code to accept command-line parameters and control the log level at run-time.

-Graham

ps. More points please! :-)
0
 

Author Comment

by:FloydATC
Comment Utility
Adjusted points to 100
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Sed question 2 45
SBS 2008 Staged Migration to 365 2 35
Block sender e-mail address in Postfix 4 38
LINUX CENTOS + APACHE 9 31
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now