MultiPOP and Gmail

MDaemon has a feature called MultiPOP which, when enabled, will cause MDaemon to download all messages from one or more POP3 accounts and deliver them directly to a MDaemon user’s mailbox.

The dialog has simple hostname, username, password fields, plus options to leave mail on server or not. What isn’t obvious is how to support hosts like Gmail, which require SSL. As it turns out, MDaemon actually does support Gmail, and other SSL enabled POP3 hosts.

There are a number of ways to access the MultiPOP configuration for an account, through MDaemon’s account editor, through WorldClient or WebAdmin (both web options only being available if the user is allowed to use MultiPOP).

To set up MultiPOP to pull mail from a POP3 account which requires SSL, open the MultiPOP dialog, enter the hostname or POP3 server name followed by :995

:995 tells MDaemon to use port 995, and MDaemon automatically switches to SSL mode since SSL is required for port 995.

For Gmail, enter the hostname “pop.gmail.com:995”, the username which must include the @domain portion. For example, for [email protected], you need to enter the full [email protected] address, not just “dave.warren”

For Gmail you should set MDaemon to delete mail from the server as Gmail doesn’t account honour this, instead Gmail allows you to control what happens to mail after it’s downloaded (Leave it in the Inbox, Archive it, Delete it)

Note that the instructions are the same for googlemail.com, and for other mailboxes hosted by Google, just use the appropriate email address in the username field.

One other thing to be aware of with Gmail in particular, Gmail doesn’t automatically enable POP3 access, you need to enable it by logging in to Gmail, going to Settings, then to the POP section and setting the appropriate option. If you choose to download all mail, Gmail only offers a few hundred messages at once, so if you are intending to download a massive Gmail mailbox into MDaemon, MDaemon will take some time as messages are downloaded in blocks of about 500 messages at a time.

UPDATE (2008/10/02): One other thing I forgot to mention, MDaemon must have SSL enabled. To enable SSL in MDaemon 10, go to the Security menu, choose Security, then go to “SSL & TLS” and enable the “Enable SSL…” option.

UPDATE (2011/11/10): This functionality was added to MDaemon in 9.6.3, described in the release notes as “[4037] DomainPOP and MultiPOP use TLS/SSL when connecting to port 995”, earlier versions of MDaemon can use stunnel as a workaround or upgrade to a current version.

iPhone/iPod Touch SyncML clients

The iPhone is now over a month old, and good news, there are two SyncML clients available.  I’ve had the opportunity to play with both briefly.

Funambol is the free/opensource offering, it worked reasonably well in iPhone OS 2.0.0, but since upgrading to 2.0.1, it appears to perform a slowsync on every synchronization, resulting in potential duplicates, as well as the inability to delete items on either side.  For this reason, I’m not recommending it at this time.

Synthesis’ SyncML client is currently free, but will become a paid commercial product in the future, once Calendar support is added.

The initial version of the Synthesis client didn’t function at all with MDaemon’s SyncML server, Synthesis reported that the problem was fixed over a week ago, but it was just finally approved by Apple last night, and so far, it works great.

This is my current personal choice for SyncML client, I will post a more detailed review down the road once I have a bit more experience with it.

In both cases, the clients only support synchronizing the Contacts database, not the Calendar database (Apple didn’t bother with a Calendar API), nor Tasks (Apple didn’t bother to write a Tasks application)

Automatically creating IMAP folders for new users

I recently had a request to automatically create one or more IMAP folders for all new users, and subscribe to them automatically.

I was originally hoping to implement it entirely in the content filter, but it was a bit more complex then I’d hoped.

Right now my script assumes that MDaemon is installed at C:\MDaemon\ and user folders are C:\MDaemon\Users\$DOMAIN$\$MAILBOX$\ if this is not correct, you will need to modify the batch file and content filter rules to update the paths, or post back here and I can send an updated version.

Download newuser-imap-folders which contains three files, cfrules.txt, newuser.cmd and newuser.mrk.

  1. Make a directory called C:\MDaemon\Scripts
  2. Copy the “newuser.cmd” and “newuser.mrk” files into this directory.
  3. Open cfrules.dat in notepad, copy the contents into the clipboard.
  4. Open \MDaemon\App\cfrules.dat in notepad, paste the content of my cfrules.txt into the top of cfrules.dat, save cfrules.dat and close it.
  5. Go to MDaemon, open the content filter, you should see a new rule called “Trap Welcome Message” — Enable it.

At this point any newly created user should have three folders, “Test1”, “Test2” and “Test3” created, and they should be automatically subscribed to these folders.

Changing the list of folders requires editing the two newuser files.

In newuser.cmd, there are three lines at the bottom that look like this:

MD C:\MDaemon\Users\%2\%1\Test1.IMAP

You can add as many of these lines as you want, just replace the “Test1” with the name of the folder you want to create.

If you want to use a foldername with spaces, use this instead:

MD “C:\MDaemon\Users\%2\%1\Test 1.IMAP”

You’ll also need to edit newuser.mrk, there are three lines at the bottom that look like this:

Test1=Yes

This file controls the IMAP subscriptions for the user, so if you want the created folders to be automatically subscribed, list the folders here.  No quotes are required for a folder name with spaces here.

Hopefully this all makes sense and you don’t have any troubles, but if you do, please reply back in the comments and I’d be happy to assist.

UPDATE (2008/08/20): ZIP file was not properly linked/attached the first time around, re-uploaded to the server and updated the page.

Download at newuser-imap-folders