This should be fairly simple, but I caution you against doing it. You would have to allow relaying by all parties, but you could then limit them as to where they could send. This technically opens you up as a relay host, if only for Hotmail and Yahoo. To limit the relay recipient domains, update the field "Allow messages to be sent only to the following external Internet domains" under Inbound Relay Controls in the SMTP Inbound Controls, which is under Restrictions and Controls in the Router/SMTP section of the configuration document.
As I said, I strongly suggest you not do this. Most companies do not want internal e-mails being sent to outside addresses.
Dig Deeper on Lotus Notes Domino Mailbox Management
Related Q&A from Michael Lazar
Learn how to easily keep track of the numbers of incoming and outgoing Lotus Notes email messages to and from your Domino server each day. Continue Reading
Discover what steps you can take if your Lotus Domino server runs out of disk space and you have issues sending and receiving Lotus Notes email ... Continue Reading