CentOS6でGmailサーバー経由でメールを送信しますので
CentOS6, Postfix.x86_64 2:2.6.6-2.1.el6_0なんです
設定ファイルをイジる
参考:Postfix で、Gmail にメールをリレーする - 私の二次記憶
[root@youpandora postfix]# diff main.cf main.cf.orig 77d76 < myhostname = youpandora.motchang.myhome.cx 85d83 < mydomain = motchang.myhome.cx 102d99 < myorigin = $mydomain 167,168c164 < #mydestination = $myhostname, localhost.$mydomain, localhost < mydestination = $myhostname, $mydomain, localhost.$mydomain, localhost, localhost.localdomain --- > mydestination = $myhostname, localhost.$mydomain, localhost 322,330d317 < relayhost = [smtp.gmail.com]:587 < # debug_peer_list = smtp.gmail.com < smtp_use_tls = yes < smtp_sasl_auth_enable = yes < smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd < smtp_sasl_tls_security_options = noanonymous < smtp_sasl_security_options = noanonymous < smtp_sasl_mechanism_filter = plain < smtp_tls_CApath = /etc/pki/tls/certs/ca-bundle.crt
root@youpandora.motchang.myhome.cx宛のメールとroot@motchang.myhome.cx宛のメールをローカルとして扱う。外部に晒すようなことは考えていない。
パスワードファイルのハッシュ化
postmap /etc/postfix/sasl_passwd
aliasを編集する
rootへのメール→一般アカウント→gmailへ
テスト
mail root
mail ****@gmail.com