PHPackages                             tedivm/dovecottesting - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. tedivm/dovecottesting

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

tedivm/dovecottesting
=====================

An IMAP Testing Suite

v1.2.3(12y ago)312.4k7MIT

Since Jan 20Compare

[ Source](https://github.com/tedious/DovecotTesting)[ Packagist](https://packagist.org/packages/tedivm/dovecottesting)[ Docs](http://github.com/tedivm/DovecotTesting)[ RSS](/packages/tedivm-dovecottesting/feed)WikiDiscussions Synced 4w ago

READMEChangelog (6)DependenciesVersions (7)Used By (7)

Dovecot Testing
===============

[](#dovecot-testing)

This package is used to test IMAP and POP client libraries by giving them a consistent mailbox to work with. This simple to use library lets developers run their test suites locally using Vagrant and on Travis-CI without having to make any modifications.

This package can be used for testing libraries in any language. It was originally built to support a PHP library, [Fetch](https://github.com/tedious/Fetch), so there is some extra support for PHP developers already built in. I encourage everyone to submit feature requests or, even better, pull requests to help make this package more consumable for other languages.

Usage
-----

[](#usage)

### SetupEnvironment.sh

[](#setupenvironmentsh)

The SetupEnvironment.sh file acts as a wrapper around a number of different scripts. It identifies which of the systems below it is being asked to control and then takes the appropriate steps to get the environment setup for testing.

The optimal way to utilize this script is to integrate it directly into your test suite, typically as bootstrap or pretest action. This way you can simply call your test suite as normal and will be assured of a completely consistent environment.

### Server Settings

[](#server-settings)

- Username: **testuser**
- Password: **applesauce**
- IMAP: **143**
- IMAPS: **993**
- POP: **110**
- POPS: **995**
- Vagrant IP Address: **172.31.1.2**
- Travis IP Address: **127.0.0.1**

### PHP

[](#php)

This package is available via Composer, which makes integrating it into Travis-CI trivial.

First add the relevant line into your composer configuration:

```
"require-dev": {
      "tedivm/dovecottesting": "~1"
  },

```

Then modify your Travis configuration:

```
before_script:
    - composer install --dev
    - vendor/tedivm/dovecottesting/SetupEnvironment.sh

```

### Vagrant Notes

[](#vagrant-notes)

You'll need to have [Vagrant](http://www.vagrantup.com) and [VirtualBox](https://www.virtualbox.org) installed for local development. Once these packages are installed the only thing left to do is call SetupEnvironment.sh as outlined above.

The first time you start the environment with Vagrant it may need to download the template box. This can add a few minutes to the start time of the script but will only need to happen once.

If an environment does already exist than this script will simply reset it's email back to the original status so the test can be run again. This process takes just a few seconds.

The virtual machine will turn itself off 30 minutes after the last time SetupEnvironment.sh was run, which should occur before every run of your test suite. This keeps the machine running while you're testing so you can have a very quick turnaround, but also makes sure it isn't left running when not being used.

### Travis CI Notes

[](#travis-ci-notes)

Just like with Vagrant, you simply need to run the SetupEnvironment.sh script before running your tests. Getting the package onto Travis CI can be done through a package manager directly, as with the composer example above, or through through a wrapper script that pulls it directly from git.

Adding Additional Emails
------------------------

[](#adding-additional-emails)

This 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.

The 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.

Another 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.

A final method is to email  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.

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 79.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~23 days

Recently: every ~29 days

Total

6

Last Release

4470d ago

Major Versions

v0.0.1 → v1.0.02014-01-20

### Community

Maintainers

![](https://www.gravatar.com/avatar/4073e6f375aee032560ba55fb85743cb5f49a1e46b88cf4360f745239e5ec9e6?d=identicon)[tedivm](/maintainers/tedivm)

---

Top Contributors

[![tedivm](https://avatars.githubusercontent.com/u/121709?v=4)](https://github.com/tedivm "tedivm (27 commits)")[![mbdevpl](https://avatars.githubusercontent.com/u/1270332?v=4)](https://github.com/mbdevpl "mbdevpl (6 commits)")[![bjornpost](https://avatars.githubusercontent.com/u/48628?v=4)](https://github.com/bjornpost "bjornpost (1 commits)")

---

Tags

emailimappop3

### Embed Badge

![Health badge](/badges/tedivm-dovecottesting/health.svg)

```
[![Health](https://phpackages.com/badges/tedivm-dovecottesting/health.svg)](https://phpackages.com/packages/tedivm-dovecottesting)
```

###  Alternatives

[php-imap/php-imap

Manage mailboxes, filter/get/delete emails in PHP (supports IMAP/POP3/NNTP)

1.7k13.6M55](/packages/php-imap-php-imap)[tedivm/fetch

A PHP IMAP Library

5171.2M8](/packages/tedivm-fetch)[ddeboer/imap

Object-oriented IMAP for PHP

9194.1M17](/packages/ddeboer-imap)[webklex/php-imap

PHP IMAP client

4527.3M40](/packages/webklex-php-imap)[benhall14/php-imap-reader

A PHP class that makes working with IMAP in PHP simple.

3520.5k](/packages/benhall14-php-imap-reader)[henrique-borba/php-sieve-manager

A modern (started in 2022) PHP library for the ManageSieve protocol (RFC5804) to create/edit Sieve scripts (RFC5228). Used by Cypht Webmail.

27146.8k5](/packages/henrique-borba-php-sieve-manager)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
