summaryrefslogtreecommitdiff
path: root/travis
diff options
context:
space:
mode:
Diffstat (limited to 'travis')
-rwxr-xr-xtravis/compile.sh9
-rw-r--r--travis/ext/imap/dovecot.conf22
-rw-r--r--travis/ext/imap/dovecotpass1
-rw-r--r--travis/ext/imap/imap.exp29
-rw-r--r--travis/ext/imap/setup.sh11
5 files changed, 70 insertions, 2 deletions
diff --git a/travis/compile.sh b/travis/compile.sh
index 3a381a8885..77ff49ab15 100755
--- a/travis/compile.sh
+++ b/travis/compile.sh
@@ -13,6 +13,7 @@ fi
./configure --quiet \
$DEBUG \
$TS \
+--enable-phpdbg \
--enable-fpm \
--with-pdo-mysql=mysqlnd \
--with-mysql=mysqlnd \
@@ -49,13 +50,17 @@ $TS \
--with-openssl \
--with-gmp \
--enable-bcmath \
---enable-phpdbg \
--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 -j2 --quiet
sudo make install
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