[plug] checking for existence of an application

Jon Miller jlmiller at mmtnetworks.com.au
Fri Aug 8 20:14:33 WST 2003


I only require the name of the MTA, from there I can issue the commands I need.  Basically, I only need to start and stop the mail server.  I'm installing a virus scanner and this requires auto-updating of the signature files every 4 hours, once updated, the MTA and the virus scanner has to be restarted for the update to take effect.  Hope this helps, also the signatures files has to be copied from a Linux gateway to a SCO file and print server and that too has to have the scanner stopped and started in order for the updates to take place.  This then pushes the updates to the desktop users.
Since the client wants all this to take place with no user intervention, and they do not know which mail server they are running, I wanted to create this script to be generic enough to be used on other servers running whatever flavor of a MTA.

Hope this helps

Thanks

Jon L. Miller, MCNE, CNS
Director/Sr Systems Consultant
MMT Networks Pty Ltd
http://www.mmtnetworks.com.au

"I don't know the key to success, but the key to failure
 is trying to please everybody." -Bill Cosby



>>> devenish at guild.uwa.edu.au 6:53:33 PM 8/08/2003 >>>
So, can we clarify:

 You have a script that will run on host A and host A has an SMTP
 MTA operational. You want to know the product name of that MTA.

If that is so, then (as you say) you have a problem if multiple MTAs are
installed. However, only one of them will be listening on port 25 (as
Matt pointed out). Since the administrator of a host may choose to have
any of the installed MTAs operational, you might need to actually use a
tool (in the vein of `lsof`) to examine what process is listening on the
server's public TCP port 25. Or do you want to check its private IP?  Or
localhost? Do you need to check all of the above? If you are fortunate,
the MTA will be listening on "*:25" (i.e. all TCP interfaces). Once you
know the process number, you can get the process name. Then, you could
look up the process name in a table of well-known MTAs and map that to a
product name. If you want to know version numbers, etc, then you
probably need to start looking at files on the disk.







More information about the plug mailing list