Connect. Communicate. Collaborate. Securely.

Home » Kerio User Forums » Kerio Connect » PHP connection to Kerio Mailserver

Messages: 3
Karma: 0
Send a private message to this user

I try to connect to Kerio Mailserver over PHP.
I want to read the INBOX with PHP. Like WebMail.

My System:

Kerio Mailserver
Firewall off

Mac OS X 10.6
execute PHP connect

When I try to connect with the function
imap_open("{***.***.***.***:110/pop3}INBOX", "*****", "******");
the function get no Error and do nothing.
When I write an echo command behind the imap_open this will not be execute.

Must I open any Ports?
Must I configurate anything in Kerio Mailserver?

Thank You

Messages: 520

Karma: 3
Send a private message to this user
Well, I would try to connect to the IMAP port and not the POP3 port... Wink

imap_open("{***.***.***.***:143}INBOX", "*****", "******");
$mbox = imap_open("{}", "username", "password");

echo "<h1>Mailboxes</h1>\n";
$folders = imap_listmailbox($mbox, "{}", "*");

if ($folders == false) {
    echo "Call failed<br />\n";
} else {
    foreach ($folders as $val) {
        echo $val . "<br />\n";

echo "<h1>Headers in INBOX</h1>\n";
$headers = imap_headers($mbox);

if ($headers == false) {
    echo "Call failed<br />\n";
} else {
    foreach ($headers as $val) {
        echo $val . "<br />\n";



Jakob Peterhänsel
Consultant - Humac A/S

Apple Certified Support Professional (ACSP)
Apple Certified Technical Coordinator (ACTC)
AppleSeed/CQF member since 1998
Kerio Messaging Partner

Messages: 3
Karma: 0
Send a private message to this user
Thank you for your answer.
The problem is the same.
After I execute this line
$mbox = imap_open("{}", "admin", "admin_22");
all behinde will not be execute.
e.g. echo "test";

I can ping the server.
I shut down the Firewall.

I think the problem is that I can not connect to imap on this server.

How can I test if the imap port is open.
Petr Dobry (Kerio)

Messages: 776
Karma: 61
Send a private message to this user
Make sure you have php-imap extensions installed. The problem you described look like you don't have it and PHP can't execute imap_open.

Petr Dobry
Product Development Manager | Kerio

Messages: 594
Karma: 33
Send a private message to this user
It's relatively simple to test IMAP manually. See details at

Tony Lawrence
Kerio Preferred Partner and Reseller
Certified for Connect, Control

Messages: 3
Karma: 0
Send a private message to this user
Im so stupid.
The imap was not installed.

Thank you
Previous Topic: Exception to SMTP size limit
Next Topic: CardDAV & iPhone
Goto Forum:

Kerio discussion forums are intended for open communication between forum members and may contain information and material posted by members which may be useful in learning about Kerio products. The discussion forums are not intended to provide technical support for any specific product. Any information implied or expressed in the discussion forums is that of the posting member. Kerio is in no way responsible for the information posted in the forums, or its accuracy. Kerio employees may participate in the discussions, but their postings do not represent an offical position of the company on any issues raised or discussed. Kerio reserves the right to monitor and maintain the forums to promote free and accurate exchange of information.

Current Time: Thu Nov 23 19:45:15 CET 2017

Total time taken to generate the page: 0.00910 seconds
.:: Contact :: Home ::.
Powered by: FUDforum 3.0.4.