Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: How to tell if a server has Sendmail?

by jeffa (Bishop)
on Sep 02, 2003 at 15:41 UTC ( [id://288341]=note: print w/replies, xml ) Need Help??


in reply to How to tell if a server has Sendmail?

-d asks if a file is a directory. Don't you mean -e instead?
[jeffa@localhost]$ perl -le'print "yes" if -d "/usr/sbin/sendmail"' [jeffa@localhost]$ perl -le'print "yes" if -e "/usr/sbin/sendmail"' yes
Also, consider using MIME::Lite, it's really nice. :) From the docs:
Change how messages are sent ### Do something like this in your 'main': if ($I_DONT_HAVE_SENDMAIL) { MIME::Lite->send('smtp', "smtp.myisp.net", Timeout=>60); } ### Now this will do the right thing: $msg->send; ### will now use Net::SMTP as shown above

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)

Replies are listed 'Best First'.
Re: Re: How to tell if a server has Sendmail?
by asarih (Hermit) on Sep 02, 2003 at 15:44 UTC
    I'd think -x is a better test in this case.

    Also note that on Solaris sendmail is /usr/lib/sendmail. (If portability is a question. Other platforms may very well have it in other places.)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://288341]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (1)
As of 2024-04-24 23:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found