Selecting a POP3 pool
I'm trying to create a migration strategy for out mail system. The migration will take some time so some users will be on the old system and some on the new one. I'm thinking of an iRule that would check if the user already exists on the new LDAP and direct him to the new system or else the old one. This applies to POP3 access (and eventually IMAP but the concept is the same).
The way POP3 conversation goes is:
S:+OK POP3 server ready.
S:+OK Capability list follows
C: USER foo
S:+OK please send PASS command
C: PASS aSecret
So my idea is that LTM would pretend to be the POP3 server to the point where it gets USER and PASS and try to authenticate it against the new LDAP and then select the appropriate pool. Here is where I'd need a bit of direction. If you just direct the client to the pool and do nothing, the _real_ server will start the conversation from the start but the client will think he's already done the auth part and there will be confusion. I also shouldn't TCP::release the conversation before I get confirmation if the default pool is the right one otherwise I end on the same point as before. So I think I have to do the conversation the client had with "LTM POP3 server" again to the appropriate server before I release the client to the real server.
So the logic would be:
1. LTM pretends to be POP3 server and speaks POP3 until it gets the user's credentials
2. it checks if the user exists in the LDAP and picks the correct pool
3. LTM replays the client part of POP3 conversation to the correct pool
4. release the client to the correct pool
Is the logic correct?
What would be the right way to do that? Save client responses or just generate them? Any ideas on this?