LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 04-30-2012, 08:43 PM   #1
bdobolina
LQ Newbie
 
Registered: Aug 2010
Posts: 2

Rep: Reputation: 0
Postfix SMTP relay via gmail using original sender email address?


I followed the HOWTO here http://www.howtoforge.com/postfix_re...her_mailserver to setup a postfix server to relay email through my gmail account, but it's rewriting the sender address to the gmail account.

How do you setup postfix to relay mail through gmail without having the sender address rewritten and keep the original sender FROM: address intact?

Code:
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = server01
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases

# The domain that is appended to any address that does not have a domain.
myorigin = /etc/mailname

# List of domains that this mail system considers local.
mydestination = server01, localhost.localdomain, localhost

relayhost = [smtp.gmail.com]:587
mynetworks = 10.88.254.0/24 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all

##### client TLS parameters #####
smtp_tls_loglevel=1
smtp_tls_security_level=encrypt
smtp_tls_CAfile = /etc/postfix/cacert.pem
smtp_use_tls = yes
smtp_sasl_auth_enable=yes
smtp_sasl_password_maps=hash:/etc/postfix/sasl/passwd
smtp_sasl_security_options = noanonymous
smtp_always_send_ehlo = yes
 
Old 05-01-2012, 01:55 AM   #2
Raum the Old
LQ Newbie
 
Registered: Jul 2008
Location: Southern California
Distribution: Debian, Ubuntu
Posts: 22

Rep: Reputation: 3
unpossible

Quote:
Originally Posted by bdobolina View Post
I followed the HOWTO here http://www.howtoforge.com/postfix_re...her_mailserver to setup a postfix server to relay email through my gmail account, but it's rewriting the sender address to the gmail account.

How do you setup postfix to relay mail through gmail without having the sender address rewritten and keep the original sender FROM: address intact?
You can't. Postfix can't do anything about this. This is just the way Gmail works.
 
Old 05-01-2012, 05:12 AM   #3
KenJackson
Member
 
Registered: Jul 2006
Location: Maryland, USA
Distribution: Fedora, Arch
Posts: 572

Rep: Reputation: 64
Thanks for the how-to. I'll have to have a closer look at that.

But why use gmail? I send my email through my ISP (Verizon) with various valid "From:" email addresses. Probably most ISPs will allow that.
 
Old 05-01-2012, 05:28 AM   #4
descendant_command
Member
 
Registered: Mar 2012
Posts: 757

Rep: Reputation: 159Reputation: 159
It used to be settable in your gmail account settings, but I haven't checked out gmail in some time and their policy may have changed.
 
Old 05-01-2012, 06:21 AM   #5
scrooge_74
LQ Newbie
 
Registered: Feb 2006
Location: The third world
Distribution: Lenny
Posts: 10

Rep: Reputation: 0
use a service like dynDNS to relay your mails , i used to do it when my ip was a home one so everybody blocked my mails as possible spam.

Last edited by scrooge_74; 05-01-2012 at 06:23 AM.
 
  


Reply

Tags
gmail, postfix, relay, smtp


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix: Rewriting sender email address from ldap lookups endfx Linux - Server 3 04-18-2008 03:53 PM
Command line pop3/gmail email sender Maverick1182 Linux - Newbie 2 03-02-2008 01:08 AM
Why is PostFix sending mail using the email address of the smtp account? taigon Linux - Server 34 02-09-2007 01:09 AM
postfix relay thru gmail NeptunEz Linux - Networking 17 12-09-2006 09:10 AM
Postfix, relay sender restriction barghota Linux - Software 1 09-13-2006 02:24 PM


All times are GMT -5. The time now is 10:21 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration