{"id":19124154,"url":"https://github.com/efforg/cryptobot-email","last_synced_at":"2026-02-21T10:02:36.538Z","repository":{"id":137107239,"uuid":"12334567","full_name":"EFForg/cryptobot-email","owner":"EFForg","description":null,"archived":false,"fork":false,"pushed_at":"2014-05-22T00:40:00.000Z","size":4116,"stargazers_count":62,"open_issues_count":16,"forks_count":11,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-04-19T11:09:17.241Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EFForg.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}},"created_at":"2013-08-23T23:08:56.000Z","updated_at":"2024-11-13T20:38:46.000Z","dependencies_parsed_at":"2023-03-12T13:25:54.376Z","dependency_job_id":null,"html_url":"https://github.com/EFForg/cryptobot-email","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EFForg%2Fcryptobot-email","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EFForg%2Fcryptobot-email/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EFForg%2Fcryptobot-email/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EFForg%2Fcryptobot-email/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EFForg","download_url":"https://codeload.github.com/EFForg/cryptobot-email/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252561041,"owners_count":21768063,"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-09T05:28:17.175Z","updated_at":"2025-10-18T16:39:56.342Z","avatar_url":"https://github.com/EFForg.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![CryptoBot](/doc/images/cryptobot-large.png)\n\nCryptoBot Email is an email bot that helps people learn how to use OpenPGP. You send CryptoBot a PGP-encrypted and signed email (probably using GnuPG) and it responds telling you how you do, and offering advice.\n\n## Getting Started\n\nStart by copying `config_template.py` into `config.py` and editing it.\n\n    $ cp config_template.py config.py\n\nSet all of these settings:\n\n- `PGP_NAME`: The name part of the user ID for for the bot's OpenPGP keypair\n- `PGP_EMAIL`: The email part of the user ID for for the bot's OpenPGP keypair. This should be the email address that users are expected to email.\n- `GPG_HOMEDIR`: The directory in which the bot's keyring will be stored (it will be created by the bot if it does not exist). This should be in a location that is writeable by the bot.\n- `USE_MAILDIR`: You can either use a Maildir or IMAP; set to False to use IMAP\n- `MAILDIR`: If you're using a Maildir, this is the path to it\n- `IMAP_SERVER`: The IMAP server to connect to, e.g. `imap.gmail.com`\n- `IMAP_USERNAME`: The IMAP username\n- `IMAP_PASSWORD`: The IMAP password\n- `SMTP_SERVER`: The SMTP server to connect to, e.g. `smtp.gmail.com`\n- `SMTP_USERNAME`: The SMTP username\n- `SMTP_PASSWORD`: The SMTP password\n- `DATABASE_URL`: URL for the unsubscribe database\n\n\nThis is a Python project with some external dependencies. We recommend using\nvirtualenv:\n\n    $ virtualenv env\n    $ . env/bin/activate\n    (env) $ pip install -r requirements.txt\n    (env) $ ./bot.py\n    # when you're done\n    (env) $ deactivate\n\n\n## Unsubscribes\n\nTo avoid exploitation as an automated spam cannon, cryptobot can optionally\nmaintain a database of unsubscribers. It requires one additional setup step.\nAfter installing requirements, uncomment the DATABASE_URL in config.py, and\nrun\n\n```\n./unsubscribe.py --setup\n```\n\nThis will create the necessary database tables and generate a random salt for\nhashing email addresses. Once that's done, you can add emails to the database\nby running\n\n```\n./unsubscribe.py --add foo@example.com\n\n```\n\nAlternatively you can run the included Flask app to serve a simple unsubscribe\nform for people to unsubscribe themselves.\n\n```\n./app.py    # http://localhost:5000/unsubscribe\n```\n\nFor simplicity, you can use an sqlite database, which is created as a normal\nfile in the directory of your choosing, and does not incur any extra\ndependencies. However, for better concurrency handling, you may want to install\nand use postgresql, which will require the psycopg2 python module along with\nsome additional system configuration:\n\n```\nsudo apt-get install postgresql\nsudo -u postgres createuser -P -s -e cryptobot\ncreatedb cryptobot -O cryptobot\nsudo apt-get install postgresql-server-dev-9.1\n. env/bin/activate\npip install psycopg\ndeactivate\n```\n\n\n## Dev Notes\n\nOn linux systems: if you get an error while trying to install requirements.txt, like \"fatal error: Python.h: No such file or directory\"\n    $ sudo apt-get install python-dev\n\nTo run the tests:\n\n    $ ./test.py\n\nBy default, the tests skip key generation, which can be slow and use up\nentropy. To include these tests, run:\n\n    $ ./test.py --slow\n\nRelevant specs:\n\n* [RFC 4880 - OpenPGP Message Format](http://tools.ietf.org/html/rfc4880)\n* [RFC 2045 - Multipurpose Internet Mail Extensions (MIME)](http://tools.ietf.org/html/rfc2045)\n* [RFC 3156 - MIME Security with OpenPGP](http://tools.ietf.org/html/rfc3156)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fefforg%2Fcryptobot-email","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fefforg%2Fcryptobot-email","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fefforg%2Fcryptobot-email/lists"}