System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure a normal user to send mail from HP-UX Server

Gaby1110
Frequent Advisor

How to configure a normal user to send mail from HP-UX Server

Hi,

I want to add an application user (apps) in my HP-UX Server so that I can send application log from apps mail id to my company mail-id (e.g. gaby@companyname.com).... I have configured sendmail and I am able to send mail from root@companyname.com but How can I send a mail from apps@companyname.com..

Thanks in advance
Gaby
5 REPLIES
Vinod Kumar Yadav
Trusted Contributor

Re: How to configure a normal user to send mail from HP-UX Server

Hi,


Have a Good Day

# class E: names that should be exposed as from this host, even if we masquerade
# class L: names that should be delivered locally, even if we have a relay
# class M: domains that should be converted to $M
#CL root
CE root


Note:- In the place of CE root give the username.
++++++++++++++++++++++++++++++++++++++++++++
In the most environments a smtp relay server is provided for send a email.

You take the IP address or host name of the server for accept mail from your server then.

Edit /etc/mail/sendmail.cf

Change DS to:

DSname_of_smtp_relay_server

or

DSIP address of smtp relay server

ex

DS telcon.co.in

CE


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


Then check few thing for sending the mail sucessfully.

Check the permission of the files related sendmail /var/spool/mqueue or check the
/etc/resolv.conf & Please check the sendmail services running.

root # ps -ef | grep -i sendmail
root 1700 1 0 Jul 11 ? 0:04 sendmail: accepting connections
root 29011 23487 0 16:13:46 pts/tb 0:00 grep -i sendmail

root # ls -ld /var/spool/mqueue
drwxr-xr-x 2 root bin 1024 Jul 13 16:13 /var/spool/mqueue

root # ls -ld resolv.conf
-rw-r--r-- 1 root sys 110 Jun 16 2007 resolv.conf

Try with Permission send mail & check the log /var/adm/syslog/mail.log


Thanks
Vinod Kumar Yadav
Jai Shiv Shankar
Vinod Kumar Yadav
Trusted Contributor

Re: How to configure a normal user to send mail from HP-UX Server

Hi,


In the /etc/mail/sendmail.cf file in the front of CE root put the username.

# class E: names that should be exposed as from this host, even if we masquerade
# class L: names that should be delivered locally, even if we have a relay
# class M: domains that should be converted to $M
#CL root
CE root


Thanks
Vinod Yadav
Jai Shiv Shankar
Gaby1110
Frequent Advisor

Re: How to configure a normal user to send mail from HP-UX Server

Hi Vinod,

Thanks for the reply.

Do I need to add the user name in front of the CE root like this: CE root vfbuild
OR replace root with vfbuild

One more query: Do I need to create vfbuild user on the system or I can just put any name there ?

Thanks again

Gaby
Steven Schweda
Honored Contributor

Re: How to configure a normal user to send mail from HP-UX Server

> [...] How can I send a mail from
> apps@companyname.com..

Log in as user "apps"? Who is sending this
e-mail? Normally, once sendmail is
configured, any user can send e-mail.

How did you wish to send this e-mail?
"man sendmail", look for "-f".


> Edit /etc/mail/sendmail.cf

Someone may be getting a bit over-excited.
Steven E. Protter
Exalted Contributor

Re: How to configure a normal user to send mail from HP-UX Server

Shalom,

Any user can send ail via a properly configured system.

To support proper mail ID, you may need to use sendmail virtusertable genericstable and alias to get the right domain name.

See http://sendmail.org search for virtusertable genericstable, as a start.

See http://www.hpux.ws/buildmail.hpux.text to see how to build a sendmail.cf configuration using the m4 macro builder on HP-UX.

The basic part is most corporate systems use DSrelay in sendmail.cf to route mail onto a Corporate mail system. The rest is just tweaks to get the domain name right.

You need not run the sendmail daemon and accept external mail. You can write a cron script and run the sendmail -q command to run what is called queue runner to process mail off your system.

Pay attention to /var/adm/syslog/mail.log when you are in diagnosis.

The blog http://www.hpux.ws has several articles on sendmail configuration as well.

SEP
hpuxadmin in gtalk
hpuxconsulting in yahoo messenger
hpuxlinux in twitter. Tweet me if you dare.
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