Tom,
In Adobe Lightroom add the plugin called Mogrify. If you're exporting one at a time then the free version allows infinite exports, but only one at a time. There's an option called Canvas:
"The canvas option allows you to define the absolute final output size of your image. The image is first resized using the other options available, and borders are added. The images is then places on the fixed size canvas, which may have any colour you choose. If the image is bigger than the canvas then it will be cropped."
Next choose Resizing. Check the resize to fit box and select short side from the drop down box.
For instance if you're doing a 320dpi image at 4x6, you'll choose 1280x1920 px in canvas and if you want a 4:3 image inside that, you'll do: 1280 px for the short edge in resize. You'll get black bars on the side which you can then use a paper cutter to get rid of.
LR/Mogrify 2 - Add Watermarks, Border and Text Annotions to Images Exported by Adobe Lightroom 2