.mailfilter 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. ### Debian Lists
  7. if (/^List-Id: <debian-!.*!\.lists\.debian\.org>.*$/)
  8. {
  9. exception {
  10. `test -d $MAILDIR/.my.ml.debian.$MATCH2`
  11. if( $RETURNCODE == 1 )
  12. `$MAILDIRMAKE $MAILDIR/.my.ml.debian.$MATCH2`
  13. to $MAILDIR/.my.ml.debian.$MATCH2
  14. }
  15. }
  16. ### Debian France Lists
  17. if (/^List-Id: <!.*!\.france\.debian\.net>.*$/)
  18. to $MAILDIR/.my.ml.debian.france.$MATCH2
  19. ### Hurd France Lists
  20. if (/^List-Id:.*<hurdfr\.hurdfr\.org>$/)
  21. to $MAILDIR/.my.ml.hurd.hurdfr
  22. ### Asyd Lists
  23. if (/^List-Id:.*mailman\.asyd\.net>.*$/)
  24. to $MAILDIR/
  25. if (/^List-Id:.*<!.*!\.asyd\.net>.*$/)
  26. to $MAILDIR/.my.ml.asyd.$MATCH2
  27. ### Abul Lists
  28. if (/^List-Id:.*<!.*!.abul.org>;*$/)
  29. to $MAILDIR/.my.ml.abul.$MATCH2
  30. ### WeeChat Lists
  31. if (/^List-Id:.*weechat-!.*!.nongnu.org.*$/ || /^To:.*weechat-!.*!.nongnu.org.*$/)
  32. to $MAILDIR/.my.soft.weechat.ml.$MATCH2
  33. ### Logs Stuff
  34. if (/^From:.*logcheck@/ || /^Subject:.*rkhunter/)
  35. to $MAILDIR/.sys.reports
  36. ### Tiac Info
  37. if (/^Subject:.*[tT][iI][aA][cC].*[iI][nN][fF][oO]/)
  38. {
  39. to $MAILDIR/.friends.tbs.tiacfooting
  40. }
  41. ### Spam
  42. xfilter "spamc"
  43. if (/^X-Spam-Status: YES/)
  44. {
  45. to $MAILDIR/.Spam
  46. }
  47. if (!/^From:.*/)
  48. to $MAILDIR/.Spam
  49. ########### INBOX ###############
  50. to $MAILDIR/