.mailfilter 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. ### Galette Lists
  29. if (/^List-Id:.*<galette-!.*!\.gna\.org>.*$/)
  30. to $MAILDIR/.my.soft.galette.$MATCH2
  31. ### Abul Lists
  32. if (/^List-Id:.*<!.*!\.abul\.org>.*$/)
  33. to $MAILDIR/.my.ml.abul.$MATCH2
  34. ### WeeChat Lists
  35. if (/^List-Id:.*weechat-!.*!\.nongnu\.org.*$/ || /^To:.*weechat-!.*!\.nongnu.org\.*$/)
  36. to $MAILDIR/.my.soft.weechat.ml.$MATCH2
  37. ### Sympa Stuff
  38. if (/^From:.*SYMPA/)
  39. {
  40. to $MAILDIR/.sys.sympa
  41. }
  42. ### Logs Stuff
  43. if (/^From:.*logcheck@/ || /^Subject:.*rkhunter/)
  44. to $MAILDIR/.sys.reports
  45. ### Tiac Info
  46. if (/^Subject:.*[tT][iI][aA][cC].*[iI][nN][fF][oO]/)
  47. {
  48. to $MAILDIR/.friends.tbs.tiacfooting
  49. }
  50. ### Spam
  51. xfilter "spamc"
  52. if (/^X-Spam-Status: YES/)
  53. {
  54. to $MAILDIR/.Spam
  55. }
  56. if (!/^From:.*/)
  57. to $MAILDIR/.Spam
  58. ########### INBOX ###############
  59. to $MAILDIR/