From 04aa8349769e322c6b64f8a7a2157918c6c09b68 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 20 Nov 2019 15:46:44 +0100 Subject: [PATCH] Fallback to system's sendmail if the one from Zimbra isn't installed This will be the case if you run mailboxd and mta on different servers --- zmldapsync/zmldapsync.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 } ); }