Funambol E-mail: Part 2

Exclusive offer: get 50% off this eBook here
Funambol Mobile Open Source

Funambol Mobile Open Source — Save 50%

Sync your email and other data with mobile devices using Funambol 7.1

$23.99    $12.00
by Stefano Fornari | December 2009 | Networking & Telephony Open Source

Read Part One of Funambol E-mail here.

Mobile e-mail at work

One of the most widely used phones for mobile e-mail are phones running Windows Mobile; therefore, this is a platform Maria will have to support. Funambol fully supports this platform, extending the Windows Mobile native e-mail client to support SyncML and Funambol mobile e-mail.

As Windows Mobile does not natively support SyncML, Maria needs to download the Funambol Windows Mobile Sync Client from the following URLs:

Like any other Windows Mobile applications, these are executable files that need to be run on a desktop PC and the installation will be performed by Microsoft ActiveSync.

Once installed on the mobile phone, Maria can run Funambol by clicking the Funambol icon. The first time the application is launched, it asks for the Funambol credentials, as shown in the following image:

Funambol Mobile Open Source

Maria fills in her Funambol Server location and credentials (not her e-mail account credentials) and presses Save. After a short while, the device will start downloading the messages that she can access from the Funambol account created by the Funambol installation program in Pocket Outlook. The inbox will look similar to the following image:

Funambol Mobile Open Source

To see mobile e-mail at work, Maria just needs to send an e-mail to the e-mail account she set up earlier. In less than a minute, her mobile device will be notified that there are new messages and the synchronization will automatically start (unless the client is configured differently).

Mobile e-mail client configuration

There are a number of settings that Maria can set on her mobile phone to change how mobile e-mail works. These settings are accessible from the Funambol application by clicking on Menu | Settings.

Funambol Mobile Open Source

There are two groups of settings that are important for mobile e-mail: E-mail options... and Sync Method.

