#!/usr/bin/perl                                                                                       
use strict;
use warnings;

my $proc = `ps aux | grep pmt` ;
print $proc ;
if ($proc =~ m/pmtad/) {}
else {print "CRITICAL - PMTA DOWN"; exit(2) ;}
if ($proc =~ m/pmtahttpd/) {print "OK - PMTA is running"; exit(0) ;}
else {print "CRITICAL - PMTA DOWN"; exit(2) ;}
