Operating System - HP-UX
1834397 Members
2620 Online
110067 Solutions
New Discussion

Re: no sendmail daemon running, but it is working.

 
SOLVED
Go to solution
Hanry Zhou
Super Advisor

no sendmail daemon running, but it is working.

If I type ps -ef | grep sendmail, it is not running, but the system is able to send out emails, and seems working ok. why?
the script /sbin/init.d/sendmail shows "sendmil -bd.."

Also when I do telnet mysystem 25, get connection refused. where prohibits the connection, and why?
none
13 REPLIES 13
Brian Bergstrand
Honored Contributor

Re: no sendmail daemon running, but it is working.

Sendmail doesn't have to be running as a daemon to send out mail. It only has to be running as a daemon if you want to recieve mail from other machines on your machine (via SMTP, not POP, IMAP). You can even deliver mail to local acct's w/o running in daemon mode as long as you have sendmail running from cron every 10 minutes or so to process the queue.

HTH.
Hanry Zhou
Super Advisor

Re: no sendmail daemon running, but it is working.

Brian,

The starting script /sbin/init.d/sendmail does start the sendmail by using -bd option, and it seems starting sendmail as daemon mode ( am I right?).

The cron job doesn't have sendmail configured.

Also whey get connectin refused when I run telnet mysystem 25? PrivacyOption =authwarning only
none
Patrick Wallek
Honored Contributor

Re: no sendmail daemon running, but it is working.

Your /sbin/init.d/sendmail script will only start sendmail if the line SENDMAIL_SERVER (or something close to that) is set to 1 in /etc/rc.config.d/mailservs.

You get connection refused when you telnet to port 25, because sendmail is not running. If you do a 'ps -ef | grep sendmail' and you don't get any results then sendmail is not running.

As said, sendmail does not have to be running in order for you to send mail *from* your HP-UX box. I don't run sendmail on any of my machines if I can help it.
Michael Steele_2
Honored Contributor

Re: no sendmail daemon running, but it is working.

Please run and paste:

sendmail -v you@your_domain.com < /dev/null

Anything about ;; AUTHORITY SECTION?
Support Fatherhood - Stop Family Law
Steven E. Protter
Exalted Contributor

Re: no sendmail daemon running, but it is working.

sendmail will send out mail when told to regardless of whether the daemon is running....

/sbin/init.d/sendmail start


to get it cooking

For permanence /etc/rc.config.d/mailservs

export SENDMAIL_SERVER=1

If thats set and it failed, there is another issue. This can be found at start in /etc/rc.log and /var/adm/syslog/mail.log

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Brian Bergstrand
Honored Contributor

Re: no sendmail daemon running, but it is working.

Hanry,

As Patrick said, you have to enable sendmail server mode in /etc/rc.config.d/mailservs. If SERVER is not set to 1, then sendmail will not be started by /sbin/init.d/sendmail.

From the init file:

MAIL_SERVER=${SENDMAIL_SERVER:-0}

...

if [ $MAIL_SERVER -eq 1 ] ; then
...
fi

HTH.
Hanry Zhou
Super Advisor

Re: no sendmail daemon running, but it is working.

Ok. the MAILSERVER_NAME is currently is set to "0", so understood why it is not running, so does that mean the sendmail.cf will not take any effect?

Also, why I am still able to send out emails?
none
Uday_S_Ankolekar
Honored Contributor

Re: no sendmail daemon running, but it is working.

No need to have sendmail running to send out e-mails but to receive probably yes.
You are getting telnet 25 refused because your sendmail is not running.

-USA..
Good Luck..
Brian Bergstrand
Honored Contributor
Solution

Re: no sendmail daemon running, but it is working.

sendmail.cf is processed whenever sendmail is started, whether from the init script or from someone just running it from the shell to deliver one e-mail.

As said before, there is no need for sendmail to be running permantly in the background to deliver mail. Mail is delivered by a separate sendmail process. For instance, when you run 'mailx -s "Hello" user@host' mailx starts a sendmail process to deliver the mail. Once it is deliverd, the sendmail process exits. It does not continue to run, nor does it ever open a listen connection on port 25.

HTH.
Hanry Zhou
Super Advisor

Re: no sendmail daemon running, but it is working.

Brian,

Ok, vey well put.

However, how come the mailx can initiate sendmail, and send my email out, I mean what the mechnism/configuration behind the scene?
none
Hanry Zhou
Super Advisor

Re: no sendmail daemon running, but it is working.

Just wanted to post my previous question again:

Ok, vey well put.
However, how come the mailx can initiate sendmail, and send my email out, I mean what the mechnism/configuration behind the scene?
none
Brian Bergstrand
Honored Contributor

Re: no sendmail daemon running, but it is working.

Hanry,

mailx doesn't do anything special at all. It just execs sendmail with the arguments needed to send the mail. You can do the same thing from the command line:

sendmail -t << EOF
To: user@host
From: Me
Subject: hello

Hello world!!
EOF

You really should read the sendmail manpage; it explains a lot of what sendmail does to get mail delivered. Also, you should assign points to those responded to your questions.

HTH.
Naveej.K.A
Honored Contributor

Re: no sendmail daemon running, but it is working.

hi hanry,
Sendmail is a mail transfer agent. It uses sendmail.cf as its configuration files.

The system sends out email through the MTA or mail transfer agent which you have configured in your system. Postfix, smail, qmail, and exim are some of the other MTAs. possibly your system might be running some other MTAs.

Regards
Naveej
practice makes a man perfect!!!