Thursday, August 04, 2005 1:02 AM bart

Bart's POP3 connector - free download

A couple of years ago I wrote a little POP3 Connector tool for users at my former secondary school that needed to have their POP3 e-mail boxes integrated with their Exchange 2003 mailboxes on the network. Finally I found some time to put it online in a zip and write some installation notes for it (thanks to Robin - feel free to reveal your identity through feedback if you read this post - to put some pressure on me :-)). You can download it over here. Make sure to RTFM, which means to read the included readme.txt file. Also note it's still in beta and it will stay in that development phase for an undefined time as I need to recover the source files from one of my previous laptop backups somewhere out here on the network :d.

Some screenshots (click for full-size images):

The management homepage that every user can access to add/remove/edit connectors for his/her mailbox. Please note that the user in the sample screenshot is a member of a POP3 administrators group in AD (see readme.txt for install instructions) and because of that administrative tasks are accessible.

Add/remove/edit POP3 connectors.

Management page to view all users who are using connectors and to edit these if needed. Also displays statistical information.

Server settings.

Management of the POP3 Connector Windows Service.

Feel free to use it if you want to do so. Originally I created this because Exchange 2003 doesn't include a POP3 connector (it's only in Small Business Server) and because of the need for users to be able to manage their POP3 connectors themselves. The solution is using ASP.NET and a Windows Service, all written in C#. The Windows Service is multithreaded and processes multiple connectors in parallel. The POP3 library to access a POP3 server was written manually myself. For SMTP submission, a custom library was developed too because of the need for base64 encoding support to forward the message in an unchanged manner to the destination mailbox. So, System.Net is used heavily for the TCP/IP sockets stuff.

Have fun and send me any comments you have!

Del.icio.us | Digg It | Technorati | Blinklist | Furl | reddit | DotNetKicks

Filed under:

Comments

# re: Bart's POP3 connector - free download

Thursday, August 04, 2005 4:54 PM by bart

Wow, thanks, Bart. I've been looking for ages for exactly such a thing. Great work!

# re: Bart's POP3 connector - free download

Thursday, August 04, 2005 11:19 PM by bart

Hi Patrick,

Great to read that at least someone likes this piece of software :-). Have fun with it and keep the feedback coming.

Cheers,
Bart

# re: Bart's POP3 connector - free download

Thursday, August 11, 2005 3:26 AM by bart

Indeed superb piece of software ! Better then any tool i've ever seen !!!

But it's still beta :) So here is some feedback:


BUGS?:
------

- How does a user deletes a connector ?
- What if the user don't have an exchange mailbox ?
- When the mail is gathered the delivery time/date is changed to the time it was forwarded.

QUESTIONS:
----------

- When a lot of connectors connect to the same server, is the mail gathered once or does it reconnect every time ?

WHAT DO I MISS:
---------------

- It's not possible to use distribution groups
- It's not possible to add connectors for users without logging in as that user.
- Something that would be cool (don't need this for the moment) multiple delivery domains ?

=> Maybe you could add feature like 'ADMIN connectors' who are'nt visible for normal users. Just something like POP3 >>> EmailAdres


SUGGESTIONS:
------------

- Maybe use the same login system as exchange OWA does. (Can be done by modifying the Metabase) OR get the Exchange AUTH coockies so you don't need to login again when browsing to the forms auth OWA.
- Another feature that could be usefull: authentication for the SMTP server
- Per Connector interval with drop down list + named intervals specified by the admin => So a user can choose things like 'Every Hour', 'Every Day' or some custom intervals specified by the administrator


That would be it (for now) ;)



Thx again for this great software !!!

Greetz,

Robin

# re: Bart's POP3 connector - free download

Thursday, August 11, 2005 2:17 PM by bart

Hi Robin,

Thank you so much for your comments on this beta release. I'll certainly check out a lot of your suggestions, once I have recovered the source code from the backup (which I need to find first :-)).

Some first answers:

1. Bugs

* Currently it's not possible for a user to delete a connector indeed. He/she can only disable a connector.
* There is no way to specify as an admin the maximum allowed number of connectors or a notion of quota. Maybe this will be added in a further release too (maybe stored inside AD itself, but I rather don't want to do schema extensions).
* Exchange is (and will be) required. This behavior is by design although the service itself can cope with any POP3 and SMTP server. So, nowadays it's perfectly possible to specify a non-Exchange SMTP if the receiver mail address composition is <username>@<AD domain name>. As I have mentioned in the docs, the target e-mail address might be gathered from the user's e-mail address field in AD.
* The change of the delivery time/date to the time when the mail was forwarded is by design, as the SMTP protocol uses the queue time as the mail sent time, although the mail itself can contain additional fields which hold dates/times. I'll check this a little further as I'm not 100% sure about this right now.

2. Questions

* If I do understand your question correctly, the answer is that every connector opens a separate connection to the target POP3 server, even if a lot of users connect to the same server. However, the session-oriented nature of the POP3 protocol makes it nearly infeasible to have another way to retrieve mail other than having a separate connection per connector. Nevertheless, I consider to change the architecture towards a plug-in based model, so that you can developer your own mail retrieval component (e.g. IMAP4, POP3) in order to change the default behavior if you'd want to do so.

3. Missing

* Distribution groups are not known by the connector at the time speaking. The basic problem is the fact that connectors are user-based and depend on the user authentication. A general management view would solve the problem, as we can list the distribution group e-mail addresses over there and add connectors for these. Ideally, there'd be a concept of ownership for distribution groups so that we can offload the task of managing connectors for a distribution group to the owner of the distribution group.
* As you mention, the identity of a user is bound in a 1-on-1 relationship to the target mailbox. Therefore authentication is needed in order to manage the associated connectors. There is no such thing as a "god connectors administrator" for the moment. However, you can go to the SQL Server database and add/remove connectors over there, but you'll have to trick the encrypted password by entering that password through the administration website and copying it to the field of the newly added connector in its encrypted format.
* Multiple delivery domains are not supported nowadays, but this can be solved in a future release by using the e-mail address field in AD. Further brainstorming has to be done.
* Admin connectors would be a possiblity too. I have to consider this, based on security requirements etc.

4. Suggestions

* Using the Exchange OWA login methodology has to be investigated.
* Authentication for the SMTP server has to be checked in the RFC, because the implementation of the SMTP client in the software is completely self-written based on the SMTP server RFC document and the authentication portion was not implemented yet.
* Scheduling on a per-connector basis would be great but will complicate the service code significantly. I have to think about this too, but I'm seriously considering to implement this.

5. Architecture

* Some threading optimizations have to be considered too.


Once I have an updated version (can take a while) I'll post it on my blog and let you know about it.


Kind regards,

Bart De Smet

# re: Bart's POP3 connector - free download

Friday, August 12, 2005 7:17 AM by bart

Ok i'm looking forward for the updates :)

One more question: While i was on vacation the service seemed to fail. I did'nt recieve any mails trough the pop service. The service was running and a manual sync worked perfectly. By restarting the service everyting was ok again. Is there a way to turn on some kind of logging on the service to do some debugging ?

Grtz Robin

# re: Bart's POP3 connector - free download

Tuesday, August 23, 2005 1:53 AM by bart

Hi,

Now i'm facing the same problem @ Home...

My first guess is that Etrust fucks up the service when a virus comes in...

I'll check on that and will get you guys updated...

Grtz Robin