Problem starting Sendmail on Solaris 9

Hi,
I am getting problem in starting up Sendmail on solaris. When I do /etc/init.d/sendmail start
in Process list it shows sendmail process properly. But when I do portcheck by netstat it doesn't show Port 25/smtp.
What could be the problem ?

Thanks
NeeleshG

Have you tried connecting to the port with

# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 hostname.domain.net ESMTP Sendmail 8.11.7p3+Sun/8.11.7; Sat, 11 Aug 2007 08:11:37 -0400 (EDT)
quit
221 2.0.0 hostname.domain.net closing connection
Connection closed by foreign host.

But port 25 is not getting opened. telnet to port 25 cannot be done.
thats prob...
thanks

Of course that is the problem; my posting was incomplete.

I suspect that sendmail is not running in daemon mode that is, it will send mail from the system but not receive it.

Check for an /etc/default/sendmail file which might look something like this:

MODE=
QUEUEINTERVAL="5m"

Also check the sendmail process with ps for arguments such as:

    root  461     1  0 09:40:06 ?        0:00 /usr/lib/sendmail -q5m

Let me know what you find. Sorry for any confusion.

Hey no sorry... no problem with that....

Below given output of ps -ef|grep sendmail

smmsp 10741 1 0 Aug 11 ? 0:00 /usr/lib/sendmail -Ac -q15m
root 10749 1 0 Aug 11 ? 0:00 /usr/lib/sendmail -q15m

But still when I run netstat -an|grep 25
It doesnt show any service..

I didnot find /etc/default/sendmail

Thanks
NeeleshG

Okay, so you're not running in daemon mode. Check /etc/init.d/sendmail and search for the variable "MODE". (Note that I'm running Solaris 8 at home and I'm not sure of, if any, differences).

In Solaris 8, the /etc/init.d/sendmail script will source /etc/default/sendmail setting various environment variables: MODE, QUEUEINTERVAL, and OPTIONS. These are used to call /usr/lib/sendmail. Verify that this is true for Solaris 9 (it should be). You see something like this in the init script:

if [ -f /etc/default/sendmail ]; then
. /etc/default/sendmail
fi

Then create /etc/default/sendmail as:

MODE="-bd"
QUEUEINTERVAL="15m"

Stop and start sendmail with the init script and you should see:

root 10123 1 0 Aug 12 ? 0:00 /usr/lib/sendmail -bd -q15m

Be prepared that this will open a whole can of worms with regard to email security. You current mode is sufficient -- with some tweaking of /etc/mail/sendmail.cf -- to route mail off of the system but it prevents email coming into or being routed by it, either intentionally or maliciously.

Good Luck!

Thanks Very much I started sendmail by following command:

/usr/lib/sendmail -bd -q15m

and it worked.

Thanks
NeeleshG