Getting a download from BitBucket with Curl (wget doesn’t work)

I was trying to install iRedMail, but it’s just impossible to download it. Neither wget or curl does the trick without some curl-fu applied.

The key is using the -L switch. wget’s equivalent should be “–content-disposition” but that still doesn’t work when downloading from bitbucket. Just gives a 403 and gives up.