For Gnus:
If the two different accounts have different email addresses then you can split based upon the To:
header. This may not work if there are mailing lists that those addresses are subscribed to. But that could be fixed up with a few more splitting rules.
This is how I do my splitting from my 5 mail addresses (3 primary ones and 2 minor ones).
If that is not sufficient then perhaps splitting on Delivered-To:
.
Refer to the Splitting Mail section of the Gnus manual.