1748006 Members
4229 Online
108757 Solutions
New Discussion юеВ

Re: Sendmail

 
SOLVED
Go to solution
manny_9
Frequent Advisor

Sendmail

Hi,

I was asked to stop sendmail (redhat 7.2)

I tried sendmail stop , wouldn't work

I ended up with kill -9 with the pid.

How do I restart without rebooting ????


Thanks in advanve!
15 REPLIES 15
Stuart Browne
Honored Contributor
Solution

Re: Sendmail

If you have successfully stopped all sendmail processes (ps -ef | grep sendmail), then the command:

service sendmail start

should start it again. To stop sendmail, you should have just used:

service sendmail stop

One long-haired git at your service...
Alex Ferreira
Frequent Advisor

Re: Sendmail

Hey friend,

/etc/init.d/sendmail start

should do the job for you...

Procedure for stopping and starting sendmail is no different to any other process..

Tip: If your machine seems to hang for a few minutes while loading sendmail( after the starting sendmail: message is printed), the machine's hostname cannot be resolved. To fix this, add the machines I.P address and hostname to the /etc/hosts file. This behaviour can occur as the X server attempts to start.

Hopes this helps.

Alex
Steven E. Protter
Exalted Contributor

Re: Sendmail

service sendmail restart

Will restart with one command.

As noted earlier

service sendmail stop to stop it.

The service command works on all Linux daemons.

If you want to stop DNS,

service named stop

Just wanted to make sure you understood that service is an all encompassing, useful command. So much so, that I ported it to HP-UX.

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
Stuart Browne
Honored Contributor

Re: Sendmail

hehe ;) go SEP.. Welcome back by the way ;)

Sometimes it's just amazing how such a simple idea makes things so much easier..

The 'service' command (an 11 line script originally) was implemented way-back in RH6.0 (or possibly .1, can't recall), but it was broken at that point. Didn't get fixed properly until 7.0.

go figure.. ;)
One long-haired git at your service...
Alex Ferreira
Frequent Advisor

Re: Sendmail

Hey SEP,

what do you mean by porting it to HP-UX? I tried doing a man on service and I got a smack in the mouth by the console saying

"No manual entry for service."

Alex
manny_9
Frequent Advisor

Re: Sendmail

Thanks guys!! Will try tomorrow!!!!!!
Stuart Browne
Honored Contributor

Re: Sendmail

Alex,

Most Unicies have a central directory structure where the start/stop routines live, which are usually symbolically linked to the /etc/rc#.d/ structures for the start up/shut down routnies.

In RedHat, they used to be /etc/rc.d/init.d, but have moevd to /etc/init.d (although they are sym-linked together), and for SCO Open Server 5.0.5+ and Solaris 8 (not sure about other versions) it's the same (/etc/init.d).

Using the same method that /usr/sbin/service uses in RedHat (actually you could probably copy it without any issue) you can easily port the function to any other unix.
One long-haired git at your service...
Steven E. Protter
Exalted Contributor

Re: Sendmail

In this thread, my last or second to last post includes a script called service

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xf0fc5dc05a7ad711abdc0090277a778c,00.html

It is not an official HP script, just makes it easier for my brain to switch back and forth from Linux to HP and back.

You copy it to the path, make sure its owned by root and that nobody else can execute it and the service command is on HP-UX.

It checks that the service in question is a valid script in /sbin/init.d/

Let me know if you need any help with it.

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
Alex Ferreira
Frequent Advisor

Re: Sendmail

SEP & S.B,

you guys rock... Thank you...

This forum rocks....

Alex...