1827197 Members
2309 Online
109716 Solutions
New Discussion

sendmail usage

 
SOLVED
Go to solution
Quark
Valued Contributor

sendmail usage

Hi,

I am currently checking what services should be active on my HP-UX system.
On every system I see that there is a sendmail daemon running.
We only send mails from the Unix systems to Ms Exchange server (via smtp). Typically, the result of cron jobs to the job responsible.

Am I correct to assume that for sending mails the sendmail daemon should not be running?

Kris
6 REPLIES 6
Pete Randall
Outstanding Contributor
Solution

Re: sendmail usage

The man page tells us that, when sendmail runs as a daemon, it listens for incoming messages:

"-bd Run as a daemon. sendmail will fork and run in background listening on socket 25 for incoming SMTP connections."


Pete

Pete
RAC_1
Honored Contributor

Re: sendmail usage

sendmail need not be running for sending emails out.
There is no substitute to HARDWORK
Steven E. Protter
Exalted Contributor

Re: sendmail usage

Shalom Kris,

Your assumption is correct. The daemon is necessary for the server or local users on the server to RECEIVE mail.

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
Peter Nikitka
Honored Contributor

Re: sendmail usage

Hi,

it is correct, that you do not need sendmail in daemon mode to send mails.
If however a mail you want to send cannot be forwarded to the relay e.g., it gets queued in the mqueue. When no daemon is running, such a mail will never be re-sent again.
So setup a cronjob, which starts - once per day or so - a sendmail (in normal mode, not as a deamon) to spool possibly stuck mails.

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"
Arunvijai_4
Honored Contributor

Re: sendmail usage

Hi Quark,

This is what Wikipedia says about sendmail.

Sendmail is a mail transfer agent (MTA) that is a well known project of the open source and Unix communities and is distributed both as free software and proprietary software.

http://en.wikipedia.org/wiki/Sendmail

Yes, You are correct.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Doug O'Leary
Honored Contributor

Re: sendmail usage

Hey;

As an addendum to the posts already done:

1. When you send an email from a UNIX system using pine, elm, mailx, etc (referred to by mail admins as the mail user agent (MUA)), the MUA will execute an intance of sendmail itself. As others have mentioned, sendmail in daemon mode is usually only used to receive email.

2. The caveat to the receiving email, though, is if your UNIX system must relay email for local users. I'm not sure why it's built this way, but SAP database servers (at least at my current client) must have a sendmail daemon running so the individual clients can relay through it to the outside world. The system still doesn't receive email. In this specific case, we lock sendmail down so it only listens on the loopback address. That way, incoming port 25 is blocked which prevents many of the security weaknesses inherent in sendmail.

O DaemonPortOptions=Port=smtp, Addr=127.0.0.1

is the option that needs to go into sendmail.cf to accomplish that.

HTH;

Doug

------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html