I am writing a script to check whether all the servers in my organization are functioning properly. One of those is Zimbra mail server. I am trying to send a mail through sendmail provided by zimbra package using the following command
ssh Jarvice@someip echo "Hello" | /opt/zimbra/postfix-22.214.171.124z/sbin/sendmail email@example.com
But I am unable to do so. I think I am making some mistake in the
echo "Hello" | /opt/zimbra/postfix-126.96.36.199z/sbin/sendmail firstname.lastname@example.org
part. But I don't know what it is. Can someone tell me the correct way to do so? Since I am doing this through a script, I have made sure that I can
ssh without providing the password. I wish to fully automate the process.