.mailfilter 1.7 KB

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