When you are in the wholesale ISP business you are having a lot of different users on the network which you cant control. Now we'd like to reduce the amount of spam the machines might sent out in case beeing compromised and used as an SMTP drone. Shutting down individual users or forcing them to use a specific relay is not an option.
In my case i was using a Cisco 7206VXR with a 12.3B image. I had to add the following to the configuration:
WCCP uses a slightly modified GRE tunnel to pass on the packets to the proxy. For this the proxy has to announce itself to the WCCP router and the router will automatically set up a GRE tunnel. I used the python wccp2 implementation which can be found at http://anna.sgu.ru/svn/wccpd/wccpd/ to announce myself to the wccp router. I had to slightly modify the wccpd to actually announce redirecting port 25.
Now you'll get GRE encapsulated traffic sent toward the machine you configured in the wccpd.py to be the recipient. For this you will need to set up a tunnel on your machine. I am using Linux so i set up the tunnel like this:
You set up a tunnel, add an ip address and set the link to up. Then you add a DNAT entry to force all packets for port 25 to be redirected to your smtp-proxy running on port 2525. As the routing is obviously a little strange you'll need to disable return-path validation in the kernel and turn on forwarding.
As the smtp proxy for evaluation purposis i was using ProxSMTP 1.2.1 available at http://memberwebs.com/nielsen/software/proxsmtp/. The only thing i changed was the proxsmtp listen address in the configuration.
SMTP proxying by WCCP causes the SMTP session to originate from a different IP address. This itself should not be a problem but it will cause the SMTP to fail in case the user if forced to use DRAC or better POP before SMTP because the POP and SMTP session will originate from different IP addresses.