# BSM ALLAH #!/bin/bash em="$1" chk=`egrep -w $em /etc/postfix/sender_blacklist| egrep -v "^#"|wc -l` if [ "$chk" -gt "0" ] then echo "Email : $em is blocked & willnt added to block" sed -i "s|$em|#$em|" /etc/postfix/sender_blacklist && postmap /etc/postfix/sender_blacklist && systemctl restart postfix dovecot else echo "Email : $em is not blacked & now added to block" postmap /etc/postfix/sender_blacklist && systemctl restart postfix dovecot fi