Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.41
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
src /
php-7.4.33 /
ext /
standard /
tests /
mail /
Delete
Unzip
Name
Size
Permission
Date
Action
bug51604.phpt
743
B
-rw-rw-r--
2022-10-31 11:36
bug54298.phpt
483
B
-rw-rw-r--
2022-10-31 11:36
bug66535.phpt
1.02
KB
-rw-rw-r--
2022-10-31 11:36
bug69115.phpt
436
B
-rw-rw-r--
2022-10-31 11:36
bug69874.phpt
979
B
-rw-rw-r--
2022-10-31 11:36
bug69874_2.phpt
1.01
KB
-rw-rw-r--
2022-10-31 11:36
bug72964.phpt
2.05
KB
-rw-rw-r--
2022-10-31 11:36
bug73203.phpt
661
B
-rw-rw-r--
2022-10-31 11:36
bug80706.phpt
2.17
KB
-rw-rw-r--
2022-10-31 11:36
bug80751.phpt
3.07
KB
-rw-rw-r--
2022-10-31 11:36
ezmlm_hash_basic.phpt
611
B
-rw-rw-r--
2022-10-31 11:36
mail_basic.phpt
1.35
KB
-rw-rw-r--
2022-10-31 11:36
mail_basic2.phpt
1.17
KB
-rw-rw-r--
2022-10-31 11:36
mail_basic3.phpt
768
B
-rw-rw-r--
2022-10-31 11:36
mail_basic4.phpt
769
B
-rw-rw-r--
2022-10-31 11:36
mail_basic5.phpt
767
B
-rw-rw-r--
2022-10-31 11:36
mail_basic6.phpt
9.47
KB
-rw-rw-r--
2022-10-31 11:36
mail_basic7.phpt
5.76
KB
-rw-rw-r--
2022-10-31 11:36
mail_basic_alt1-win32.phpt
2.3
KB
-rw-rw-r--
2022-10-31 11:36
mail_basic_alt2-win32.phpt
2.25
KB
-rw-rw-r--
2022-10-31 11:36
mail_basic_alt3-win32.phpt
2.25
KB
-rw-rw-r--
2022-10-31 11:36
mail_basic_alt4-win32.phpt
2.32
KB
-rw-rw-r--
2022-10-31 11:36
mail_include.inc
4.12
KB
-rw-rw-r--
2022-10-31 11:36
mail_log.phpt
941
B
-rw-rw-r--
2022-10-31 11:36
mail_skipif.inc
1.04
KB
-rw-rw-r--
2022-10-31 11:36
mail_variation1.phpt
737
B
-rw-rw-r--
2022-10-31 11:36
mail_variation2.phpt
1
KB
-rw-rw-r--
2022-10-31 11:36
mail_variation_alt1-win32.phpt
2.4
KB
-rw-rw-r--
2022-10-31 11:36
mail_variation_alt2-win32.phpt
2.4
KB
-rw-rw-r--
2022-10-31 11:36
mail_variation_alt3-win32.phpt
2.25
KB
-rw-rw-r--
2022-10-31 11:36
Save
Rename
<?php // Change these to make tests run successfully $server = '{localhost}'; $default_mailbox = $server . "INBOX"; $domain = "example.com"; $admin_user = "webmaster"; // a user with admin access $username = "$admin_user@$domain"; $password = 'p4ssw0rd'; $users = array("webmaster", "info", "admin", "foo"); // tests require 4 valid userids $mailbox_prefix = "phpttest"; // name used for test mailbox /** * Create a test mailbox and populate with msgs * * @para, string mailbox_suffix Suffix used to uniquely identify mailboxes * @param int message_count number of test msgs to be written to new mailbox * * @return IMAP stream to new mailbox on success; FALSE on failure */ function setup_test_mailbox($mailbox_suffix, $message_count, &$new_mailbox = null, $msg_type = "simple"){ global $server, $default_mailbox, $username, $password; // open a stream to default mailbox $imap_stream = imap_open($default_mailbox, $username, $password); if ($imap_stream === false) { echo "Cannot connect to IMAP server $server: " . imap_last_error() . "\n"; return false; } echo "Create a temporary mailbox and add " . $message_count . " msgs\n"; $new_mailbox = create_mailbox($imap_stream, $mailbox_suffix, $message_count, $msg_type); if ($new_mailbox === false) { echo "Cant create a temporary mailbox: " . imap_last_error(). "\n"; return false; } echo ".. mailbox '$new_mailbox' created\n"; // reopen stream to new mailbox if (imap_reopen($imap_stream, $new_mailbox) === false) { echo "cant re-open '$new_mailbox' mailbox: " . imap_last_error() . "\n"; return false; } return $imap_stream; } /** * Create mailbox and fill with generic emails * * @param resource $imap_stream * @param string $mailbox */ function create_mailbox($imap_stream, $mailbox_suffix, $message_count, $msg_type= "simple"){ global $default_mailbox, $mailbox_prefix; $mailbox = $default_mailbox . "." . $mailbox_prefix . $mailbox_suffix; $mailboxes = imap_getmailboxes($imap_stream, $mailbox, '*'); // check mailbox does not already exist if ($mailboxes) { foreach($mailboxes as $value) { if ($value->name == $mailbox) { exit ("TEST FAILED : Mailbox '$mailbox' already exists\n"); } } } if (imap_createmailbox($imap_stream, $mailbox) === false) { return false; } // Add number of test msgs requested if ($message_count > 0) { populate_mailbox($imap_stream, $mailbox, $message_count, $msg_type); } return $mailbox; } /** * Populate a mailbox with generic emails * * @param resource $imap_stream * @param string $mailbox */ function populate_mailbox($imap_stream, $mailbox, $message_count, $msg_type = "simple"){ global $users, $domain; for($i = 1; $i <= $message_count; $i++) { if ($msg_type == "simple") { $msg = "From: foo@anywhere.com\r\n" . "To: $users[0]@$domain\r\n" . "Subject: test$i\r\n" . "\r\n" . "$i: this is a test message, please ignore\r\n"; } else { $envelope["from"]= "foo@anywhere.com"; $envelope["to"] = "$users[0]@$domain"; $envelope["subject"] = "Test msg $i"; $part1["type"] = TYPEMULTIPART; $part1["subtype"] = "mixed"; $part2["type"] = TYPETEXT; $part2["subtype"] = "plain"; $part2["description"] = "imap_mail_compose() function"; $part2["contents.data"] = "message 1:xxxxxxxxxxxxxxxxxxxxxxxxxx"; $part3["type"] = TYPETEXT; $part3["subtype"] = "plain"; $part3["description"] = "Example"; $part3["contents.data"] = "message 2:yyyyyyyyyyyyyyyyyyyyyyyyyy"; $part4["type"] = TYPETEXT; $part4["subtype"] = "plain"; $part4["description"] = "Return Values"; $part4["contents.data"] = "message 3:zzzzzzzzzzzzzzzzzzzzzzzzzz"; $body[1] = $part1; $body[2] = $part2; $body[3] = $part3; $body[4] = $part4; $msg = imap_mail_compose($envelope, $body); } imap_append($imap_stream, $mailbox, $msg); } } /** * Get the mailbox name from a mailbox description, i.e strip off server details. * * @param string mailbox complete mailbox name * @return mailbox name */ function get_mailbox_name($mailbox){ if (preg_match('/\{.*?\}(.*)/', $mailbox, $match) != 1) { echo "Unrecpognized mailbox name\n"; return false; } return $match[1]; } ?>