[root@yz shell]# cat  pingsmtpexmail.sh 
#!/bin/bash  
echo "" >>/etc/zabbix/shell/pingsmtpexmail.log
echo "" >>/etc/zabbix/shell/pingsmtpexmail.log
echo "===========================================================================" >>/etc/zabbix/shell/pingsmtpexmail.log
date '+%Y-%m-%d %H:%M:%S' >>/etc/zabbix/shell/pingsmtpexmail.log 
ping -c 3 -W 3 $1  &>>/etc/zabbix/shell/smtpexmailping.log
if [ $? -eq 0 ]  
then  
echo 1  
else
echo 2  
fi
[root@yz shell]# cat ../zabbix_agentd.d/
cert_check.conf           ping.conf                 pingsmtpexmail.conf       tcp_status.conf           userparameter_mysql.conf  
[root@yz shell]# cat ../zabbix_agentd.d/pingsmtpexmail.conf 
UserParameter=smtpexmail[*], bash /etc/zabbix/shell/pingsmtpexmail.sh  $1
[root@yz shell]#