[SOLVED] Re: postfix + gmail
And, of course, half an hour after giving up and asking for help, I discovered what I needed to change. I did a "journalctl | grep smtp" and noticed that, when my machine was connecting to gmail, it seemed to be doing so on port 25. Aha! So I changed my transport file explicitly to use port 587 when connecting to smtp.googlemail.com, reloaded everything and now it works. (Slightly in my defence, I had briefly pondered the question of port number earlier this morning, but, since I hadn't seem any mention of it in my reading of solutions to this problem, I figured that the fact that I had enabled auth in the main.cf file must mean that postfix was automagically going to use port 587 instead of port 25. Now I know better.) Doc -- Web: http://enginehousebooks.com/drevans
Re: postfix + gmail
Hello. Do you have "relayhost" set to gmail SMTP server? https://www.postfix.org/postconf.5.html#relayhost Did you call postmap(1) to build password file? http://www.postfix.org/postmap.1.html Here are a couple of tutorials: http://postfix.cs.utah.edu/SOHO_README.html#client_sasl_enable https://stafwag.github.io/blog/blog/2018/03/04/postfix-smarthost-with-authentication/ The best place to ask postfix questions is postfix mail list: https://www.postfix.org/lists.html Postfix developers answer there. You can try to debug and increase logging : https://www.postfix.org/DEBUG_README.html On Fri, Jun 3, 2022 at 10:19 PM D. R. Evans wrote: > I am trying to configure postfix correctly to send e-mail to a gmail.com > account, using my gmail credentials. > > 1. It all works fine if I use Thunderbird, with the following > configuration: >server name: smtp.googlemail.com >port:587 >Connection security: STARTTLS >Authentication method: normal password >username: doc.ev...@gmail.com > and the password set to my gmail password. > > That, in fact, is the method that I am using to post this e-mail to the > reflector. > > 2. But when I try to duplicate that with postfix, I receive the following > error: > > > : host smtp.googlemail.com[142.250.138.16] said: > 530-5.7.0 > > Authentication Required. Learn more at 530 5.7.0 > > https://support.google.com/mail/?p=WantAuthError > > e12-20020a9d490c00b0060b6facd5e4sm4170514otf.29 - gsmtp (in > reply to > > MAIL FROM command) > > I have spent most of the morning following various Internet threads > related to > this error, and making many variations to my postfix configuration, but > without success. > > FWIW, here are the relevant parts of my current postfix configuration, and > it > generates the error message quoted above (I am running debian stable): > > in main.cf: > >smtp_sasl_auth_enable = yes >smtp_sasl_password_maps = hash:/etc/postfix/sasl/sasl_passwd >smtp_sasl_security_options = >smtp_sasl_type = cyrus >smtp_use_tls = yes >smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt > > in sasl_passwd: > >[smtp.googlemail.com]:587 doc.ev...@gmail.com: > > I did check that the password matches exactly the password in Thunderbird. > > So if some postfix guru could enlighten me as to what I need to change, > I'd be > very grateful. > >Doc > > -- > Web: http://enginehousebooks.com/drevans > >
postfix + gmail
I am trying to configure postfix correctly to send e-mail to a gmail.com account, using my gmail credentials. 1. It all works fine if I use Thunderbird, with the following configuration: server name: smtp.googlemail.com port:587 Connection security: STARTTLS Authentication method: normal password username: doc.ev...@gmail.com and the password set to my gmail password. That, in fact, is the method that I am using to post this e-mail to the reflector. 2. But when I try to duplicate that with postfix, I receive the following error: : host smtp.googlemail.com[142.250.138.16] said: 530-5.7.0 Authentication Required. Learn more at 530 5.7.0 https://support.google.com/mail/?p=WantAuthError e12-20020a9d490c00b0060b6facd5e4sm4170514otf.29 - gsmtp (in reply to MAIL FROM command) I have spent most of the morning following various Internet threads related to this error, and making many variations to my postfix configuration, but without success. FWIW, here are the relevant parts of my current postfix configuration, and it generates the error message quoted above (I am running debian stable): in main.cf: smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl/sasl_passwd smtp_sasl_security_options = smtp_sasl_type = cyrus smtp_use_tls = yes smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt in sasl_passwd: [smtp.googlemail.com]:587 doc.ev...@gmail.com: I did check that the password matches exactly the password in Thunderbird. So if some postfix guru could enlighten me as to what I need to change, I'd be very grateful. Doc -- Web: http://enginehousebooks.com/drevans
postfix / gmail
Hi I've been trying vainly to get my home server which uses dynamic DNS to send mail externally via my gmail account. Gave up on exim4, the config of postfix seems clearer in general. Obviously SMTP auth is required, and I don't want my password being sent in the clear. I have most config done, am connecting OK , but not authenticating. Here's what I get in the logs: Sep 4 22:36:33 localhost postfix/smtp[2691]: certificate verification failed for gmail-smtp.l.google.com: num=20:unable to get local issuer certificate Sep 4 22:36:33 localhost postfix/smtp[2691]: certificate verification failed for gmail-smtp.l.google.com: num=27:certificate not trusted Sep 4 22:36:33 localhost postfix/smtp[2691]: certificate verification failed for gmail-smtp.l.google.com: num=21:unable to verify the first certificate Sep 4 22:36:33 localhost postfix/smtp[2691]: Server certificate could not be verified So I guess this means that my postfix is trying to authenticate the gmail server and failing, right? I have the gmail and thawte certs in ~root/.cert and they check out ok with the command: openssl s_client -connect pop.gmail.com:995 -CApath .certs So does this mean that postfix cannot find them? I did run c_rehash .certs as root, it did seem to work. Am I on the right track as to what the problem is? Any help or pointers much appreciated. regards Daniel -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]