postfix + gmail + multiusers
\ Scott Andreas (14 Jun 2007)
. \ Charles Marcus (15 Jun 2007)

2 msgstrange question regarding lmtp
3 msgUpdated amavisd-new; can't send/receive mail
8 msgRPM 'n stuff
7 msgDSN setup
4 msgLocal Users on Virtual Domains?
5 msgpostfix + courier + active directory 2003
12 msgFail to test postfix
2 msgGlobal groups
7 msgAbout creating database
3 msgMisunderstanding of transport map format VS mas...
2 msgProblems Backscatter
5 msgquestion about receive_override_options
4 msgspecific whitelisting
3 msgReal unknown host ???
2 msgAnother question about logs...
4 msgfallback_relay not getting used
3 msgMaildir
6 msgOutgoing Mail Copy
1 msgClose to getting SASL and SMTP AUTH on OS X wor...
Subject:postfix + gmail + multiusers
Group:Postfix-users
From:Scott Andreas
Date:14 Jun 2007


 
Hello users,

I'm new to postfix coming as a long time user of sendmail (arg!!)

Want I am trying to do is setup postfix for multiple users to be able to
relay
through gmail that is recieving my mail for my domain.

myowndomain.com mail is handled by 20 ASPMX2.GOOGLEMAIL.com.
myowndomain.com mail is handled by 20 ASPMX3.GOOGLEMAIL.com.
myowndomain.com mail is handled by 20 ASPMX4.GOOGLEMAIL.com.
myowndomain.com mail is handled by 20 ASPMX5.GOOGLEMAIL.com.
myowndomain.com mail is handled by 0 ASPMX.L.GOOGLE.com.
myowndomain.com mail is handled by 10 ALT1.ASPMX.L.GOOGLE.com.
myowndomain.com mail is handled by 10 ALT2.ASPMX.L.GOOGLE.com.

I've successfully set a basic postfix MTA to relay for a single user to
gmail and
just do a simple relay to smtp.gmail.com.

Now I want to relay to gmail which host my mx for my domain, I want the
domain
to handle multiple users. In essence I want to use postfix to relay to my
mx at
gmail and have the recipients email read user instead of
user as I had it set up before.

I'm using Ubuntu 6.10
postfix 2.3.3

My main.cf

# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

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

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

# SMTP restrictions before accepting mail for users
#smtp_helo_restrictions = reject_unknown_helo_hostname
#smtpd_sender_restrictions = reject_unknown_sender_domain
#smtpd_data_restrictions = reject_unauth_pipelining


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

## TLS Settings
#
# For no logs set = 0
smtp_tls_loglevel = 1
#
# smtp_enforce_tls = yes
# Above is commented because doing it site by site below
smtp_tls_per_site = hash:/etc/postfix/tls_per_site
#
smtp_tls_CAfile = /etc/postfix/cacert.pem
smtp_tls_cert_file = /etc/postfix/FOO-cert.pem
smtp_tls_key_file = /etc/postfix/FOO-key.pem
smtp_tls_session_cache_database = btree:/var/run/smtp_tls_session_cache
smtp_use_tls = yes
smtpd_tls_CAfile = /etc/postfix/cacert.pem
smtpd_tls_cert_file = /etc/postfix/FOO-cert.pem
smtpd_tls_key_file = /etc/postfix/FOO-key.pem
smtpd_tls_received_header = yes
smtpd_tls_session_cache_database = btree:/var/run/smtpd_tls_session_cache
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom

## SASL Settings
# This is going in to THIS server
smtpd_sasl_auth_enable = no
# We need this
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
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

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

# Server hostname and domain name
myhostname = mail.myowndomain.com
mydomain = myowndomain.com

# Our Virtual users and aliases tables
virtual_mailbox_base = /
virtual_mailbox_maps = hash:/etc/postfix/virt_users
virtual_alias_maps = hash:/etc/postfix/virt_aliases

# Local Recipients maps
local_recipient_maps =
$virtual_mailbox_maps,
$virtual_alias_maps,
$transport_maps,
unix:passwd.byname

# Our local users map
alias_maps = hash:/etc/postfix/aliases
alias_database = hash:/etc/postfix/aliases

# Server Information
myorigin = /etc/mailname
mydestination =
mail.myowndomain.com,
myowndomain.com,
lexi.myowndomain.com,
localhost.myowndomain.com,
localhost

# Gmail Relay
relayhost = smtp.google.com

#Allowable LAN clients/servers
mynetworks = 127.0.0.0/8 192.168.0.0/24

#client settings
mailbox_size_limit = 0
recipient_delimiter = +
disable_dns_lookkups = yes

# Great New feature Address Mapping
# for example may mchirico@localhost to mchirico
smtp_generic_maps = hash:/etc/postfix/generic
#
# Transport maps
transport_maps = hash:/etc/postfix/transport


my /etc/postfix/sasl_passwd file has...
[smtp.gmail.com]:587 user:mypassword

my /etc/postfix/generic file has...
user user

my /etc/postfix/transport file has...
* smtp:[smtp.gmail.com]:587


when I add more users to transport
[smtp.gmail.com]:587 user2:mypassword2
[smtp.gmail.com]:587 user3:mypassword3

I have an errors.

my master.cf has...

smtp unix - - n - - smtp
relay unix - - - - - smtp
-o smtp_generic_maps=


Any suggestions are very helpful

Thank you

Scott




© 2004-2008 readlist.com