Your question can be restated as "can you tell from the email headers that the email originated from company B's SMTP server?"
The answer is almost certainly yes, but has nothing really to do with domain names. Visually examining the full headers from a sample email is the best way of figuring out appropriate sieve tests.
|