.mailfilter 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. # .Mailfilter - rules for maildrop
  2. MAILDIR="/home/manu/Mail/imap"
  3. VERBOSE=9
  4. logfile "/home/manu/logs/maildrop/maildrop.log"
  5. ########### debian lists ###############
  6. if (/^List-Id: <debian-user-french.lists.debian.org>$/)
  7. to $MAILDIR/.my.ml.debian.user-french
  8. if (/^List-Id: <debian-devel-french.lists.debian.org>$/)
  9. to $MAILDIR/.my.ml.debian.devel-french
  10. if (/^List-Id: <debian-devel.lists.debian.org>$/)
  11. to $MAILDIR/.my.ml.debian.devel
  12. if (/^List-Id: <debian-security-announce.lists.debian.org>$/ || /^To:.*debian-security@lists.debian.org.*$/ || /^Cc:.*debian-security@lists.debian.org.*$/)
  13. to $MAILDIR/.my.ml.debian.security
  14. if (/^Cc:.*asso@france.debian.net.*$/ || /^To:.*asso@france.debian.net.*$/)
  15. to $MAILDIR/.my.ml.debian.france.asso
  16. if (/^Cc:.*sl@france.debian.net.*$/ || /^To:.*sl@france.debian.net.*$/)
  17. to $MAILDIR/.my.ml.debian.france.sl
  18. if (/^List-Id: <debian-devel-announce.lists.debian.org>$/)
  19. to $MAILDIR/.my.ml.debian.devel-announce
  20. if (/^List-Id: <debian-mentors.lists.debian.org>$/)
  21. to $MAILDIR/.my.ml.debian.mentors
  22. if (/^List-Id: <debian-announce.lists.debian.org>$/)
  23. to $MAILDIR/.my.ml.debian.announce
  24. if (/^List-Id: <debian-devel-changes.lists.debian.org>$/)
  25. to $MAILDIR/.my.ml.debian.devel-changes
  26. ########### hurd lists ###############
  27. if (/^List-Id: <debian-hurd.lists.debian.org>$/)
  28. to $MAILDIR/.my.ml.hurd.debian
  29. if (/^List-Id:.*<hurdfr.hurdfr.org>$/)
  30. to $MAILDIR/.my.ml.hurd.hurdfr
  31. if (/^List-Id:.*<l4-hurd.gnu.org>$/)
  32. to $MAILDIR/.my.ml.hurd.l4
  33. ########### asyd lists ###############
  34. if (/^List-Id:.*<sysadmin.asyd.net>.*$/)
  35. to $MAILDIR/.my.ml.asyd.sysadmin
  36. if (/^List-Id:.*<shell.asyd.net>.*$/)
  37. to $MAILDIR/.my.ml.asyd.shell
  38. if (/^List-Id:.*<emacs.asyd.net>.*$/)
  39. to $MAILDIR/.my.ml.asyd.emacs
  40. ########### abul lists ###############
  41. if (/^List-Id: <asso.abul.org>$/ || /^To:.*asso@abul.org.*$/ || /^Cc:.*asso@abul.org.*$/)
  42. to $MAILDIR/.my.ml.abul.asso
  43. if (/^List-Id: <tech.abul.org>$/ || /^To:.*tech@abul.org.*$/ || /^Cc:.*tech@abul.org.*$/)
  44. to $MAILDIR/.my.ml.abul.tech
  45. if (/^List-Id: <devel.abul.org>$/ || /^To:.*devel@abul.org.*$/ || /^Cc:.*devel@abul.org.*$/)
  46. to $MAILDIR/.my.ml.abul.devel
  47. if (/^List-Id: <debutants.abul.org>$/ || /^To:.*debutants@abul.org.*$/ || /^Cc:.*debutants@abul.org.*$/)
  48. to $MAILDIR/.my.ml.abul.debutants
  49. if (/^List-Id: <party.abul.org>$/ || /^To:.*party@abul.org.*$/ || /^Cc:.*party@abul.org.*$/)
  50. to $MAILDIR/.my.ml.abul.party
  51. if (/^List-Id: <annonces.abul.org>$/ || /^To:.*annonces@abul.org.*$/ || /^Cc:.*annonces@abul.org.*$/)
  52. to $MAILDIR/.my.ml.abul.annonces
  53. if (/^List-Id: <blahblah.abul.org>$/ || /^To:.*blahblah@abul.org.*$/ || /^Cc:.*blahblah@abul.org.*$/)
  54. to $MAILDIR/.my.ml.abul.blahblah
  55. ########### lna lists ###############
  56. if (/^X-Original-To: linuxaction@tux.linux-nantes.fr.eu.org$/ || /^To:.*linuxaction@linux-nantes.org.*$/ || /^Cc:.*linuxaction@linux-nantes.org.*$/)
  57. to $MAILDIR/.my.ml.lna.action
  58. ########### gulliver lists ###############
  59. if (/^List-Id:.*gulliver@listes.linux-france.org.*$/ || /^List-Id:.*gulliver.listes.linux-france.org.*$/)
  60. to $MAILDIR/.my.ml.gulliver.gulliver
  61. ########### WeeChat lists ###############
  62. if (/^List-Id: weechat-cvs.nongnu.org$/)
  63. to $MAILDIR/.my.soft.weechat.ml.cvs
  64. if (/^List-Id: weechat-dev.nongnu.org$/ || /^To:.*weechat-dev@nongnu.org/)
  65. to $MAILDIR/.my.soft.weechat.ml.devel
  66. ########### Kde Devel ###############
  67. if (/^From:.*kde.org$/)
  68. to $MAILDIR/.my.soft.kde
  69. ########### Misc Stuff ###############
  70. if (/^From:.*logcheck@/ || /^Subject:.*rkhunter/)
  71. to $MAILDIR/.sys.reports
  72. ########### Tiac Info ###############
  73. if (/^Subject:.*[tT][iI][aA][cC].*[iI][nN][fF][oO]/)
  74. {
  75. to $MAILDIR/.friends.tbs.tiacfooting
  76. }
  77. ########## PUB :-( ####################
  78. if (/^From:.*laredoute@fr.redoute.com/)
  79. {
  80. to $MAILDIR/.Trash
  81. }
  82. ########### Spam ###############
  83. #xfilter "bogofilter -u -e -p"
  84. #if (/^X-Bogosity:.*Spam/ && !/^X-Bogosity:.*Ham/ && !/^X-Bogosity:.*Unsure/)
  85. #{
  86. # to $MAILDIR/.Spam
  87. #}
  88. xfilter "spamc"
  89. if (/^X-Spam-Status: YES/)
  90. {
  91. to $MAILDIR/.Spam
  92. }
  93. if (!/^From:.*/)
  94. {
  95. to $MAILDIR/.Spam
  96. }
  97. to $MAILDIR/