{"id":29586661,"url":"https://github.com/basecamp/rspamd-ruby","last_synced_at":"2025-07-20T03:31:17.914Z","repository":{"id":182289969,"uuid":"235457731","full_name":"basecamp/rspamd-ruby","owner":"basecamp","description":"Ruby client for Rspamd’s HTTP API","archived":false,"fork":false,"pushed_at":"2023-08-24T02:50:05.000Z","size":37,"stargazers_count":33,"open_issues_count":1,"forks_count":1,"subscribers_count":24,"default_branch":"master","last_synced_at":"2025-07-18T05:34:51.010Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/basecamp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-01-21T22:56:00.000Z","updated_at":"2025-05-31T03:11:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"af192195-47e0-488c-8351-c3455b3155cf","html_url":"https://github.com/basecamp/rspamd-ruby","commit_stats":null,"previous_names":["basecamp/rspamd-ruby"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/basecamp/rspamd-ruby","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basecamp%2Frspamd-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basecamp%2Frspamd-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basecamp%2Frspamd-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basecamp%2Frspamd-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/basecamp","download_url":"https://codeload.github.com/basecamp/rspamd-ruby/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basecamp%2Frspamd-ruby/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266063100,"owners_count":23870717,"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":"2025-07-20T03:31:00.278Z","updated_at":"2025-07-20T03:31:17.908Z","avatar_url":"https://github.com/basecamp.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# rspamd-ruby\n\n![CI](https://github.com/basecamp/rspamd-ruby/actions/workflows/ci.yml/badge.svg)\n[![Gem Version](https://img.shields.io/gem/v/rspamd-ruby.svg)](https://rubygems.org/gems/rspamd-ruby)\n\nRuby client for [Rspamd’s HTTP API](https://rspamd.com/doc/architecture/protocol.html)\n\n## Get started\n\nTo install the latest version using [Bundler][bundler]:\n\n```ruby\ngem \"rspamd-ruby\"\n```\n\nTo manually install `rspamd-ruby` via [Rubygems][rubygems] simply gem install:\n\n```bash\ngem install rspamd-ruby\n```\n\nIf you're not using [Bundler][bundler], you'll need to add `require \"rspamd-ruby\"` to your Ruby file.\n\n## Usage\n\nInitialize a client with the host and port of an Rspamd controller process:\n\n```ruby\nclient = Rspamd::Client.new(host: \"localhost\", port: 11334)\n```\n\nCheck a message:\n\n```ruby\nresult = client.check(\u003c\u003c~MIME)\n  Date: Tue, 21 Jan 2020 21:04:42 +0000\n  From: Alice \u003calice@example.com\u003e\n  To: Bob \u003cbob@example.com\u003e\n  Message-ID: \u003c975bad33-2e76-40c3-89aa-7fe1edcbe7ce@example.com\u003e\n  Subject: Hello\n  Mime-Version: 1.0\n  Content-Type: text/plain; charset=UTF-8\n  Content-Transfer-Encoding: quoted-printable\n  Delivered-To: bob@example.com\n\n  Hi Bob!\n\n  -Alice\nMIME\n\nresult.spam? # =\u003e false\nresult.ham? # =\u003e true\n\nresult.score # =\u003e 1.2\nresult.required_score # =\u003e 15\nresult.action # =\u003e \"no action\"\n```\n\nReport a message as spam:\n\n```ruby\nclient.spam!(\u003c\u003c~MIME)\n  Date: Tue, 21 Jan 2020 21:04:42 +0000\n  From: Spammer \u003cspammer@example.com\u003e\n  To: Bob \u003cbob@example.com\u003e\n  Message-ID: \u003c975bad33-2e76-40c3-89aa-7fe1edcbe7ce@example.com\u003e\n  Subject: Hello\n  Mime-Version: 1.0\n  Content-Type: text/plain; charset=UTF-8\n  Content-Transfer-Encoding: quoted-printable\n  Delivered-To: bob@example.com\n\n  Buy some stuff?\nMIME\n```\n\nReport a message as ham:\n\n```ruby\nclient.ham!(\u003c\u003c~MIME)\n  Date: Tue, 21 Jan 2020 21:04:42 +0000\n  From: Alice \u003calice@example.com\u003e\n  To: Bob \u003cbob@example.com\u003e\n  Message-ID: \u003c975bad33-2e76-40c3-89aa-7fe1edcbe7ce@example.com\u003e\n  Subject: Hello\n  Mime-Version: 1.0\n  Content-Type: text/plain; charset=UTF-8\n  Content-Transfer-Encoding: quoted-printable\n  Delivered-To: bob@example.com\n\n  Hi Bob!\n\n  -Alice\nMIME\n```\n\n## Acknowledgments\n\nrspamd-ruby is [MIT-licensed](MIT-LICENSE) open-source software from [37signals](https://37signals.com/), the creators of [Ruby on Rails](https://rubyonrails.org).\n\n---\n\n© 2023 37signals, LLC.\n\n[bundler]: https://bundler.io\n[rubygems]: https://rubygems.org\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasecamp%2Frspamd-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasecamp%2Frspamd-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasecamp%2Frspamd-ruby/lists"}