postfixのrelayhostをgmailにする

root@www11437ue# dpkg -l | grep sasl                             [/etc/postfix]
ii  libauthen-sasl-perl            2.1600-1                    all          Authen::SASL - SASL Authentication framework
ii  libsasl2-2:amd64               2.1.26.dfsg1-13             amd64        Cyrus SASL - authentication abstraction library
ii  libsasl2-modules:amd64         2.1.26.dfsg1-13             amd64        Cyrus SASL - pluggable authentication modules
ii  libsasl2-modules-db:amd64      2.1.26.dfsg1-13             amd64        Cyrus SASL - pluggable authentication modules (DB)
root@www11437ue# diff -uw main.cf.org main.cf                    [/etc/postfix]
--- main.cf.org 2015-08-11 10:22:05.061431246 +0900
+++ main.cf     2015-08-11 10:57:42.393423469 +0900
@@ -33,9 +33,15 @@
 alias_database = hash:/etc/aliases
 myorigin = /etc/mailname
 mydestination = www11437ue.sakura.ne.jp, localhost.sakura.ne.jp, , localhost
-relayhost =
+relayhost = smtp.gmail.com:587
 mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
 mailbox_command = procmail -a "$EXTENSION"
 mailbox_size_limit = 0
 recipient_delimiter = +
-inet_interfaces = all
+inet_interfaces = localhost
+
+smtp_use_tls = yes
+smtp_sasl_auth_enable = yes
+smtp_sasl_password_maps = hash:/usr/local/etc/postfix/sasl_passwd
+smtp_sasl_security_options = noanonymous
+smtp_sasl_mechanism_filter = plain
root@www11437ue# cat sasl_passwd                       [/usr/local/etc/postfix]
smtp.gmail.com:587 xxxxxx@gmail.com:xxxxxx
root@www11437ue# postmap /usr/local/etc/postfix/sasl_passwd
root@www11437ue# chown root.postfix *                  [/usr/local/etc/postfix]
root@www11437ue# chmod 640 *                           [/usr/local/etc/postfix]
root@www11437ue# ls -l                                 [/usr/local/etc/postfix]
total 12
-rw-r----- 1 root postfix    51 Aug 11 11:17 sasl_passwd
-rw-r----- 1 root postfix 12288 Aug 11 11:17 sasl_passwd.db
root@www11437ue# service postfix restart                                    [~]
Last modified: 2015-08-11 by hiroshi.ohtsuka@u...