SMSADDR="$EXT@$HOST" SMS="alen@kss.si" SMSFILE="mail.sms" VPOP="| /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox" if ( "$SMSADDR" eq "$SMS" ) { to "$SMSFILE" `echo test >> /tmp/test.txt` exit } else { to "$VPOP" exit } // for anyone that needs solution to it... just change to with cc... and it will execute command after.