Advertisment

Free Push Email for Windows Mobile

author-image
PCQ Bureau
New Update

What is “Push E-mail”? You may have heard about this term frequently along

with Blackberry or Microsoft Exchange. To put it simply, Push E-mail can be

explained in analogy to SMS (Short Text Message) — the text message that you

send using your mobile phones.

Advertisment

Whenever you send a SMS to someone, the recipient receives it instantly.

Similarly, when someone sends you a SMS you receive it within seconds (if we

assume a healthy cellular network). Compare this with the traditional E-mail,

the non-push email.

You receive an E-mail when you click on the send/receive button in your

E-mail client software (Outlook, Thunderbird, Pocket Outlook in Windows Mobile).

This kind of retrieval of E-mail is called Pull.

But if an E-mail can also come as instantly as a SMS or without you hitting

the receive button, that's what is a push E-mail.

Advertisment

How come you are able to receive a SMS instantly? Because your phone is

always connected to the cellular network.

Very similarly, in case of Push E-mail, the E-mail client is always connected

to the E-mail server.

Direct Hit!

Applies To:

IT Managers, mobile professionals



Price: Free


USP:
Provide Push E-mail capability to

your mobile users for free



Primary Link:
z-push.sourceforge.net



Keyword: Z-Push
Advertisment

The E-mail server notifies or sends the new E-mail(s) to the already

connected E-mail client, whenever the former receives one.

This is true in case of Blackberry services or MS Exchange or whichever

service/server/product that offers push e-mail.

Therefore one of the benefit of push E-mail is the same as that of SMS — that

is, timely notification without your intervention. Another benefit is reduced

battery consumption over POPing mails every minute (say).

Advertisment

Is it that, to reap the benefits of push E-mail you need to have an Exchange

or Blackberry service ? The answer is 'no'. There are alternatives.

One of them is Z-Push which is a free and open source solution to set up push

mail with your existing E-mail server.

Z-Push works specifically with mobile phones/PDAs which support ActiveSync.

ActiveSync is the de-facto application for Windows based mobile phones to

retrieve E-mails, contacts, calendar, etc.

Advertisment

On one end, Z-Push emulates an Exchange server. That is, the mobile phone or

the ActiveSync application sees it as an Exchange server.

On the other end, Z-Push can connect to a “backend” to retrieve the data

(i.e. E-mails in our case) and push it to the mobile.

For E-mails, Z-Push can connect to any E-mail server (the backend) which

supports IMAP. It can be any mail server running on Windows or Linux.

Advertisment

In this article we will setup Z-Push on a RedHat based distribution like

PCQLinux 2008 (www.pcqlinux.org), CentOS (www.centos.org) or Fedora (http://fedoraproject.org/).

The prerequisites



We will first setup Z-Push on a Linux server (say services.abc.com). To run

Z-Push on Linux you will need to install Apache web server and PHP web scripting

engine. On a PCQLinux, RedHat or Fedora distribution this can be done via

issuing the following:

yum install httpd



yum install php

Advertisment

Since Z-Push will pick up mail from an IMAP server, you would also need to

install the IMAP module for PHP, which can be done as follows:

yum install php-imap

After installation, you can start the web server as:

service httpd restart

For a mobile device to connect to this server, you will need to assign a

public IP for the server. That is make the server accessible through the

Internet. If your mobile device has WiFi capabilities, then you can still have a

private IP for the server and test the setup within your LAN.

Download and Setup Z-Push



Download the tar.gz archive of Z-Push from http://z-push.sourceforge. net.

Following is the direct URL to download the latest version (1.1.1) of Z-Push, as

of writing this article:



http://download.berlios.de/z-push/z-push-1.1.1.tar.gz

After download, extract the archive into /var/www/html as:

tar -zxvf z-push-1.1.1.tar.gz -C /var/www/html/

This will create a directory named z-push under /var/www/html. Change to this

directory (cd /var/www/html/z-push) and issue the following command:

chown -R apache.apache state

The “state” subdirectory is required to be writable by the web server. The

above command sets up the same.

Next type in the following lines in a text editor (joe, vi, gedit or kedit):

Alias /Microsoft-Server-ActiveSync /var/www/html/z-push/index.php

php_flag magic_quotes_gpc off

php_flag register_globals off

php_flag magic_quotes_runtime off

php_flag short_open_tag on

Save the above in a file called z-push.conf in the directory /etc/httpd/conf.d.

Next issue the following for the above settings to take affect:

service httpd reload

Configure Z-Push



We'll assume that you are running an IMAP mail server at mail.abc.com and

your E-mail domain is abc.com.

As assumed above, the server running Z-Push is services.abc.com. Throughout

the article, you will need to substitute these with the actual server and

domain.

As a note, you can run Z-Push on the same server — the one running the mail

server.

Open the file named config.php (found in the directory /var/www/html/z-push)

in a text editor. Find the line which says:

if (function_exists("date_default_timezone_set")){



date_default_timezone_set("Europe/Amsterdam");

Substitute Europe/Amsterdam with Asia/Calcutta (or Asia/Kolkata if you are

using Fedora 9). This sets the timezone.

We are setting it to IST (Indian Standard Time) by specifying Asia/Calcutta.

Next, find the line which says:

$BACKEND_PROVIDER = "BackendICS";



and change it to:

$BACKEND_PROVIDER = "BackendIMAP";

This specifies that Z-Push will be connecting to an IMAP server to push the

data (E-mails).

We will now need to specify the parameters (hostname, username and password)

for Z-Push to connect to the IMAP server.

Find the line which says:

define('IMAP_SERVER', 'localhost');

And change it to:

define('IMAP_SERVER', 'mail.abc.com');

As per our assumption mail.abc.com is your mail server. Next change:

define('IMAP_DEFAULTFROM', '');

to:

define('IMAP_DEFAULTFROM', '@abc.com');

Save the file



Z-Push is ready to serve your mobile with Push E-mail. Please note that

Z-Push still polls your IMAP server for E-mails on regular intervals.

So there will be a delay of a few seconds for the E-mails to reach your

mobile device.

But once Z-Push has received an E-mail, it will push it instantly, depending

on the ActiveSync settings (as explained in the section Connecting from the

Mobile).

Connecting from the Mobile



The steps below are for a mobile/PDA running Windows Mobile 6.0. For other

versions of Windows Mobile, these steps should remain, logically, the same.

On the next page, we'll tell you how to configure push email services on your

windows mobile PDA. It only requires a few steps.

Click on Start Menu. Select Programs from

amogst the list of programs. Click on ActiveSync (green icon)
The ActiveSync configuration wizard will

pop-up. Click on Menu (bottom-right). Select Add Server Source.
Type in hostname. This is services. abc. com

in our ase. Uncheck the checkbox for SSL, unless your Apache server is

already configured
Enter IMAP username and password, the same

that you would use to retrieve your E-mails on an E-mail client
Z-Push can sync calendar, contacts and

tasks. But here we have configured it only for E-mail. So uncheck the boxes

for others
Click on E-mail > Settings. You can setup to

download E-mails by number of days, the E-mail format and the size of the

E-mail to download
Clicking on Next will start syncing. If you

get error message, check if you have supplied correct username and password
Schedule when you want ActiveSync to pick up

E-mails. “As items arrive” will send them as Z-Push retrieves it from IMAP
ActiveSync, for the first time, will

download all the E-mails (depending on your E-mail settings/options)
Click on 'Start' Menu and then on'Messaging'.

This will launch Pocket Outlook. Here you will see new Outlook E-mail
Advertisment