Operating System - HP-UX
1824218 Members
3885 Online
109669 Solutions
New Discussion юеВ

how to start mail process (daemon)?

 
Peter Ko_2
Frequent Advisor

how to start mail process (daemon)?

I am running Openview with HPUX 11.i. It seems have a problem sending out mail. How do I start or restart the mail daemon?
Thanks.
13 REPLIES 13
lawrenzo
Trusted Contributor

Re: how to start mail process (daemon)?

first check to see if this is the issue:

# ps -ef |grep mail to see if send mail is running.

to stop and start the sendmail deamon:

/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start

HTH - points will be good if it does help.

Thanks
hello
Joseph Loo
Honored Contributor

Re: how to start mail process (daemon)?

hi,

make sure the sendmail server is enable, unless u r running on a queue, i.e. "sendmail -q".

check:

# vi /etc/rc.config.d/mailservs
SENDMAIL_SERVER=1
to enable daemon

to stop and start:
# /sbin/init.d/sendmail stop
or
# killsm
# /sbin/init.d/sendmail start

regards.
(p.s. please remember to assign points.)
what you do not see does not mean you should not believe
Bejoy C Alias
Respected Contributor

Re: how to start mail process (daemon)?

If the above steps dont work, u can use 'sendmail -bd -q30m' to start sendmail daemon in the background and start processing mail queues with an interval of 30 minutes . U can check for any errors during this startup in syslog or mail.log
Be Always Joy ......
Bejoy C Alias
Respected Contributor

Re: how to start mail process (daemon)?

btw .how do u came to know that ur mails are not working ??
Be Always Joy ......
Keith Bryson
Honored Contributor

Re: how to start mail process (daemon)?

Hi Peter

To test that the sendmail transport is working, try using the following from the Unix host (press Return at the end of each line):

sendmail -v -t
To:you@yourdomain.com
Subject:Test this out

hello
.


Alter you@yourdomain.com to whatever you have as a valid internal mail address.

The fullstop (.) tells sendmail you have finished. Sendmail should then attempt to deliver your mail and output is logged to your terminal. If this fails, include the text in your next reply on this forum.

Keith
Arse-cover at all costs
Muthukumar_5
Honored Contributor

Re: how to start mail process (daemon)?

You can check that whether sendmail is running or not as,

# ps -ef | grep sendmail


Restart it as,

# /sbin/init.d/sendmail stop
# /sbin/init.d/sendmail start

You can test that mail as,

# sendmail -v root@localhost
test
ok
ctr+d

# mail
It will display message with test and ok.

hth.
Easy to suggest when don't know about the problem!
Cem Tugrul
Esteemed Contributor

Re: how to start mail process (daemon)?

Peter,
As an additon to other replies you can find
very interesting answers below the link;
http://www4.itrc.hp.com/service/james/search.do?rn=25&source=7000&searchcategory=ALL&from=forums&hpl=1&todo=search&origin=0&wpa=forums1.itrc.hp.com%3A80&searchcriteria=allwords&esc=europe-support.external.hp.com&searchtext=send+mail&chkServStor=on&presort=rank

Good Luck
Our greatest duty in this life is to help others. And please, if you can't
Rick Garland
Honored Contributor

Re: how to start mail process (daemon)?

Having a problem sending mail out? Don't need the sendmail daemon running. This is for receiving mail.

To have the mail process running, check the file in /etc/rc.config.d/mailsrvs to ensure that SENDMAIL_SERVER=1. Start the daemon with /usr/lib/sendmail -bd -q15m. (Background daemon - check queue every 15min). Or start with '/sbin/init.d/sendmail start'.

Assuming a default config this will start the mail process to receive mail. Sending mail does not require the sendmail daemon running.

If you are not sending mail out, check the /var/adm/syslog/mail.log file and see what the error is.
Peter Ko_2
Frequent Advisor

Re: how to start mail process (daemon)?

I did a sendmail stop, it says "sendmail server is disabled, you cannot start sendmail server using sendmail script".

I check the etc/rc.config.d/mailservs file, SENDMAIL_SERVER=0

But when I did a test senmail using "sendmail -v -t", it send out the email fine.

I have a script running to send out email and that doesn't seem work properly, I double check the script and never been modified in anyway, it was working fine.

My question here is how do I clean out mail quene, thats the only thing it may cause this, (i guess).?

Thanks!
Juan M Leon
Trusted Contributor

Re: how to start mail process (daemon)?

Peter, I concur with people in this thread, you have to change your value from 0 to 1 in SENDMAIL_SERVER. Also if you want to clean old e-mail in queue, go to /var/spool/queue directory and remove your queue mail files.
I hope it helps.
Rick Garland
Honored Contributor

Re: how to start mail process (daemon)?

The sendmail daemon does NOT need to be running to send mail out from the system.

The sendmail daemon is for receiving mail.

Check the /var/adm/syslog/mail.log as to what the error is for the mail you are having trouble with.

To clean the mailqueue, /sbin/init.d/sendmail stop, cd /var/spool/mqueue, remove the files from within this directory.

Again, the sendmail daemon does not need to be running to send mail out. The /var/adm/syslog/mail.log file will have clues as to why a specific mail did not go out.

Keith Bryson
Honored Contributor

Re: how to start mail process (daemon)?

Hi Peter

If you are still looking for help, what mail command is your script using (can you attach the script?). 'sendmail -v -t' will obviously check operation to an external account, is this the same account that your script is sending to?

All the best - Keith
Arse-cover at all costs
Bejoy C Alias
Respected Contributor

Re: how to start mail process (daemon)?

Dear Peter,
How u r sending the mails from the script, using mailx or mail or sendmail . To whom u r sending the mails , external or internal users.
Be Always Joy ......