Operating System - HP-UX
1830935 Members
2504 Online
110017 Solutions
New Discussion

Re: Configuring mail without sendmail daemon

 
James Beamish-White
Trusted Contributor

Configuring mail without sendmail daemon

Hi all,

Is it possible to mail from a machine without sendmail running? Do you still have to periodically run sendmail -q to post messages?

I would like to send mail messages to an internal smtp host without running sendmail daemon, how can I configure this, or is it too hard?

Thanks,
James
GARDENOFEDEN> create light
8 REPLIES 8
Sridhar Bhaskarla
Honored Contributor

Re: Configuring mail without sendmail daemon

You don't need to run sendmail as a daemon to send messages. You can disable sendmail to run as a daemon but still can be able to send messages. You can use mailx for this purpose. However, you need to have sendmail daemon for receiving mails.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Craig Rants
Honored Contributor

Re: Configuring mail without sendmail daemon

James,
That is the beauty of sendmail, you can still send email without the daemon running. Just enter /sbin/init.d/sendmail stop to stop the daemon. No other configuration should be required. You may want to change the /sbin/rc2.d/S540sendmail to /sbin/init.d/s540sendmail so it does not start on boot. But you should be ok from there.

Good Luck.
C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
Sanjay_6
Honored Contributor

Re: Configuring mail without sendmail daemon

Hi James,

you need to have sendmail running to send mail to other servers. Even if it is within your own domain. To limit the use of mailing withing the domain, you should have the correct name resolution on your system, DNS if available would be good. No need to customise sendmail configuration. Just have to start sendmail server bu enabling sendmail "export SENDMAIL_SERVER=1" in /etc/rc.config.d/mailservs file and starting sendmail,
/sbin/init.d/sendmail start

Hope this helps.

Regds
James Beamish-White
Trusted Contributor

Re: Configuring mail without sendmail daemon

Great! How do I tell the system which smtp host to use?

James
GARDENOFEDEN> create light
A. Clay Stephenson
Acclaimed Contributor

Re: Configuring mail without sendmail daemon

Hi James:

While it is possible to direct outgoing mail without a sendmail daemon. I would configure sendmail as a daemon and then define a 'Smart Relay' the 'DS' macro in /etc/mail/sendmail.cf. That will direct all non-local mail to the Smart Relay; in this case, your SMTP server.
If it ain't broke, I can fix that.
Sanjay_6
Honored Contributor
Roger Baptiste
Honored Contributor

Re: Configuring mail without sendmail daemon

Hi,

You do *not* need to run sendmail daemon to send mails from the system.

Regarding telling which sendmail host the mails should
go to - you define this in
the /etc/mail/sendmail.cf
file of the system.
look for "'DH"" in the sendmail.cf file and specify
the host to which you want to send to corresponding to the
DH.

HTH
raj
Take it easy.
Robin Wakefield
Honored Contributor

Re: Configuring mail without sendmail daemon

Hi James,

In your /sbin/init.d/sendmail you could remove the -bd switch from the sendmail line, but leave the -q15m (or whatever you have).

This way, any mails that are not delivered immediately, for whatever reason, will be retried every 15 minutes. This saves you having to put an entry in cron.

Rgds, Robin.