{"id":28494909,"url":"https://github.com/tedious/dovecottesting","last_synced_at":"2025-07-01T18:32:24.753Z","repository":{"id":13110174,"uuid":"15791822","full_name":"tedious/DovecotTesting","owner":"tedious","description":"Resettable Mail Server For Continuous Integration Testing","archived":false,"fork":false,"pushed_at":"2019-11-25T20:44:03.000Z","size":1692,"stargazers_count":30,"open_issues_count":1,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-08T10:41:20.888Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.tedious.io","language":"Shell","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/tedious.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":"2014-01-10T07:57:10.000Z","updated_at":"2023-12-24T21:44:49.000Z","dependencies_parsed_at":"2022-07-12T15:08:29.330Z","dependency_job_id":null,"html_url":"https://github.com/tedious/DovecotTesting","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/tedious/DovecotTesting","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tedious%2FDovecotTesting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tedious%2FDovecotTesting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tedious%2FDovecotTesting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tedious%2FDovecotTesting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tedious","download_url":"https://codeload.github.com/tedious/DovecotTesting/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tedious%2FDovecotTesting/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263017457,"owners_count":23400506,"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-06-08T10:31:43.900Z","updated_at":"2025-07-01T18:32:24.742Z","avatar_url":"https://github.com/tedious.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dovecot Testing\n\nThis package is used to test IMAP and POP client libraries by giving them a consistent mailbox to work with. This simple\nto use library lets developers run their test suites locally using Vagrant and on Travis-CI without having to make any\nmodifications.\n\nThis package can be used for testing libraries in any language. It was originally built to support a PHP library,\n[Fetch](https://github.com/tedious/Fetch), so there is some extra support for PHP developers already built in. I encourage\neveryone to submit feature requests or, even better, pull requests to help make this package more consumable for other\nlanguages.\n\n\n## Usage\n\n### SetupEnvironment.sh\n\nThe SetupEnvironment.sh file acts as a wrapper around a number of different scripts. It identifies which of the\nsystems below it is being asked to control and then takes the appropriate steps to get the environment setup for\ntesting.\n\nThe optimal way to utilize this script is to integrate it directly into your test suite, typically as bootstrap or\npretest action. This way you can simply call your test suite as normal and will be assured of a completely consistent\nenvironment.\n\n\n### Server Settings\n\n* Username: **testuser**\n* Password: **applesauce**\n* IMAP: **143**\n* IMAPS: **993**\n* POP: **110**\n* POPS: **995**\n* Vagrant IP Address: **172.31.1.2**\n* Travis IP Address: **127.0.0.1**\n\n\n### PHP\n\nThis package is available via Composer, which makes integrating it into Travis-CI trivial.\n\nFirst add the relevant line into your composer configuration:\n\n```\n\"require-dev\": {\n      \"tedivm/dovecottesting\": \"~1\"\n  },\n```\n\nThen modify your Travis configuration:\n\n```\nbefore_script:\n    - composer install --dev\n    - vendor/tedivm/dovecottesting/SetupEnvironment.sh\n```\n\n\n### Vagrant Notes\n\nYou'll need to have [Vagrant](http://www.vagrantup.com) and [VirtualBox](https://www.virtualbox.org) installed for local\ndevelopment. Once these packages are installed the only thing left to do is call SetupEnvironment.sh as outlined above.\n\nThe first time you start the environment with Vagrant it may need to download the template box. This can add a few\nminutes to the start time of the script but will only need to happen once.\n\nIf an environment does already exist than this script will simply reset it's email back to the original status so the\ntest can be run again. This process takes just a few seconds.\n\nThe virtual machine will turn itself off 30 minutes after the last time SetupEnvironment.sh was run, which should occur\nbefore every run of your test suite. This keeps the machine running while you're testing so you can have a very quick\nturnaround, but also makes sure it isn't left running when not being used.\n\n\n### Travis CI Notes\n\nJust like with Vagrant, you simply need to run the SetupEnvironment.sh script before running your tests. Getting the\npackage onto Travis CI can be done through a package manager directly, as with the composer example above, or through\nthrough a wrapper script that pulls it directly from git.\n\n\n## Adding Additional Emails\n\nThis package works by storing a copy of a working Dovecot mail directory and then copying that directory into the test environment. Adding a new email in means sending it to the running instance of Dovecot and then updating the resources directory to make sure those changes stick between uses. This can be done a number of ways.\n\nThe preferred way is to connect a mail client to the running instance of Dovecot, and then using that to transfer the email in. Most mail clients, such as Mail.app, allow drag and drop transfer of emails between accounts. This method is simpliest because it does not require setting up an SMTP server, as it simply reuses an existing \"real\" account to create the message and then transfers it in. This was the method used to creating the initial set of emails.\n\nAnother option is to enable postfix directly on the Vagrant instance and to use that to recieve messages. This gets a little more complicated because it does require getting a mail server setup and integrated with Dovecot. \n\nA final method is to email testuser@tedivm.com with the desired message, and then to open an issue here to request it's inclusion. There is obviously a bit of turnaround here, so please attempt to add it in on your own and feel free to issue a pull request to get it included here.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftedious%2Fdovecottesting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftedious%2Fdovecottesting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftedious%2Fdovecottesting/lists"}