- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- sendmail setup help
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2005 09:55 PM
04-18-2005 09:55 PM
sendmail setup help
I want user "oracle" in the hpux11.00 system to be able to send messages/emails to the users within the company like user@companydomain.com.
I dont want "app" to receive any messages from outside but only want it to send some alerts to the users.
Can sendmail be used to achieve this ? any help on setting up send mail ?
Many Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2005 10:43 PM
04-18-2005 10:43 PM
Re: sendmail setup help
You have to configure the smart relay host for the sendmail to relay messages to other domains.
/etc/mail/sendmail.cf is the configuration file and have to modify the DS directive.
DSsmartrelayhost.yourdomain.com
and then restart the sendmail
/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start
You can send a test mail and see if its working.
cat testfile | mailx -s 'test mail' emailaddress@externaldomain.com
Regards,
Naveej
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2005 11:31 PM
04-18-2005 11:31 PM
Re: sendmail setup help
Can you please clarify:
1. Have you got mailx sending messages already (i.e. is sendmail installed, ll /usr/sbin/sendmail)
2. The messages are to be sent from the oracle user, who runs an application.
3. Any reply messages from the users are to be 'bounced'. What do you want to do with any such message (delete,forward to Sys.Admin)?
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2005 11:50 PM
04-18-2005 11:50 PM
Re: sendmail setup help
answers to your question.
1) yes, sendmail is already installed on the box
2) yes, messages are to be sent from oracle user.
3) delete.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2005 01:22 AM
04-19-2005 01:22 AM
Re: sendmail setup help
thanks for the info.
If your SMTP gateway (the box that talks tot he outside world) is correctly set up, any message trying to return should be deleted.
Perform Naveei's changes; What currently happens if you try to send a message from within the application. Best to track the status via the
tail -f /var/adm/syslog/mail.log command.
For additional reading:
http://www.sendmail.org/~ca/email
in particular:
http://www.sendmail.org/~ca/email/protected.html
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2005 03:47 PM
04-19-2005 03:47 PM
Re: sendmail setup help
1) yes, sendmail is already installed on the box
You may follow the instructions given in my first reply
2) yes, messages are to be sent from oracle user.
you can use mailx or sendmail command to send messages to the external email address
3) delete.
create a file, .forward (read as dot forward) in the home directory of the user oracle and mention /dev/null. But this will remove all the mails send to the oracle user (both internal and external)
Regards,
Naveej
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2005 05:39 PM
04-19-2005 05:39 PM
Re: sendmail setup help
/etc/rc.config.d/mailsvrs
Make sure first variable is set to 0.
That will disable sendmail. Its still theoretically possible to get mail onto the box but more difficult.
If that doesn not work for you the other solutions will be just fine. SMTP gateway allows your mail configuration to be centralized.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2005 07:47 PM
04-19-2005 07:47 PM
Re: sendmail setup help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2005 08:25 PM
04-19-2005 08:25 PM
Re: sendmail setup help
I use the following function to mail (with logfile attached) as oracle in case of a failure in a script.
I use the -r option to give the sender a different name.
SENDER="user@companydomain.com"
function f_retval
{
if (( $? > 0 ))
then
printf "\a \n Error occurred in function ${fname} \n \n" >> ${LOGFILE}
SUBJECT=" Error in execution of ${fname} in ${SCRIPTFILE}"
/usr/bin/mailx -r ${RETURN_ADDRESS} -m -s "${SUBJECT}" ${RETURN_ADDRESS} <<-EOF
$(ux2dos ${LOGFILE} | uuencode ${LOGALIAS})
Hi,
An error in script ${SCRIPTFILE} occurred while running function $fname
The logfile ${LOGALIAS} is attached to this document.
This email message was created automatically by UNIX
EOF
exit 102
fi
}
Hope it helps,
Renarios