Hi,

I started an effort to teach pound how to deal with the RPC requests required
for Outlook Anywhere. VoilĂ , here comes the patch against Pound-2.5. It's not
heavily tested yet, but at least the core functionality (sending/receiving
mail) is working fine.

Some technical background explaining the patch:
For RPC, Outlook opens pairs of connections. One with method RPC_IN_DATA which
is used for sending data to the server and one with method RPC_OUT_DATA for
reading from the server. 

The RPC_IN_DATA request from Outlook announces a Content-Length of 1GB but it
will never send that many data. Any amount of data the client sends must be
forwarded immediately. The client expects no reply from the server on this
connection.

The RPC_OUT_DATA reply from the backend also announces a Content-Length of
1GB, but - you already guessed it - this is again just a lie. Just read and
forward all the data we receive on this connection immediately.

Every 60 seconds the client sends a keepalive packet over the RPC_IN_DATA
connection. the server sends a keepalive packet over the RPC_OUT_DATA 
connection.

Whenever Outlook decides it no longer needs this RPC channel, it closes both
connections.

Implementing RPC_OUT_DATA was easy as the behaviour is almost the same as with
HTTP replies without Content-Length. So simply ignore the Content-Length
header and make sure it's not an error if writing to the client fails
(remember: the client closes this connection) as otherwise pound would log an
error message instead of the request.

For RPC_IN_DATA I extended the request handling part to support reading until
EOF. I actually took the code used for handling replies without Content-length
and adapted it to request handling. Once the client is done, the request is
logged with the amount of bytes transmitted by the client (remember: we don't
expect a reply from the server, so wouldn't make sense to log the reply
length). Time to close the connection to the backend. Note that MaxRequest is
ignored for RPC_IN_DATA.

Required configuration for pound:

...
ListenHTTPS
  ...
  Port 443
  xHTTP 4
  Client 60
  AddHeader "Front-End-Https: on" #if HTTP (no HTTPS) backend
End
Service
  URL "^/rpc/rpcproxy\.dll\?"
  Backend
    ...
    Timeout 60
  End
End

Don't forget to enable Outlook Anywhere on Exchange.

On the Outlook PC, make sure you get no certificate errors when you point
Internet Explorer to pound. If IE tells you the CA is not recognized, have it
installed as trusted.

Enjoy,
Frank


--
To unsubscribe send an email with subject unsubscribe to [email protected].
Please contact [email protected] for questions.

Reply via email to