Creating additional plugins for nagios

Team would like to know if anyone here had created a basic nagios plugin.
I did write a simple postfix service checker. Then add it in nagios nrpe.cfg then restart nrpe and nagios and it is not working, its like i cant receive email if the service is stopped or running.

#!/bin/bash
post=`service postfix status|awk '{print $5}'|tr -d .`
case $post in
running )
echo "the post fix is running"
exit 0
;;
*)
echo "Please check the postfix service"
exit 1
;;
esac