xref: /PHP-8.0/ext/imap/tests/README.md (revision 5aaffc80)
1# The imap extension tests
2
3Many of the tests in this directory require a mail server to be running, if
4there is no mail server the test will skip and warn, see skipif.inc for details.
5
6To make the tests run parameters in the `skipif.inc` and `imap_include.inc`
7files will need to be changed to match the local mailserver configuration.
8
9The tests have been checked using dovecot (on Linux 32 and 64 bit systems) and
10hMailServer on Windows. The tests are intended to be mailserver agnostic.
11
12## Set-up tests on Ubuntu (checked on Ubuntu 18.04 (Bionic))
13The necessary packages can be installed using the following command;
14`apt-get install libc-client-dev libkrb5-dev dovecot-core dovecot-pop3d dovecot-imapd sendmail`
15
16The build of PHP will need to be compiled with the following flags:
17```
18--with-imap --with-kerberos --with-imap-ssl
19```
20
21Then run the set-up script `ext/imap/tests/setup/setup.sh` which will add the `vmail`
22group and user which is used by Dovecot for the mailbox. It will also copy the
23`ext/imap/tests/setup/dovecot.conf` and `ext/imap/tests/setup/dovecotpass` to the correct
24location for Dovecot and restarts it for the new configuration to be enabled.
25