[plug] checking for existence of an application

James Devenish devenish at guild.uwa.edu.au
Fri Aug 8 18:23:49 WST 2003


In message <sf33f01f.048 at mmtnetworks.com.au>
on Fri, Aug 08, 2003 at 06:46:51PM +0800, Jon  Miller wrote:
> Is there a way to check for the existence of the mail program in use.
> I'm looking for a method that can state which mail program is active
> in a script.

Two ideas occur to me immediately:

 - /usr/lib/sendmail is usually a symlink to the sendmail emulator
   provided by the installed MTA.

 - OpenBSD has /etc/mailer.conf for these kinds of issues and perhaps
   Linux distros have an equivalent file.

> Unfortunately using 'which postfix' or 'which sendmail'  would be of
> much use since both may be still installed on the server.

Aside: I think there's a "not" missing from the above sentence :)




More information about the plug mailing list