That sounds like an issue with the mail server treating the domain as a local domain. Basically the mail server sees the domain name (example.com) and says "Oh, this is email address belongs to a user on my server, let me route it there.... wait there is no user by this email - ERROR." This is done for performance reason, why check the DNS records when it knows it's a local domain anyway.
But when it sees your email address (test.com), it knows that test.com isn't local - so it checks the DNS servers for it's MX records and route it accordingly outside the server.
Hope that makes sense to you, this is a common issue for domains where the emails are managed elsewhere.