- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Internet mail - status confirmation
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
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
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
06-29-2001 12:45 AM
06-29-2001 12:45 AM
Internet mail - status confirmation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2001 04:48 AM
06-29-2001 04:48 AM
Re: Internet mail - status confirmation
You can verify the mail progam is running by
ps -ef | grep sendmail
You can see the pending mail queue by
mailq
Assuming a default install, you can see logged messages
leaving your system by
more /var/adm/syslog/mail.log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2001 12:24 PM
06-29-2001 12:24 PM
Re: Internet mail - status confirmation
I'm assuming from your question that you're going to try and implement some sort of script to check and make sure that sendmail is working correctly, if that is the case:
# example script
IS_IT_EMPTY=`mailq`
IS_IT_RUNNING=`ps -eaf | grep sendmail | grep -v grep`
if [ "${IS_IT_EMPTY}" = "Mail queue is empty" ]
then
if [ "${IS_IT_RUNNING}" != '' ]
then
echo "its running"
else
echo "there's a problem w/ sendmail"
else
echo "mailq not empty"
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2001 12:37 PM
06-29-2001 12:37 PM
Re: Internet mail - status confirmation
# by Richard Leon
export TERM=vt100
clear
trap "echo User Aborted Command" 2
while [ "${X}" != "Q" ]
do
clear
echo ""
echo ""
echo " Welcome to Mail Surveillance & Troubleshooting Main Menu"
echo ""
echo " ********************************************************************"
echo "The rules of engagement are as follow:"
echo "PRESS 'Q' to quit this program and then type 'exit' to logout"
echo "PRESS 'Ctrl-C' to break out of a runnnig option "
echo ""
echo " ***Please look closely - These options have changed***"
echo "-------------------------------------------------------------------------"
echo ""
echo "PRESS '1': To check the mail queue"
echo ""
echo "PRESS '2': To view mail logs"
echo ""
echo "PRESS '3': To clear mail logs"
echo ""
echo "PRESS '4': To stop sendmail"
echo ""
echo "PRESS '5': To start sendmail"
echo ""
echo "PRESS '6': To grep for sendmail"
echo ""
echo "-------------------------------------------------------------------------"
echo ""
echo " make you choice: \c";read X
echo ""
##########################################
# MAIL QUEUE
if [ "${X}" -eq "1" ]; then
clear
echo "PRESS 'Ctrl-C' to break out of a runnnig option "
echo ""
mailq
echo ""
echo " Press Enter to Continue... \c"; read C
fi
#############################################
# VIew Logs
if [ "${X}" -eq "2" ]; then
cd /var/adm/syslog
clear
echo "PRESS 'Ctrl-C' to break out of a runnnig option "
echo ""
more mail.log
echo ""
echo " Press Enter to Continue... \c"; read C
fi
#############################################
# clear Logs
if [ "${X}" -eq "3" ]; then
cd /var/adm/syslog
clear
echo "PRESS 'Ctrl-C' to break out of a runnnig option "
echo ""
> mail.log
echo " Mail.log is cleared "
echo ""
echo " Press Enter to Continue... \c"; read C
fi
#############################################
# Stop Sendmail
if [ "${X}" -eq "4" ]; then
clear
echo ""
echo " Are you sure you want to stop sendmail?"
echo " Press 1 for YES or 2 for NO: \c";read Y
if [ "${Y}" -eq "1" ]; then
clear
/sbin/init.d/sendmail stop
echo ""
echo "Sendmail Has Stopped"
echo ""
fi
if [ "${Y}" -eq "2" ]; then
clear
echo ""
echo "You Decided not to Stop Sendmail"
echo ""
fi
echo " Press Enter to Continue... \c"; read C
fi
#############################################
# Start Sendmail
if [ "${X}" -eq "5" ]; then
clear
echo ""
echo " Are you sure you want to start sendmail?"
echo " Press 1 for YES or 2 for NO: \c";read Y
if [ "${Y}" -eq "1" ]; then
clear
/sbin/init.d/sendmail start
echo ""
echo "Sendmail Has Stopped"
echo ""
fi
if [ "${Y}" -eq "2" ]; then
clear
echo ""
echo "You Decided not to Start Sendmail"
echo ""
fi
echo " Press Enter to Continue... \c"; read C
fi
##############################################
# Grep Sendmail
if [ "${X}" -eq "6" ]; then
clear
echo "PRESS 'Ctrl-C' to break out of a runnnig option "
echo ""
ps -ef | grep sendmail | grep -v grep
echo ""
echo " Press Enter to Continue... \c"; read C
fi
#############################################
done
clear
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2001 12:52 PM
06-29-2001 12:52 PM
Re: Internet mail - status confirmation
______________________________
sendmail -v user@domain.com
Text you want to send
.
____________________________
The . at the end sends the email.
This will show you allot of info that is helpfull in trouble shooting where the mail is going and where it is dying.
Richard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2001 12:22 AM
07-02-2001 12:22 AM
Re: Internet mail - status confirmation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2001 02:20 AM
07-02-2001 02:20 AM
Re: Internet mail - status confirmation
Use:
mailq -Omaxqueuerunsize=1
to speed things up.
Robin.