* Aosars Repository via Postfix-users <[email protected]>:
> 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
[email protected]: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
  [email protected] | https://www.charite.de
            
_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to