.mailfilter 1.4 KB

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