- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: mail check
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
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
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
тАО05-17-2007 04:11 AM
тАО05-17-2007 04:11 AM
Now that I can see that the sendmail service is active, Is there a true test I can issue and build it into my script? That is, does anyone out there truely check to see if it is functioning?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-17-2007 04:20 AM
тАО05-17-2007 04:20 AM
Re: mail check
I'm attaching some toys for this purpose that may be of help.
Inline is a script that actually sends a mail.
They were joint projects, I'm not a great scripter either.
#!/bin/sh
sub2(){
echo helo example.com
echo mail from:mailtester@example.com
echo rcpt to:${1}@${2}
echo data
echo subject:$USL end to end mail check
echo shmuel protter mail test
echo .
echo quit
}
WT=3
PRGN=$(basename $0)
case $1 in
1) USL="usbm.example.com ilbm.example.com ukbm.example.com"
DML="example.com"
USR=enterpris
;;
2) USL="usmail1.ndsamericas.com usmail2.example.com"
DML="example.com ndsexample.com"
USR=jfredmugs
;;
*) echo "Usage: $PRGN {1|2} ; 1 - test gates; 2 - test usmail"
exit
;;
esac
for D in $DML ; do
for S in $USL ; do
sub2 $USR $D |
while read A; do
echo $A
sleep $WT
done | telnet $S 25 2>&1 | grep -e $USR -e $S | grep -v ^22|grep -v Connect
done
done
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
тАО05-17-2007 04:23 AM
тАО05-17-2007 04:23 AM
Re: mail check
sendmail -bt -d0.1 < /dev/null
You could
telnet server 25
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-17-2007 04:25 AM
тАО05-17-2007 04:25 AM
Re: mail check
Telnet closed. Gov't system.
Using a general user ID with minimal permissions to do the test. Possible?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-17-2007 04:32 AM
тАО05-17-2007 04:32 AM
Re: mail check
echo quit | telnet svr001 25
Trying...
Connected to svr001.mydomain.net.
Escape character is '^]'.
220 svr001.mydomain.net ESMTP Sendmail @(#)Sendmail version 8.13.3 - Revision 1.000 - 1st August,2006/8.13.3; Thu, 17 May 2007 10:31:06 -0600 (MDT)
221 2.0.0 svr001.mydomain.net closing connection
Connection closed by foreign host.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-17-2007 04:34 AM
тАО05-17-2007 04:34 AM
Solutiontelnet localhost 25
or
telnet remote_hostname 25
and then issue a "quit".
Probably the easiest way to do this is via Perl's Net::Telnet module.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-17-2007 04:54 AM
тАО05-17-2007 04:54 AM
Re: mail check
telnet hostname 25
Does not use telnet server. It used the telnet client which is almost certainly available to test smtp which is open or we would not be having this discussion.
ssh can be manipulated with the -p command to do this test but is hardly worth it.
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
тАО05-17-2007 07:42 PM
тАО05-17-2007 07:42 PM
Re: mail check
%echo quit|telnet 0 25 2>&1|grep Sendmail
220 hpbbnn1.bbn.hp.com ESMTP Sendmail 8.9.3 (PHNE_31917)/8.9.3; Fri, 18 May 2007 09:40:38 +0200 (METDST)
This run fine on my HP-UX11i.
Rgds,
Art