diff --git a/zmldapsync/zmldapsync.pl b/zmldapsync/zmldapsync.pl index 3c2bf3a..b081162 100644 --- a/zmldapsync/zmldapsync.pl +++ b/zmldapsync/zmldapsync.pl @@ -770,7 +770,7 @@ sub handle_error { body_str => "LDAP synchronisation for domain $domain failed at step '$step'. The error was\n$err\n", ); my $transport = Email::Sender::Transport::Sendmail->new({ - sendmail => '/opt/zimbra/common/sbin/sendmail' + sendmail => ( -x '/opt/zimbra/common/sbin/sendmail' ) ? '/opt/zimbra/common/sbin/sendmail' : '/usr/sbin/sendmail' }); sendmail( $mail, { transport => $transport } ); }