I think you need to use getrawtransaction to get transactions that are not to or from addresses in your wallet.dat.
See here (emphasis added by me):
- snip -
in version 0.6.3 and earlier, gettransaction would only return information about transactions in your wallet, and would not return all of the information about the transaction.
A month or two ago Pieter and Luke wrote code to modify gettransaction/getblock to return information about any transaction in the blockchain
- snip -
- snip -
"get any transaction, even transactions that aren't in your wallet" functionality will be moved from gettransaction to a new 'getrawtransaction' API call
- snip -