{"id":15865113,"url":"https://github.com/erebe/hmailfilter","last_synced_at":"2025-09-03T07:41:51.238Z","repository":{"id":30767749,"uuid":"34324457","full_name":"erebe/hmailfilter","owner":"erebe","description":"Parse and Filter emails - Procmail enchancement","archived":false,"fork":false,"pushed_at":"2024-08-28T13:53:26.000Z","size":132,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-30T23:59:41.934Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/erebe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-04-21T12:04:54.000Z","updated_at":"2024-08-28T13:49:21.000Z","dependencies_parsed_at":"2024-08-28T15:08:49.641Z","dependency_job_id":"f14f2705-ba84-49d6-a29d-ef0577a54f96","html_url":"https://github.com/erebe/hmailfilter","commit_stats":{"total_commits":115,"total_committers":4,"mean_commits":28.75,"dds":0.4521739130434783,"last_synced_commit":"edc35896d8e827e82009dc0028bd6bd2eb1b8601"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/erebe/hmailfilter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erebe%2Fhmailfilter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erebe%2Fhmailfilter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erebe%2Fhmailfilter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erebe%2Fhmailfilter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erebe","download_url":"https://codeload.github.com/erebe/hmailfilter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erebe%2Fhmailfilter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273410262,"owners_count":25100451,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-05T23:01:50.462Z","updated_at":"2025-09-03T07:41:51.206Z","avatar_url":"https://github.com/erebe.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/erebe/hmailfilter/raw/master/log_hmailfilter.png\" alt=\"hmailfilter logo\"/\u003e\n\u003c/p\u003e\n\n## Description\n\nManaging rules with procmail is too cumbersome for me (especially if genericity is required).\n\nSo instead, this program will parse email's headers, use the associated rules, and print the destination folder for procmail to use it.\n\nYou can see rule and filter examples in app/classifier.hs.\n\nFilter examples\n```haskell\ntabulaRasa :: Match Any\ntabulaRasa = for $ anyOf [\"tabula.rasa@erebe.eu\", \"editeur.algo@erebe.eu\"]\n\nhaskellCafe :: Match Any\nhaskellCafe = mailingList $ anyOf [\"haskell-cafe\"]\n\n-- Match if ANY of those 3 matches is a hit !\nblacklist :: Match Any\nblacklist =    from (anyOf [\".Meds=\"])\n            \u003c\u003e for (anyOf [\"mediapart@\"])\n            \u003c\u003e subject (anyOf [\"pussy\", \"naked\", \"fuck\"])\n\n-- Match if ALL of those 2 matches is a hit !\nfromGod :: Match All\nfromGod =      from (anyOf [\"God\"])\n            \u003c\u003e subject (anyOf [\"It's God talking\"])\n\n\n```\nRule examples\n```haskell\nlet rules = [  --If all Filters Match  then move email to this Dir  \n            ,  [pourMoi]      -\u003e\u003e const \"./\"\n            ,  [devNull]      -\u003e\u003e const \"/dev/null\"\n            ,  [tabulaRasa]   -\u003e\u003e const \".Compte.TabulaRasa/\"\n            ,  [pourDomaine]  -\u003e\u003e \\hs -\u003e \".Compte.\" \u003c\u003e virtualUser hs \u003c\u003e \"/\"\n            ]         \n```\n\nand procmailrc example in procmailrc file\n```bash\nDEST=`hmailfilter`\n:0:\n* .\n$DEST\n```\n## What to expect\n1. Can parse a 62M header only email, without an flinch\n2. Parse header value that is encoded (Ex: =?UTF-8?B?ABB?= or =?iso-8859-1?Q?=A1Hola,_se=F1or!?=)\n\n## How to run ? \n##### To install (only once):\n1. stack init\n2. stack install\n\n##### Now to run: \n1. Edit your procmailrc and use procmail to run the mail filter\n\n## Todo \n1. Add some reader Monad instead of Hashmap -\u003e Parser HashMap\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferebe%2Fhmailfilter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferebe%2Fhmailfilter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferebe%2Fhmailfilter/lists"}