Hi Since my server does not relay directly to the internet , i have tried to relay mails via gmail using tls and was quite successful ,
my main.cf details is as follows : myhostname = mail.server.com relayhost = smtp.gmail.com:587 # auth smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_security_options = noanonymous # tls smtp_tls_security_level = may smtp_tls_CApath = /etc/postfix/cert smtp_tls_session_cache_timeout = 3600s smtp_tls_loglevel = 1 tls_random_source = dev:/dev/urandom smtp_use_tls = yes my /etc/postfix/sasl_passwd file contains the following : smtp.gmail.com agnello.dso...@gmail.com:mypassword123 my /etc/postfix/cert/ contains ll /etc/postfix/cert/ total 8 lrwxrwxrwx 1 root root 31 2010-11-14 04:39 709afd2b.0 -> Thawte Personal Freemail CA.pem -rw-r--r-- 1 root root 1202 2010-11-14 03:26 Thawte Personal Freemail CA.pem I am trying to send a mail from agne...@exapmple.com to agnello.dso...@gmail.com and have success [r...@localhost cert]# telnet localhost 25 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 220 mail.server.com ESMTP Postfix ehlo data 250-mail.server.com 250-PIPELINING 250-SIZE 10240000 250-VRFY 250-ETRN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN mail from: agne...@example.com 250 2.1.0 Ok rcpt to: agnello.dso...@gmail.com 250 2.1.5 Ok data 354 End data with <CR><LF>.<CR><LF> test data . 250 2.0.0 Ok: queued as EB595430B quit 221 2.0.0 Bye Connection closed by foreign host. in /var/log/mailllog it shows success sent Nov 14 04:43:22 localhost postfix/smtpd[16035]: EB595430B: client=localhost.localdomain[127.0.0.1] Nov 14 04:43:37 localhost postfix/cleanup[16047]: EB595430B: message-id=<20101113231322.eb5954...@mail.server.com> Nov 14 04:43:37 localhost postfix/qmgr[15997]: EB595430B: from=<agne...@example.com>, size=355, nrcpt=1 (queue active) Nov 14 04:43:38 localhost postfix/smtp[16050]: setting up TLS connection to smtp.gmail.com[74.125.155.109]:587 Nov 14 04:43:39 localhost postfix/smtp[16050]: Trusted TLS connection established to smtp.gmail.com[74.125.155.109]:587: TLSv1 with cipher RC4-MD5 (128/128 bits) Nov 14 04:43:39 localhost postfix/smtpd[16035]: disconnect from localhost.localdomain[127.0.0.1] Nov 14 04:43:42 localhost postfix/smtp[16050]: EB595430B: to=<agnello.dso...@gmail.com>, relay=smtp.gmail.com[74.125.155.109]:587, delay=37, delays=32/0.04/3/1.9, dsn=2.0.0, status=sent (2502.0.0 OK 1289682852 w22sm6055097wfd.7) Nov 14 04:43:42 localhost postfix/qmgr[15997]: EB595430B: removed however when i receive mail on my gmail-login my header information is as follows ; ----------------------------------------- from agnello.dso...@gmail.com to date Sun, Nov 14, 2010 at 4:43 AM mailed-by gmail.com test data -------------------------------------------- the "from address" show the same email id mentioned in sasl_passwd file ( agnello.dso...@gmai.com ) .. instead of agne...@example.com and the "to address" shows empty the "show original headers" of this mail in gmail is as follows ----------------------------------------------------- Return-Path: <agnello.dso...@gmail.com> Received: from mail.server.com (triband-mum-59.184.162.117.mtnl.net.in [59.184.162.117]) by mx.google.com with ESMTPS id w22sm6055097wfd.7.2010.11.13.13.14.10 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 13 Nov 2010 13:14:11 -0800 (PST) Received: from data (localhost.localdomain [127.0.0.1]) by mail.server.com (Postfix) with ESMTP id EB595430B for <agnello.dso...@gmail.com>; Sun, 14 Nov 2010 04:43:05 +0530 (IST) Message-Id: <20101113231322.eb5954...@mail.server.com> Date: Sun, 14 Nov 2010 04:43:05 +0530 (IST) From: agnello.dso...@gmail.com To: undisclosed-recipients:; test data --------------------------------------------------------------------- Could some one please help me as to why gmail will change the header information from what i originally sent . . Thanks a million -- Regards Agnello D'souza