Blocking Yahoo! IM from the LAN

Configure your internal DNS to return 127.0.0.1 for webcs.msg.yahoo.com and httpcs.msg.yahoo.com.

Add the DNS names webcs.msg.yahoo.com and httpcs.msg.yahoo.com in the Web proxy server black list.

To make it more effective:

We recommended to allow only known HTTPS web sites from your LAN through the Web proxy server. This can be done by entering "**s" (without quotes) in the web proxy server black list and then add the known "https" sites to the white list.

Reference: http://help.yahoo.com/l/us/yahoo/mail/yahoomail/chat/chat-23.html