I couldn't resolve the From: header problem for sending mail from mutt. My /etc/myname file contained a non-resolvable hostname my ISP set-up. Once I changed myname to the proper hostname for my server, problem fixed.
Perhaps you could change /etc/myname to gmail.com? I never could fully get masquerading to work properly for me. Chris Bennett