.mailfilter 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # .Mailfilter - rules for maildrop
  2. MAILDIR="/home/manu/Mail/imap"
  3. MAILDIRMAKE="/usr/bin/maildirmake"
  4. VERBOSE=9
  5. logfile "/home/manu/logs/maildrop/maildrop.log"
  6. ########### hurd lists ###############
  7. if (/^List-Id: <debian-hurd\.lists\.debian\.org>$/)
  8. to $MAILDIR/.my.ml.hurd.debian
  9. if (/^List-Id:.*<hurdfr\.hurdfr\.org>$/)
  10. to $MAILDIR/.my.ml.hurd.hurdfr
  11. ########### debian lists ###############
  12. if (/^List-Id: <debian-!.*!\.lists\.debian\.org>.*$/)
  13. {
  14. exception {
  15. `test -d $MAILDIR/.my.ml.debian.$MATCH2`
  16. if( $RETURNCODE == 1 )
  17. `$MAILDIRMAKE $MAILDIR/.my.ml.debian.$MATCH2`
  18. to $MAILDIR/.my.ml.debian.$MATCH2
  19. }
  20. }
  21. if (/^List-Id: <!.*!\.france\.debian\.net>.*$/)
  22. to $MAILDIR/.my.ml.debian.france.$MATCH2
  23. ########### asyd lists ###############
  24. if (/^List-Id:.*<!.*!\.asyd\.net>.*$/)
  25. to $MAILDIR/.my.ml.asyd.$MATCH2
  26. ########### abul lists ###############
  27. if (/^List-Id:.*<!.*!.abul.org>;*$/)
  28. to $MAILDIR/.my.ml.abul.$MATCH2
  29. ########### WeeChat lists ###############
  30. if (/^List-Id:.*weechat-!.*!.nongnu.org.*$/)
  31. to $MAILDIR/.my.soft.weechat.ml.$MATCH2
  32. ########### Logs Stuff ###############
  33. if (/^From:.*logcheck@/ || /^Subject:.*rkhunter/)
  34. to $MAILDIR/.sys.reports
  35. ########### Tiac Info ###############
  36. if (/^Subject:.*[tT][iI][aA][cC].*[iI][nN][fF][oO]/)
  37. {
  38. to $MAILDIR/.friends.tbs.tiacfooting
  39. }
  40. ########### Spam ###############
  41. xfilter "spamc"
  42. if (/^X-Spam-Status: YES/)
  43. {
  44. to $MAILDIR/.Spam
  45. }
  46. if (!/^From:.*/)
  47. to $MAILDIR/.Spam
  48. ########### INBOX ###############
  49. to $MAILDIR/