diff options
author | Stanislav Malyshev <stas@php.net> | 2015-01-25 01:21:53 -0800 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2015-01-28 10:15:11 -0800 |
commit | 14d6de97c5f54ec66dbb6b18ebe9cd0d279e4784 (patch) | |
tree | 561eea8ac7b15138bad5c2bfd93c724c03fea955 /travis | |
parent | b7751630d1c50821146fc5732d05ede05ffdee5f (diff) | |
download | php-git-14d6de97c5f54ec66dbb6b18ebe9cd0d279e4784.tar.gz |
add imap
Diffstat (limited to 'travis')
-rwxr-xr-x | travis/compile.sh | 7 | ||||
-rw-r--r-- | travis/ext/imap/dovecot.conf | 22 | ||||
-rw-r--r-- | travis/ext/imap/dovecotpass | 1 | ||||
-rw-r--r-- | travis/ext/imap/imap.exp | 29 | ||||
-rw-r--r-- | travis/ext/imap/setup.sh | 11 |
5 files changed, 69 insertions, 1 deletions
diff --git a/travis/compile.sh b/travis/compile.sh index 9add843a2e..2a78beeea5 100755 --- a/travis/compile.sh +++ b/travis/compile.sh @@ -53,8 +53,13 @@ $TS \ --enable-calendar \ --enable-ftp \ --with-pspell=/usr \ ---with-recode=/usr \ --with-enchant=/usr \ --enable-wddx \ +--with-imap \ +--with-imap-ssl \ +--with-freetype-dir=/usr \ +--with-t1lib=/usr \ +--with-xpm-dir=/usr \ +--with-kerberos \ --enable-sysvmsg make --quiet diff --git a/travis/ext/imap/dovecot.conf b/travis/ext/imap/dovecot.conf new file mode 100644 index 0000000000..c321cb0099 --- /dev/null +++ b/travis/ext/imap/dovecot.conf @@ -0,0 +1,22 @@ +auth_debug = yes +auth_mechanisms = login +auth_verbose = yes +disable_plaintext_auth = no +auth_mechanisms = plain login cram-md5 +listen = * +mail_location = maildir:/home/vmail/mail/%d/%n/Maildir +mbox_write_locks = fcntl +passdb { + args = /etc/dovecot/dovecotpass + driver = passwd-file +} +protocols = imap +service auth { + user = root +} +ssl = no +userdb { + args = uid=11459 gid=10002 home=/home/vmail/dovecot/mail/%d/%n + driver = static +} +log_path = /var/log/dovecot.log diff --git a/travis/ext/imap/dovecotpass b/travis/ext/imap/dovecotpass new file mode 100644 index 0000000000..f68e6c3cae --- /dev/null +++ b/travis/ext/imap/dovecotpass @@ -0,0 +1 @@ +webmaster@something.com:{plain}p4ssw0rd diff --git a/travis/ext/imap/imap.exp b/travis/ext/imap/imap.exp new file mode 100644 index 0000000000..de254bbd8f --- /dev/null +++ b/travis/ext/imap/imap.exp @@ -0,0 +1,29 @@ +send_user "IMAP test start..." +spawn telnet 127.0.0.1 143 + +expect "Dovecot ready" { + send_user "OK: $expect_out(0,string)\n" +} "refused" { + send_user "connect to POP refused\n" + exit 1 +} timeout { + send_user "connect to POP timeout\n" + exit 1 +} + +send "a1 LOGIN webmaster@something.com p4ssw0rd\n" + +expect "a1 OK" { + send_user "OK, imap works\n" +} "a1 NO*" { + send_user "auth failed: $expect_out(buffer)\n" + exit 1 +} "error*" { + send_user "ERROR: $expect_out(buffer)\n" +} timeout { + send_user "connect to POP timeout\n" + exit 1 +} + +exit 0 + diff --git a/travis/ext/imap/setup.sh b/travis/ext/imap/setup.sh new file mode 100644 index 0000000000..228fee037b --- /dev/null +++ b/travis/ext/imap/setup.sh @@ -0,0 +1,11 @@ +#!/bin/sh +sudo groupadd -g 10002 vmail +sudo useradd -g 10002 -u 11459 vmail +sudo apt-get -y install expect dovecot-imapd +sudo cp ./travis/ext/imap/dovecot.conf ./travis/ext/imap/dovecotpass /etc/dovecot +sudo mkdir -p /home/vmail/mail/something.com +sudo chown -R vmail:vmail /home/vmail/mail +sudo chmod -R u+w /home/vmail/mail +sudo service dovecot stop +sudo service dovecot start +expect ./travis/ext/imap/imap.exp |