Guest User

Untitled

a guest
Jul 18th, 2018
3,965
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.65 KB | None | 0 0
  1. # Constants
  2. $path = "%h/Mail"
  3.  
  4. # Used for processing mail from Postfix. Here's how we tell Postfix to invoke
  5. # this from main.cf:
  6. #
  7. # mailbox_command = /usr/local/bin/fdm -l -m -astdin fetch
  8. #
  9. account "stdin" disabled stdin
  10.  
  11. # These accounts are used if fdm is told to fetch but no account is specified
  12. # using the '-a' switch. Usernames and passwords from from the .netrc in my
  13. # home directory. I use a cron job to pull this stuff down that runs every
  14. # quarter-hour:
  15. #
  16. # 1/15 * * * * nice -n 19 /usr/local/bin/fdm -l fetch
  17. #
  18. account "eircom.net" pop3 server "mail.eircom.net" no-apop
  19. account "gmail" pop3s server "pop.gmail.com" port 995
  20.  
  21. # Two boilerplate actions for keeping and dropping mail.
  22. action "keep" keep
  23. action "drop" drop
  24.  
  25. # Mail folders.
  26. action "inbox" maildir "${path}/inbox"
  27. action "junk" mbox "${path}/junk"
  28. action "sundry" maildir "${path}/sundry"
  29. action "reference" maildir "${path}/reference"
  30. action "lists" maildir "${path}/lists"
  31.  
  32. # Housekeeping: this account, action and ruleset are used to archive mail in
  33. # the three given maildirs at the start of every month. Here's the cron job
  34. # spec that does the work:
  35. #
  36. # 0 0 1 * * nice -n 19 /usr/local/bin/fdm -l -aarchive fetch
  37. #
  38. account "archive" disabled maildirs {
  39. "${path}/inbox"
  40. "${path}/sundry"
  41. "${path}/lists"
  42. }
  43. action "archive" mbox "${path}/archive/%[maildir]-%y-%m" compress
  44. match account "archive" and age > 90 days action "archive"
  45. match account "archive" action "keep"
  46.  
  47. # This removes junk headers. 'Experimental' headers in the wild tend to be just
  48. # noise and clutter, so I kill them off. You'd be surprised by the amount of
  49. # space this saves!
  50. action "crap" remove-headers { "X-*" }
  51. match all action "crap" continue
  52.  
  53. # List filtering
  54. match "^Precedence:[ \t](bulk|list)" in headers
  55. or "^Sender:.*metacl-bounces@conlang.org" in headers
  56. or "^Sender:.*kragen-tol-bounces@canonical.org" in headers
  57. or "^(Sender|Reply-To|Mailing-list):.*(langsmiths|celticonlang|concatenative|conculture|rest-discuss|testdrivendevelopment)@yahoogroups.com" in headers
  58. or "^(Sender|Reply-To|Mailing-list):.*(gevent|listyland|ossdev-ireland|python-ireland)@googlegroups.com" in headers
  59. or "^(Sender|Reply-To):.*CONLANG@listserv.brown.edu" in headers
  60. or "^(Sender|Reply-To):.*ilug-bounces@linux.ie" in headers
  61. or "^(Sender|Reply-To):.*ilug@linux.ie" in headers
  62. or "^(Sender|Reply-To):.*open@webnet.ie" in headers
  63. or "^Sender:.*phpug-bounces@lists.iephpug.org" in headers
  64. or "^Sender:.*pycrypto-bounces@lists.dlitz.net" in headers
  65. or "^Reply-To:.*pycrypto@lists.dlitz.net" in headers
  66. or "^Sender:.*ubuntu-ie-bounces@lists.ubuntu.com" in headers
  67. action "lists"
  68.  
  69. match all action "inbox"
Add Comment
Please, Sign In to add comment