Yafray rendering without background

How can I render an image using an HDRI lighting setup (and yafray) but render with an alpha channel background?

From yafray FAQ:

Q30: Is there a way to get Yafray to render using an HDRI for lighting and then not display it in the background?

You should use a compositing technique, since this feature is not currently supported.

If you enable ‘RGBA’ button in the format panel, and save the image in a format that supports an alpha channel (png/ exr/tga/etc) then the background can be masked out using the alpha channel (Format panel, Render Buttons F10). Inside XML files, the key parameter is save_alpha:
<render camera_name=“MAINCAM”
raydepth=“5” gamma=“1.000000” exposure=“0.000000”
AA_passes=“0” AA_minsamples=“0”
AA_pixelwidth=“1.500000” AA_threshold=“0.050000”
background_name=“world_background”
save_alpha=“on” >
<outfile value=“c:\Documents and Settings\Alvaro\Escritorio\YBtest.tga” />
</render>

There are other alpha parameters that might be useful in the cases where the anti-aliasing around the objects still can show a hint of the background, setting either one of these might help to remedy that:
alpha_premultiply - “off”,“on”
alpha_maskbackground - “off”,“on”

They are explained here: http://www.yafray.org/forum/viewtopic.php?t=61