1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 01:02:25 +01:00
Files
archived-php-src/ext/imap/tests
Christoph M. Becker d2bb59cc66 Test standard mail and imap on Windows CI
We setup the currently latest version of hMailServer[1] as mail server,
and configure according to imap_include.inc.  To not require further
configuration, we adapt mail_skipif.inc and mail_include.inc to match
that configuration.  However, we also change the default domain to the
reserved `example.com`.

We also update the standard mail tests to use the `--EXTENSIONS--`
section (instead of skipping the tests if ext/imap is not available).

Finally, we fix bug80751.phpt to expect the configured To and Cc mail
addresses.

[1] <https://www.hmailserver.com/>

Closes GH-8357.
2022-05-12 14:58:22 +02:00
..
2021-07-08 16:48:16 +02:00

The imap extension tests

Many of the tests in this directory require a mail server to be running, if there is no mail server the test will skip and warn, see skipif.inc for details.

To make the tests run parameters in the skipif.inc and imap_include.inc files will need to be changed to match the local mailserver configuration.

The tests have been checked using dovecot (on Linux 32 and 64 bit systems) and hMailServer on Windows. The tests are intended to be mailserver agnostic.

Set-up tests on Ubuntu (checked on Ubuntu 18.04 (Bionic))

The necessary packages can be installed using the following command; apt-get install libc-client-dev libkrb5-dev dovecot-core dovecot-pop3d dovecot-imapd sendmail

The build of PHP will need to be compiled with the following flags:

--with-imap --with-kerberos --with-imap-ssl

Then run the set-up script ext/imap/tests/setup/setup.sh which will add the vmail group and user which is used by Dovecot for the mailbox. It will also copy the ext/imap/tests/setup/dovecot.conf and ext/imap/tests/setup/dovecotpass to the correct location for Dovecot and restarts it for the new configuration to be enabled.