There's also another qmail patch which uses a control file instead of DNS lookups:
Beware! Both patches not only select the outgoing IP address, but also change the hostname used in the HELO command that qmail-remote uses when connecting to the target server. This can be problematic if you don't use dedicated IPs for every domain because your server is then telling "HELO domain1.tld" as well as "HELO domain2.tld" for connections originating from the same IP address. A couple of providers don't like this "multiple personality" behaviour and will block the IP in question as soon as a couple of HELO hostname changes are observed.
The correct way would be to set the HELO string to PTR record of the outgoing IP; however I'm not aware of any patch which does this.