Hi,
I am trying to setup gmail as my mail hosting for ALL domains i have. I dont want to host any mail in my server. So, i disabled Mail for domain
but i found this site:
http://www.vyoufinder.com/wordpress/?p=37
enable transport mapping in Postfix by editing /etc/postfix/main.cf adding or
changing your configuration with regard to the following.
To avoid entering a variable twice, search your existing main.cf file for variables you are adding.
If you find one that exists already, just change it to match the new value as shown below.
In the end, your main.cf file needs to contain the following:
smtp_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtp_sasl_security_options = noanonymous
smtp_sasl_security_options =
smtp_sasl_tls_security_options = noanonymous
smtpd_sasl_application_name = smtpd
Disable DNS Lookupsdisable_dns_lookups = yes
Optional Address Mapping
for example may mdawg@localhost to mdawg@gmail.com
relayhost = [smtp.gmail.com]:587
transport_maps = hash:/etc/postfix/transport
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_tls_per_site = hash:/etc/postfix/tls_per_site
smtp_generic_maps = hash:/etc/postfix/generic
Postfix 2.3 and later
smtpd_tls_security_level = may
smtpd_tls_security_level = encrypt
Obsolete, but still supported
smtpd_enforce_tls = yes
this is required to force the servers certification to be checked
smtpd_tls_ask_ccert = yes
Next create 3 new files:
/etc/postfix/transport
/etc/postfix/sasl_passwd
/etc/postfix/tls_per_site
Contents of /etc/postfix/transport:
# Contents of /etc/postfix/transport #
This sends mail to Gmail
gmail.com smtp:[smtp.gmail.com]:587
Contents of /etc/postfix/sasl_passwd:
# Contents of sasl_passwd #
[smtp.gmail.com]:587 youremailname@gmail.com:yourpassword
Contents of /etc/postfix/tls_per_site:
# Contents of /etc/postfix/tls_per_site # REMEMBER: After changes run:
postmap /etc/postfix/tls_per_site
smtp.gmail.com MUST
as root, Run postmap on the three files you just created:
postmap /etc/postfix/transport
postmap /etc/postfix/sasl_passwd
postmap /etc/postfix/tls_per_site
Edit etc/postfix/master.cf and add:
smtp unix - - n - - smtp
relay unix - - n - - smtp
are these changes need? or?