Sponsored Content
Full Discussion: /var/log/syslog
Operating Systems Solaris /var/log/syslog Post 302397524 by EAGL€ on Monday 22nd of February 2010 01:47:31 PM
Old 02-22-2010
ok i will just talk about general debugging. Check what causes Proc size to be very large, any log there which is in debug or finest level? If its so then second step check what causes too much logs, then third step search for any exception or error.
You should be debugging carefully and having good control of which processes runs in the system.
check running processes with
Code:
ps -ef

or cpu, mem usage with "prstat". grep errors, warnings or exceptions. If you dont know what log to check then type something general, just an example:
Code:
find . -type f -name "*log" -print | xargs grep -i error

maybe sendmail will not give any error after you start it?and queued processes will be completed

---------- Post updated at 09:47 PM ---------- Previous update was at 08:13 PM ----------

I've found something could be very usefull regarding to your sendmail:

You can test connecting to sendmail locally by issuing the command
Code:
telnet localhost 25

Note that we are not actually telnetting but attempting to establish a connection on port 25, which is the port mail transfer agents listen on for incoming connections.

If you get something like the following then you were successfully able to connect. To disconnect from sendmail type "quit" and hit enter.

Code:
Connected to localhost.
Escape character is '^]'.
220 laptop.electrictoolbox.com ESMTP Sendmail 8.12.8/8.12.8; Sun, 30 Nov 2003 13:19:45 +1300

If you could not connect then you'll see something like the following instead. If you get this then you probably don't have sendmail running, or the appropriate entry in your inetd or xinetd settings, depending on how your machine is configured. Fixing this sort of problem is not within the scope of this article.

Code:
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused

Whether attempting to connect to a local or remote server you will get the same sort of result, either the connection will be refused or you will be greeted by the mail server. To allow access to incoming remote connections, you need to modify the sendmail configuration.

There are two ways to modify sendmail's configuration file. The sendmail.cf file contains all the instructions sendmail needs to run as you intend it to. It is generated automatically from the sendmail.mc file, which is a much easier to read and understand configuration file. Whereever possible you should always modify the snedmail.mc file rather than the sendmail.cf file. However, the are circumstances when someone has changed the sendmail.cf file manually and therefore you need to edit that again to prevent overwriting their changes.

sendmail.cf
To modify sendmail to accept remote connections in the sendmail.cf file, comment out (or delete) the following line:

Code:
O DaemonPortOptions=Port=smtp,Addr=127.0.0.1, Name=MTA

The commented out version of this line would then look like so:

Code:
#O DaemonPortOptions=Port=smtp,Addr=127.0.0.1, Name=MTA

Restart sendmail after doing this and you should now be able to connect to sendmail from a remote machine. If you commented out the line rather than deleted it you are then able to easily revert back to your previous configuration.

sendmail.mc
The preferred option is to edit the sendmail.mc file instead. It's always a good idea to make a backup copy of the sendmail.cf file though in case something goes wrong and there had been changes made to that file that are not in the sendmail.mc file.

As with the sendmail.cf file you need to comment out (or delete) the same option. In the sendmail.mc file this looks like so:

DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')

After commenting out the line it will now look like so:

dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')

You now need to compile this file into a new sendmail.cf file by issuing the following command:

m4 sendmail.mc > sendmail.cf

and then restarting sendmail. Remember it's important to make a backup copy of the sendmail.cf file first so you can revert back to it if sendmail stops working like it did before.
 

10 More Discussions You Might Find Interesting

1. Solaris

diff b/w /var/log/syslog and /var/adm/messages

hi sirs can u tell the difference between /var/log/syslogs and /var/adm/messages in my working place i am having two servers. in one servers messages file is empty and syslog file is going on increasing.. and in another servers message file is going on increasing but syslog file is... (2 Replies)
Discussion started by: tv.praveenkumar
2 Replies

2. UNIX for Advanced & Expert Users

/var/adm/messages vs /var/log/messages

The /var/adm/messages in Solaris seem to log more system messages/errors compared to /var/log/messages in Linux. I checked the log level in Linux and they seem OK. Is there any other log file that contains the messages or is it just that Linux doesn't log great many things? (2 Replies)
Discussion started by: gomes1333
2 Replies

3. Solaris

Changing of syslog file path instead of /var/log directory

Hi Please let me know how can we change the syslog file path from /var/log to /a directory in solaris Regards (4 Replies)
Discussion started by: amity
4 Replies

4. Solaris

Difference between /var/log/syslog and /var/adm/messages

Hi, Is the contents in /var/log/syslog and /var/adm/messages are same?? Regards (3 Replies)
Discussion started by: vks47
3 Replies

5. Shell Programming and Scripting

How can view log messages between two time frame from /var/log/message or any type of log files

How can view log messages between two time frame from /var/log/message or any type of log files. when logfiles are very big and especially many messages with in few minutes, I would like to display log messages between 5 minute interval. Could you pls give me the command? (1 Reply)
Discussion started by: johnveslin
1 Replies

6. HP-UX

Script to monitor /var/opt/resmon/log/event.log file

AM in need of some plugin/script that can monitor HP-UX file "/var/opt/resmon/log/event.log" . Have written a scrip in sh shell that is working fine for syslog.log and mail.log as having standard format, have interrogated that to Nagios and is working as I required . But same script failed to... (3 Replies)
Discussion started by: Shirishlnx
3 Replies

7. Solaris

Understanding /var/log/syslog.* logfiles solaris 8

hi guys, This is a log from a Solaris 8 server /var/log/syslog.* file. Can any body please confirm whether the meaning of the last two words (Mail accepted) means the mail has been delivered? Because the email id the mail was sent to is invalid. :confused: The log is: Feb 18 08:55:45... (2 Replies)
Discussion started by: raj_55555
2 Replies

8. Programming

Openlog and syslog in red-hat Linux doesn't write any thing to /var/log/*

Using redhat 64 bit ver 6.2 I have simple c++ app that is trying to write to syslog like this: /* try to write massage into linux log */ void foo::writeToSyslog() { openlog("testlogfoo", 0, 24); // Send the message. ... (1 Reply)
Discussion started by: umen
1 Replies

9. Shell Programming and Scripting

Log all the commands input by user at real time in /var/log/messages

Below is my script to log all the command input by any user to /var/log/messages. But I cant achieve the desired output that i want. PLease see below. function log2syslog { declare COMMAND COMMAND=$(fc -ln -0) logger -p local1.notice -t bash -i -- "$USER:$COMMAND" } trap... (12 Replies)
Discussion started by: invinzin21
12 Replies

10. Shell Programming and Scripting

Transfer the logs being thrown into /var/log/messages into another file example /var/log/volumelog

I have been searching and reading about syslog. I would like to know how to Transfer the logs being thrown into /var/log/messages into another file example /var/log/volumelog. tail -f /var/log/messages dblogger: msg_to_dbrow: no logtype using missing dblogger: msg_to_dbrow_str: val ==... (2 Replies)
Discussion started by: kenshinhimura
2 Replies
All times are GMT -4. The time now is 05:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy