before_install:
- sudo apt-get update -qq
- - sudo apt-get install -y libenchant-dev libaspell-dev libpspell-dev librecode-dev
+ - sudo apt-get install -y libenchant-dev libaspell-dev libpspell-dev librecode-dev libsasl2-dev libxpm-dev libt1-dev libc-client2007e-dev
- sudo cp ./travis/de /var/lib/locales/supported.d/de
- sudo dpkg-reconfigure locales
- ./travis/install.sh
- . ./travis/ext/pdo_mysql/setup.sh
- . ./travis/ext/pgsql/setup.sh
- . ./travis/ext/pdo_pgsql/setup.sh
+ - . ./travis/ext/imap/setup.sh
# Run PHPs run-tests.php
script:
imap_stream = mail_open(NIL, mailbox->val, flags);
if (imap_stream == NIL) {
- php_error_docref(NULL, E_WARNING, "Couldn't open stream %s", mailbox);
+ php_error_docref(NULL, E_WARNING, "Couldn't open stream %s", mailbox->val);
efree(IMAPG(imap_user)); IMAPG(imap_user) = 0;
efree(IMAPG(imap_password)); IMAPG(imap_password) = 0;
RETURN_FALSE;
}
}
+ zend_string_free(regex);
ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, "imap", le_imap);
INIT (&st, mail_string, (void *) message->val, message->len);
int argc = ZEND_NUM_ARGS();
SEARCHPGM *pgm = NIL;
- if (zend_parse_parameters(argc, "rs|lS", &streamind, &criteria, &flags, &charset) == FAILURE) {
+ if (zend_parse_parameters(argc, "rS|lS", &streamind, &criteria, &flags, &charset) == FAILURE) {
return;
}
--TEST--
-imap_fetchstructure() function : basic functionality
+imap_fetchstructure() function : basic functionality
--CREDITS--
Olivier Doucet
--SKIPIF--
var_dump($z->encoding);
var_dump($z->bytes);
var_dump($z->lines);
-var_dump(is_object($z->parameters));
+var_dump($z->ifparameters);
+var_dump(is_object($z->parameters[0]));
imap_close($stream_id);
?>
--CLEAN--
-<?php
+<?php
require_once('clean.inc');
?>
--EXPECTF--
int(%d)
int(%d)
int(%d)
-bool(true)
\ No newline at end of file
+int(1)
+bool(true)
<?php
// Change these to make tests run successfully
-$server = '{localhost/norsh}';
+$server = '{127.0.0.1/norsh}';
$default_mailbox = $server . "INBOX";
$domain = "something.com";
$admin_user = "webmaster"; // a user with admin access
--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
--- /dev/null
+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
--- /dev/null
+webmaster@something.com:{plain}p4ssw0rd
--- /dev/null
+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
+
--- /dev/null
+#!/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