* Aosars Repository via Postfix-users <postfix-users@postfix.org>:
> Hi all,
> I have installed postfix on Ubuntu server 22 and configured to use gmail
> smtp.But it fails to send mails.

The log should inform you why it's failing.

I have a config snippet here:

main.cf:

smtp_use_tls=yes

relayhost = smtp.gmail.com:587
# we want to relay all mails via smtp.gmail.com (port 587)

smtp_sasl_auth_enable = yes
# we need username password for that

smtp_sasl_password_maps = hash:/etc/postfix/sasl_password_maps
# username password are stored in /etc/postfix/sasl_password_maps

/etc/postfix/sasl_password_maps contains:

smtp.gmail.com
my-gmail-addr...@gmail.com:theapplicationspecificpasswordforthisserver

-- 
Ralf Hildebrandt
  Geschäftsbereich IT | Abteilung Netzwerk
  Charité - Universitätsmedizin Berlin
  Campus Benjamin Franklin
  Hindenburgdamm 30 | D-12203 Berlin
  Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
  ralf.hildebra...@charite.de | https://www.charite.de
            
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to