My Postfix virtual file has the following entry:
abc@mydomain.com abc@gmail.com
However, the mail is being forwarded as spam. If I send email directly from abc@mydomain.com to abc@gmail.com it appears in the inbox, but the forwarding results in the mail being marked as spam. How can I fix this?
Your problem is most likely caused by SPF or similar mechanisms. When Postfix forwards the mail to GMail, the SPF records of the original sender's domain do not match your domain and thus GMail thinks it is spam. The proper solution to this would be using Sender Rewriting Scheme (SRS). Click here for a tutorial on how to setup SRS with Postfix.