Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
cancel
Showing results for 
Search instead for 
Did you mean: 

No mail

ManojK_1
Valued Contributor

No mail

Hi,
We are using HP Unix 11.31 in our production Environment.
Most of the unnecessary services like sendmail, NFS etc… has been stopped for improving the performance.
The same server is also acting as a mail relay server, so the application user sending mails in critical situation.
Number of jobs are scheduled through cron job in the server. Before that after login as the application user and giving mail command gives us the status of all cronjob which has run and it will help us to find the problems, errors in the scheduled job.
Now a days if I am giving mail command after login as the user, it is giving the output as “No mail” and there is no file in /var/mail with the user name.

Can somebody help me to find out the reason for this issue.

Thanks and Regards,
Manoj K
Thanks and Regards,
Manoj K
4 REPLIES
Steven E. Protter
Exalted Contributor

Re: No mail

Shalom,

To be a mail relay server, sendmail needs to run. That means if you want other servers to relay mail off this server, it must be able to accept mail externally.

If you are just talking about getting mail from this server off to another location, you can set up a cron job that periodically runs sendmail -q (known as the queue runner).

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
nightwich
Valued Contributor

Re: No mail

Hi ManoJK

I think what you are saying is normal beavier for your server.


The "no email" just tells that the users have no mails.

What concerns to /var/mail if the user not have or send email's the file don't exist.


I think you need to give more details about your problem.

Best regards.
ManojK_1
Valued Contributor

Re: No mail

Hi,

I will give one example.

If there is any hardware problem in the server when i am login to the server with root, i will get a maeesage that "You have mail" and will have the details of hardware problem in that mail.

The same way if there is any crontab entry for any user in the system, there will be a mail with details for that particular user when ever the cron entry triggered.
This will help us some time if there is any problem with script which is scheduled to run.

But in my HP Unix 11.31 server it is not working as expected.
Thanks and Regards,
Manoj K
Matti_Kurkela
Honored Contributor

Re: No mail

You say sendmail has been stopped?

Sendmail runs as a daemon (as a Mail Transfer Agent/MTA), but it can also be invoked directly by cron, mailx and the like, for the purpose of sending an email message (as a Message Submission Program/MSP).

In older versions of HP-UX, sendmail in the MSP role used to be able to deliver the message to the local recipient's mailbox in a single operation. This meant sendmail had to be a setuid root program, while it was usable by regular users... so any bug in it could cause big security problems.

In HP-UX 11.31, sendmail has been upgraded to version 8.13.3. The major version 8.13 brought a big change into sendmail's architecture: it was split into two parts for security reasons. The MSP part that can be used by users, mailx and cron does not have setuid root privileges any more. It cannot write the message directly to the recipient's mailbox. Instead, it can only submit the message into the mail queue of the MTA part, also known as the "main" sendmail daemon.

But if the MTA part of sendmail is completely disabled, it cannot deliver the queued mail to the recipient's mailbox file: the mail will be left in MSP part's queue forever (or until the system administrator notices the queue directory is filling up). So the MTA part must be running, or even the local email delivery won't work.

In 11.31, there is a new configuration option in /etc/rc.config.d/mailservs which can be used to switch the sendmail daemon (MTA) into send-only mode:
export SENDMAIL_SERVER=1
export SENDMAIL_SENDONLY=1

In this mode, sendmail won't be listening for incoming network connections, but the MTA part will be running as a daemon to handle the local messages submitted by the MSP part.

MK
MK