The new outgoingip patch in qmail is somewhat useless since it requires an A record for the sender domain to be pointing to an IP out the outgoing mail server for it to work, we use the following dns setup for all our hosting servers (almost 1000 domains) domain.com A X.X.X.X www.domain.com CNAME domain.com smtp.domain.com CNAME domain.com .... and i believe that many hosting companies use this format. Like i said the outgoinip patch implemented in gentoo -r16 ebuild is not useful when you use a smtp server that's not located on the same ip as the httpd in our case. What we need is either a patch that uses a controlfile to read the domain/outgoingip pair like: http://www.rno-consultores.com/mail/qmail/qmail-1.03_outgoingips.patch But with the functionality of a default host in case that there is no match on the list the smtp outgoing ip is set to a specified ip address like the default smtproute (:X.X.X.X) instead of setting it to the primary IP of the server.
*** Bug 133735 has been marked as a duplicate of this bug. ***
We won't add more patches to mail-mta/qmail. Use mail-mta/netqmail with QMAIL_PATCH_DIR. Btw.: using CNAME records anywhere in mail delivery is strongly discouraged.