.mailfilter 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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. ## Listes RMLL 2008
  8. if (/^To:.*organisation@rmll2008.org.*$/ || /^Cc:.*organisation@rmll2008.org.*$/ || /^X-BeenThere:.*2008@rmll.info.*$/)
  9. to $MAILDIR/.my.ml.rmll.2008
  10. #if (/^List-Id:.*![^ <]+!\.rmll\.info.*$/)
  11. # to $MAILDIR/.my.ml.rmll.$MATCH2
  12. if (/^List-Id:.*2008\.rmll\.info.*$/)
  13. to $MAILDIR/.my.ml.rmll.2008
  14. if (/^List-Id:.*org\.rmll\.info.*$/)
  15. to $MAILDIR/.my.ml.rmll.org
  16. if (/^List-Id:.*themes\.rmll\.info.*$/)
  17. to $MAILDIR/.my.ml.rmll.themes
  18. if (/^List-Id:.*communication\.rmll\.info.*$/)
  19. to $MAILDIR/.my.ml.rmll.communication
  20. if (/^List-Id:.*partenaires\.rmll\.info.*$/)
  21. to $MAILDIR/.my.ml.rmll.partenaires
  22. ## Debian backports
  23. if (/^List-Id:.*<backports-users\.lists\.backports\.org>$/)
  24. to $MAILDIR/.my.ml.debian.backports
  25. ### Debian Lists
  26. if (/^List-Id: <debian-!.*!\.lists\.debian\.org>.*$/)
  27. {
  28. exception {
  29. `test -d $MAILDIR/.my.ml.debian.$MATCH2`
  30. if( $RETURNCODE == 1 )
  31. `$MAILDIRMAKE $MAILDIR/.my.ml.debian.$MATCH2`
  32. to $MAILDIR/.my.ml.debian.$MATCH2
  33. }
  34. }
  35. ### Debian France Lists
  36. if (/^List-Id: <!.*!\.france\.debian\.net>.*$/)
  37. to $MAILDIR/.my.ml.debian.france.$MATCH2
  38. ### Debian Alioth Projects
  39. if (/^List-Id: .*<pkg-phototools-devel\.lists\.alioth\.debian\.org>.*$/)
  40. to $MAILDIR/.my.soft.debian.pkg.phototools
  41. ### Hurd France Lists
  42. if (/^List-Id:.*<hurdfr\.hurdfr\.org>$/)
  43. to $MAILDIR/.my.ml.hurd.hurdfr
  44. ### Asyd Lists
  45. if (/^List-Id:.*mailman\.asyd\.net>.*$/)
  46. to $MAILDIR/
  47. if (/^List-Id:.*<!.*!\.asyd\.net>.*$/)
  48. to $MAILDIR/.my.ml.asyd.$MATCH2
  49. ### Galette Lists
  50. if (/^List-Id:.*<galette-!.*!\.gna\.org>.*$/)
  51. to $MAILDIR/.my.soft.galette.$MATCH2
  52. ### Abul Lists
  53. if (/^List-Id:.*<!.*!\.abul\.org>.*$/)
  54. {
  55. exception {
  56. `test -d $MAILDIR/.my.ml.abul.$MATCH2`
  57. if( $RETURNCODE == 1 )
  58. `$MAILDIRMAKE $MAILDIR/.my.ml.abul.$MATCH2`
  59. to $MAILDIR/.my.ml.abul.$MATCH2
  60. }
  61. }
  62. ### WeeChat Lists
  63. if (/^List-Id:.*weechat-!.*!\.nongnu\.org.*$/ || /^To:.*weechat-!.*!\.nongnu.org\.*$/)
  64. to $MAILDIR/.my.soft.weechat.ml.$MATCH2
  65. ### Sympa Stuff
  66. if (/^From:.*SYMPA/)
  67. {
  68. to $MAILDIR/.sys.sympa
  69. }
  70. ### Logs Stuff
  71. if (/^From:.*logcheck@/ || /^Subject:.*rkhunter/)
  72. to $MAILDIR/.sys.reports
  73. ### Tiac Info
  74. if (/^Subject:.*[tT][iI][aA][cC].*[iI][nN][fF][oO]/)
  75. {
  76. to $MAILDIR/.friends.tbs.tiacfooting
  77. }
  78. ### Spam
  79. xfilter "spamc"
  80. if (/^X-Spam-Status: YES/)
  81. {
  82. to $MAILDIR/.Spam
  83. }
  84. #if (!/^From:.*/ || /^Subject:.*[??SPAM??].*/)
  85. # to $MAILDIR/.Spam
  86. ########### INBOX ###############
  87. to $MAILDIR/