Goal: Need to forward all mail destined for users @ domainA.com to users @ domainB.com.
Using GApps for domainB.com. I setup a postfix relay that domainA.com's MX records point too. Able to send mail to users @ domainA.com, but the 'From' address gets re-written to the user account the relay is set to authenticate with GApps too. How can this be prevented? I would like the From address to remain as the true 'From' address and not get re-written?
main.cf:
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
append_dot_mydomain = no
readme_directory = no
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_use_tls = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_tls_note_starttls_offer = yes
tls_random_source = dev:/dev/urandom
smtp_tls_scert_verifydepth = 5
smtp_tls_key_file=/etc/ssl/private/smtp.key
smtp_tls_cert_file=/etc/ssl/certs/smtp.pem
smtpd_tls_ask_ccert = yes
smtpd_tls_req_ccert = no
smtp_tls_enforce_peername = no
smtp_tls_CAfile = /etc/pki/tls/certs/ca-bundle.crt
smtpd_sender_restrictions = reject_unknown_sender_domain
smtpd_data_restrictions = reject_unauth_pipelining
virtual_alias_domains = domainA.com
virtual_alias_maps = hash:/etc/postfix/virtualmap
myhostname = machineA.localcompany.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = smtp.gmail.com, localhost, machineA.localcompany.com
relayhost = [smtp.gmail.com]:587
mynetworks = 0.0.0.0/0
mailbox_size_limit = 0
message_size_limit = 26214400
recipient_delimiter = +
inet_interfaces = all