Subject: | [PATCH] Email::Send::Sendmail added default paths |
It seems wise to add two additinal paths, /usr/sbin and /usr/lib to
search of user paths when trying to find sendmail binary.
On most Linux systems (Debian comes to mind) users don't necessary have
/usr/sbin or /usr/lib (for older sendmail installations) in their PATH.
Why should they? On the other hand, it's not nice when Email::Send can't
find it.
Subject: | Email-Send-Sendmail+default_paths.diff |
--- /home/dpavlin/.cpanplus/5.8.8/build/Email-Send-2.183/lib/Email/Send/Sendmail.pm 2006-08-14 18:34:50.000000000 +0200
+++ Sendmail.pm 2007-01-21 19:51:37.000000000 +0100
@@ -23,7 +23,7 @@
return $SENDMAIL if defined $SENDMAIL;
my $sendmail;
- for my $dir (File::Spec->path) {
+ for my $dir ( File::Spec->path, '/usr/sbin', '/usr/lib' ) {
if ( -x "$dir/sendmail" ) {
$sendmail = "$dir/sendmail";
last;