[plug] checking for existence of an application
James Devenish
devenish at guild.uwa.edu.au
Fri Aug 8 18:53:33 WST 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