From the Email options panel, Maria can choose which e-mails to download (all e-mails, today's e-mails, or e-mails received from the last X days), the size of the e-mail to download first (then the remaining part can be downloaded on demand), and if she also wants to download attachments. In the advanced options, she can also choose to use a different "From" display name and e-mail address.

From the push method panel, Maria can choose how to download e-mail automatically using the push service on a regular basis, with either a scheduled sync or only manually upon request (from the Funambol Windows Mobile Sync Client interface or the PocketOutlook send and receive command).

Funambol supports many mobile phones for mobile e-mail. The previous description is only for Windows Mobile phones. The manner in which Funambol supports other devices depends on the phone. In some cases, Funambol uses the phone's native e-mail client, such as with Windows Mobile. In other cases, Funambol provides its own mobile e-mail client that is downloaded onto the device.

Funambol Mobile Open Source Sync your email and other data with mobile devices using Funambol 7.1
Published: December 2009
eBook Price: $23.99
Book Price: $39.99
See more
Select your format and quantity:

Improving Funambol e-mail authentication

In the section E-mail account setup, Maria saw how to create and configure an e-mail account so that Funambol is able to access it. A piece of information she provided is the e-mail username and password. These credentials are used by Funambol to log into the e-mail server and are of course different from the synchronization credentials.

This is illustrated in the following figure, where the Funambol server first authenticates the synchronization session, and then the E-mail Connector connects to the e-mail server.

Funambol Mobile Open Source

With this setup, if the e-mail server does not authenticate the e-mail credentials, the access to the e-mail server would fail and Maria would see a synchronization error on her client side. What she would have expected, instead, is an authorization failure, with a message that tells her to check username and password. This would make it easier for an administrator to check which username and password are wrong.

To do so, Maria needs to adjust the server's configuration by changing the Funambol Officer to EmailOfficer.xml as illustrated in the next screenshot, from the Server settings node of the Funambol Administration Tool.

Funambol Mobile Open Source

Detecting authentication problems

Authentication problems can be easily detected by inspecting the server log found under $FUNAMBOL_HOME/log/ds-server/ds-server.log (unless Maria configured the logging differently).

The following sections show how the server log looks in the case of:

  • Successful authentication
  • Funambol authentication failure
  • E-mail provider authentication failure

Successful authentication

If the synchronization of Funambol e-mail from the mobile phone terminates successfully, it means that the username and password have been validated by both Funambol and the e-mail provider. In this case, the server log looks like the following:

[2009-07-03 15:31:03,299] [funambol.transport.http] 
[INFO] [8CEEF28A7322E8BC45CAC7E6F9E93A02] [] [] []
Handling incoming request
[2009-07-03 15:31:03,300] [funambol.transport.http]
[INFO] [8CEEF28A7322E8BC45CAC7E6F9E93A02] [] [] []
Request URL: http://192.168.0.74:8080/funambol/ds
[2009-07-03 15:31:03,300] [funambol.transport.http]
[INFO] [8CEEF28A7322E8BC45CAC7E6F9E93A02] [] [] []
Requested sessionId: null
[2009-07-03 15:31:03,962] [funambol.handler] [INFO]
[8CEEF28A7322E8BC45CAC7E6F9E93A02] [fwm-35313801010967P7]
[maria] [] maria/fwm-35313801010967P7 logged in.
[2009-07-03 15:31:04,340] [funambol.transport.http] [INFO]
[8CEEF28A7322E8BC45CAC7E6F9E93A02] [fwm-35313801010967P7]
[maria] [] Request processed.

Funambol authentication failure

The authentication credentials that Funambol checks first are the Funambol server credentials. If the user is not authenticated, the server log is similar to the following:

[2009-07-03 16:05:38,115] [funambol.transport.http] 
[INFO] [C377D015453C8B3804CBE4EF4C5824D7] [] [] []
Handling incoming request
[2009-07-03 16:05:38,148] [funambol.transport.http]
[INFO] [C377D015453C8B3804CBE4EF4C5824D7] [] [] []
Request URL: http://192.168.0.74:8080/funambol/ds
[2009-07-03 16:05:38,148] [funambol.transport.http]
[INFO] [C377D015453C8B3804CBE4EF4C5824D7] [] [] []
Requested sessionId: null
[2009-07-03 16:05:38,583] [funambol.handler] [INFO] [C377
D015453C8B3804CBE4EF4C5824D7] [fwm-35313801010967P7] []
[] User not authenticated
[2009-07-03 16:05:38,583] [funambol.handler] [INFO] [C377
D015453C8B3804CBE4EF4C5824D7] [fwm-35313801010967P7] []
[] Authentication failed for device fwm-35313801010967P7.
Make sure that the client used correct username and password
and that there is a principal associating the user to the device.
[2009-07-03 16:05:38,666] [funambol.transport.http] [INFO]
[C377D015453C8B3804CBE4EF4C5824D7] [fwm-35313801010967P7] [] []
Request processed.

In this case, the user will also be notified of the error in the Funambol client.

E-mail provider authentication failure

In this case, Funambol credentials are correctly verified, but the E-mail Connector fails to authenticate the e-mail user against the e-mail provider. The server log will be similar to the following:

[2009-07-03 16:35:27,248] [funambol.transport.http] 
[INFO] [D9044872013116F89220CDEEC2AB9D9A] [] [] []
Handling incoming request
[2009-07-03 16:35:27,250] [funambol.transport.http]
[INFO] [D9044872013116F89220CDEEC2AB9D9A] [] [] []
Request URL: http://192.168.0.74:8080/funambol/ds
[2009-07-03 16:35:27,250] [funambol.transport.http]
[INFO] [D9044872013116F89220CDEEC2AB9D9A] [] [] []
Requested sessionId: null
[2009-07-03 16:35:33,189] [funambol.email] [ERROR] [D9044
872013116F89220CDEEC2AB9D9A] [fwm-35313801010967P7] [] []
Error Opening Connection Store:
javax.mail.AuthenticationFailedException: AUTHENTICATE
Unknown user or incorrect password
at com.sun.mail.imap.IMAPStore.protocolConnect(IM
APStore.java:474)
at javax.mail.Service.connect(Service.java:275)
at javax.mail.Service.connect(Service.java:156)
at javax.mail.Service.connect(Service.java:176)


In this case, the error message highlighted above is generated by the mail server and therefore might differ from the example. Also in this case, the user will be notified of the error condition.

Summary

In this article, Maria learned how to set up Funambol to deliver the Funambol push e-mail service to her users. This means she configured the E-mail Connector and then created mobile e-mail accounts. Furthermore, Maria acquired familiarity with the Inbox Listener Service, which is the heart of Funambol push e-mail.

Maria also learned how to set up mobile e-mail on a Windows Mobile device and how to access Funambol e-mail.

Lastly, she understood how to improve Funambol e-mail authentication and how to identify authentication issues.

[ 1 | 2 ]
f you have read this article you may be interested to view :
Funambol Mobile Open Source Sync your email and other data with mobile devices using Funambol 7.1
Published: December 2009
eBook Price: $23.99
Book Price: $39.99
See more
Select your format and quantity:

About the Author :


Stefano Fornari

Stefano Fornari is a co-founder and CTO of Funambol, Inc., the leading provider of open source mobile cloud sync and push email solutions for billions of phones. Stefano had several years of software development experience before starting the Funambol open source project in 2003. He was one of the main contributors of the project and was also the project manager. Today, Stefano is in charge of the engineering team of Funambol. Prior to his development work on Funambol, Fornari was the chief architect at Stigma Online where he played a key role in the development of the company’s flagship portal product, SolWeb Intra. He has also held positions at Compaq, where he was an advisor on wireless technologies in PDAs, and at Art Technology Group (ATG) as a consultant. He holds an M.S. Degree in Computer Science.

Books From Packt


GlassFish Administration
GlassFish Administration

Blender 3D 2.49 Incredible Machines
Blender 3D 2.49 Incredible Machines

Tomcat 6 Developer's Guide
Tomcat 6 Developer's Guide

WordPress 2.8 Theme Design
WordPress 2.8 Theme Design

Asterisk 1.6
Asterisk 1.6

Beginning OpenVPN 2.0.9
Beginning OpenVPN 2.0.9

Zabbix 1.6 Network Monitoring [RAW]
    Zabbix 1.6 Network Monitoring [RAW]

FreePBX 2.5 Powerful Telephony Solutions
FreePBX 2.5 Powerful Telephony Solutions


No votes yet

Post new comment

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
H
u
f
m
4
y
Enter the code without spaces and pay attention to upper/lower case.
Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software