Interestingly, scam detection (rather than spam filtering) is a simple hardcoded rule, which looks at whether the send headers match up. I've received more than a few genuine emails marked as potential scams because they were sent from a rebranded mail provider.