{"id":18885436,"url":"https://github.com/dagit/autoproc","last_synced_at":"2025-04-14T21:30:57.323Z","repository":{"id":62435588,"uuid":"65589469","full_name":"dagit/autoproc","owner":"dagit","description":"Autoproc is a utility/language for email filtering.  Autoproc makes it easy to define filtering rules.  The rules define a Haskell program, that when executed generates a valid Procmail recipes file.  This file can then be used with Procmail to sort and filter your email before you see it.","archived":false,"fork":false,"pushed_at":"2016-08-13T00:01:10.000Z","size":98,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T09:51:31.469Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dagit.png","metadata":{"files":{"readme":"README","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}},"created_at":"2016-08-12T23:37:11.000Z","updated_at":"2019-12-05T06:34:52.000Z","dependencies_parsed_at":"2022-11-01T21:16:52.239Z","dependency_job_id":null,"html_url":"https://github.com/dagit/autoproc","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dagit%2Fautoproc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dagit%2Fautoproc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dagit%2Fautoproc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dagit%2Fautoproc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dagit","download_url":"https://codeload.github.com/dagit/autoproc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248961236,"owners_count":21189993,"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","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-11-08T07:18:45.261Z","updated_at":"2025-04-14T21:30:57.048Z","avatar_url":"https://github.com/dagit.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Autoproc =\n\nAutoproc is a utility/language for email filtering.  Autoproc makes it\neasy to define filtering rules.  The rules define a Haskell program,\nthat when executed generates a valid Procmail recipes file.  This file\ncan then be used with Procmail to sort and filter your email before\nyou see it.\n\nYou will need to have GHC or Hugs, Procmail and formail installed.\n\n== Installation ==\n\nTo get a copy of Autoproc, use\n\n  darcs get http://code.haskell.org/autoproc\n\nIf you don't have darcs do not despair, currently Autoproc is about 5\nfiles and can be easily downloaded by pointing your web browser at the\naddress just given.\n\nYou can also visit Hackage, where you should be able to find a tarball of autoproc (or eventually you could install Autoproc through cabal-install).\n\n== Customizing Autoproc ==\n\nAutoproc runs on the XMonad model. If you aren't familiar with XMonad, the idea is that the package is constructed such that it provides a library, and then it compiles a thin executable using that library.\n\nThis is fine if the baked in configuration exactly suits your needs, but how do you have a system-wide XMonad which you can configure in a full Haskell style without some sort of Emacs-style interpreter? Well, the thin executable is tasked with looking for a xmonad.hs in a fixed location; if it exists, it gets compiled and the *new* binary gets run. And your personal xmonad.hs can do anything it wants - as all of XMonad's functionality is exposed as a library your xmonad.hs can import and modify at will. So your xmonad.hs boils down to 'main = xmonad $ myCrazyFunkyArgs'.\n\nIn Autoproc's case, what you do is create ~/.autoproc/autoproc.hs, and then set things up. (If you don't, Autoproc will use its compiled in configuration, which is surely not what you want.)\n\nWhile I was testing this Xmonad-style configuration, I created an autoproc.hs that looks like this:\n\n\u003e import Autoproc.Configuration (defaultVariables)\n\u003e import Autoproc.Run\n\u003e import Autoproc.Rules.Dagit\n\n\u003e main ∷ IO ()\n\u003e main =  do print \"foo bar\"\n\u003e            autoprocMain defaultVariables dagitRules\n\n('defaultVariables' provides the key-values of environmental variables, and 'dagitRules' is all the Procmail filtering rules.)\n\nNow, this is the same environmental variables and configuration rules used by default, but there's nothing stopping me from taking defaultVariables and replacing it with\n\n\u003e myVariables = [(\"SHELL\", \"/bin/zsh\")]\n\nAnd I can run arbitrary stuff before and after the rules and variables are compiled down to text - my output will start with \"foo bar\", as useless a customization as that is...\n\n== Running Autoproc ==\n\nTo run the autoproc binary and save your rules to the file recipes use the\nfollowing command:\n\n  $ autoproc \u003e recipes\n\nIf you are familiar with Procmail you may want to examine the file to\nsee that everything was generated correctly.  Once you are confident\nthat you would like to use this file, you can simply move it to\n$HOME/.procmailrc Depending on your system you may need to do\nadditional configuration to get Procmail itself running.  Usually this\nis done with a .forward file, or on some systems having a .procmailrc\nis enough.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdagit%2Fautoproc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdagit%2Fautoproc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdagit%2Fautoproc/lists"}