From my previous post of socket-to-me-baby I had started on a wee project to interface into MS-Exchange.

I had got the communication using sockets to work, but was having trouble accessing other mail boxes.

The IT people who look after the network servers had created a new user which had permissions to access all the required mail boxes.

But I could not work out how to access these mail boxes via IMAP.

The NAMESPACE command should list three things:

  1. Personal mail box (namespace)
  2. Other users mail boxes if you have access
  3. Shared folders

No other mail boxes would ever be listed. So, after a couple of solid hours of yahooing and googling, I discovered the following at Exchange Team Blog.

To access the mail boxes, you must change the LOGIN command syntax within IMAP to DOMAIN/USER.NAME/MAILBOX.NAME.

The downside of using this method is that the list of mail boxes must be known before hand, and cannot be obtained by the namespace command.

I now have a phantom started by MS-Windows Server every 10 minutes which records the status of each mail box for each nominated user. The file is keyed by the users name, date and time with multivalued fields for mailbox name, message total, recent total, unseen total, uidnext and uidvalidity.

I should now be able to track when emails come in, to obtain peak times, and make sure that the users are responding to same.

My next step is to automatically process bounces and mail list removal requests.

save.run.done