Advertisement
RedFoxy

bash per lo spam

Apr 2nd, 2019
699
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.49 KB | None | 0 0
  1. #!/bin/bash
  2. MAIL_ROOT="/var/vmail";
  3. MAIL_SPAM=${MAIL_ROOT}"/*/spam/{cur,new}/*";
  4. MAIL_NOSPAM=${MAIL_ROOT}"/*/no-spam/{cur,new}/*";
  5.  
  6. SA_LEARN=`which sa-learn`;
  7.  
  8.  
  9. TEMP_SPAM=/tmp/spamlearn_
  10.  
  11. echo "variabili caricate:"
  12. echo MAIL_ROOT: $MAIL_ROOT
  13. echo MAIL_SPAM: $MAIL_SPAM
  14. echo TEMP_SPAM: $TEMP_SPAM
  15.  
  16. grep -siLF X-Spam-Flag ${MAIL_SPAM} > ${TEMP_SPAM}_account_specifico.tmp
  17. echo "grep fatto"
  18.  
  19. ls -la ${TEMP_SPAM}_account_specifico.tmp
  20. tail ${TEMP_SPAM}_account_specifico.tmp
  21. echo "fine"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement