Asif Iqbal wrote:
Hi All
All my email gets relayed thru gmail as it should. But how do I tell
it to send all localemails to local spool and not send it to gmail?
My laptop does not have any valid domain
My postfix configured like this
iqb...@ghar-iqbala:~$ postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
inet_interfaces = all
mailbox_size_limit = 0
mydestination = ghar, ghar-iqbala, localhost.localdomain, localhost
myhostname = ghar-iqbala
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
readme_directory = no
recipient_delimiter = +
relayhost = [smtp.gmail.com]:submission
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl/passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_type = cyrus
smtp_tls_security_level = encrypt
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
Until somebody gives you a better answer, look at the "transport" file ...
"In order to deliver internal mail directly, while using a mail relay
for all other mail, specify a null entry for internal destinations (do
not change the delivery transport or the nexthop information) and
specify a wildcard for all other destinations.
my.domain :
.my.domain :
* smtp:outbound-relay.my.domain
you have an internal domain even if it's not specified. you might want
to specify it formally to make it clearer in the transport map. Use
something like iqbal, so your machine (myhostname) becomes
ghar-iqbala.iqbal (please forgive any unintended cultural mistakes!).
Your file would probably look something like ...
iqbal :
.iqbal :
* smtp:smtp.gmail.com
This way your local mail gets delivered locally, and everything else
goes through your relay domain.
Hope this helps.
j.