Operating System - HP-UX
1748145 Members
3644 Online
108758 Solutions
New Discussion юеВ

Regarding mailx from HP-UX system

 
Prakalp
Occasional Contributor

Regarding mailx from HP-UX system

hi, i have 2 doubts regarding the mailx feature in hp-ux system -
(1) i am currently trying to send a test mail using a shell script like :

HEADER="Test mail"
mailx -s "$HEADER" prakalp_shrivastava@infosys.com <testing ..
EOF
exit 0

however it is not going .. is there some environment variable or setting i need to make for this ??

(2) the test mail sent from above script, in the "From" mail tag, whose mail id will be shown ? does it depend on the user who has logged in the system currently while executing the script ?
is it possible to change the id shown in "From" tab by changing a variable in some mail setting file ?


looking fwd to some opinions on this, sorry if this is in the wrong section (?) and thanks for ur time .

regards,
Prakalp
4 REPLIES 4
Biswajit Tripathy
Honored Contributor

Re: Regarding mailx from HP-UX system

1) The script should work. Run "mailq" command
and see if you mail is in the queue.

2) From mailid should be of the user who is executing
the script. If the user "user1" is executing the script
on machine "machine1" and the "machine1" is in
domain company.com, then the from address should
be
user1@machine1.company.com

Some of the atributes can be changed by changing
the configuration file .mailrc. Other more things can
be changed if you know how smtp works.

- Biswajit
:-)
Prakalp
Occasional Contributor

Re: Regarding mailx from HP-UX system

thanks for the early response !
well ..
(1) just checked the mail queue, and it is showing empty(!) maybe the server needs to be configured for sending mails to outside domain (?) .. can u confirm the same? if yes, pointers to the file would be definetly helpful

(2) will check up in this direction.. thanks again ..

regards,
prakalp.
Biswajit Tripathy
Honored Contributor

Re: Regarding mailx from HP-UX system

Check for error messages in
/var/adm/syslog/mail.log

- Biswajit
:-)
Bill Hassell
Honored Contributor

Re: Regarding mailx from HP-UX system

If you have never setup sendmail and tested the ability to transmit/receive email, then this is expected behavior. Start by tracing your mail using sendmail directly:

/usr/sbin/sendmail -v myname@yourcomany.com < /etc/issue

Look at the first couple of lines and the end of the transaction. If you've configured sendmail to use a relay system (ie, Exchange or another mail server), you may need to change the settings on that mail server.


Bill Hassell, sysadmin