cannot send email from Postfix to gmail
-
hello everybody
i have freePBX installed and i want it to send me notification (voicemails), after some researches i learned that i have to change this file in CentOS : /etc/postfix/main.cf, and because i don't have a SMTP server locally i decided to use gmail SMTP server like this howto : https://charlesauer.net/tutorials/centos/postfix-as-gmail-relay-centos.php
but when i try to send an email for testing by using this command : mail myemail@gmail.com, after i check my mailBox i receive an email telling that : Sign-in attempt prevented, and it is a one time email, i meant i receive it only one time no matter how much try i did.the log show :
Aug 20 15:59:19 localhost postfix/pickup[12173]: 46732812CC: uid=0 from=<root>
Aug 20 15:59:19 localhost postfix/cleanup[13616]: 46732812CC: message-id=20150820125919.467312CC@sip.gmail.com
Aug 20 15:59:19 localhost postfix/qmgr[1537]: 46732812CC: from=root@sip.gmail.com, size=424, nrcpt=1 (queue active)
Aug 20 15:59:20 localhost postfix/smtp[13618]: connect to smtp.gmail.com[2a00:1450:400c:c07::6c]:587: Network is unreachable
Aug 20 15:59:21 localhost postfix/smtp[13618]: 46732812CC: SASL authentication failed; server smtp.gmail.com[64.233.166.109] said: 534-5.7.14 <https://accounts.google.com/ContinueSignIn?sarp=1&scc=1&plt=AKgnsbvWI?534-5.7.14 zj2YGfQmgucVnJ9HrAFC6WCVSVHuyHESaYNUzIvrIqjfpm6SIzzvi4DLXnnxRd6KBOTIJj?534-5.7.14 kVTPzfD4joq3D9Q2v9KMxWGG4My_L8IVth64qZ-efP_oYhiX5wHubqUGfW0Od?534-5.7.14 1kRNMOkJvETTEHiGp8VBBhsxdhK_KIJL4slkDbDW3GQnIzn5TbZiqwEAiqQM71ZIK5WFJ2?534-5.7.14 Q2qVlbe07cy23exyVrRGy7IPWc68> Please log in via your web browser and?534-5.7.14 then try again.?534-5.7.14 Learn more at?534 5.7.14 https://support.google.com/mail/answer/78754 pg5sm5483950wjb.21 - gsmtp
Aug 20 15:59:22 localhost postfix/smtp[13618]: 46732812CC: to=myemail@gmail.com, relay=smtp.gmail.com[64.233.166.108]:587, delay=3.7, delays=0.07/0.11/3.5/0, dsn=4.7.14, status=deferred (SASL authentication failed; server smtp.gmail.com[64.233.166.108] said: 534-5.7.14 <https://accounts.google.com/ContinueSignIn?sarp=1&scc=1&plt=AKgnsbsdq?534-5.7.14 TDH6yoR9TG_mfOM1lKfZ2GjiTY-zT9bJNPIl_w17A1MikQyOHl3VtUQQYJeXdnZ?534-5.7.14 xEy0na_j8xpck2pWl1Fg0vvsxzFhD8EKjzrhthen9owvZkBvmjOq1S2A_7z8a5uZXI7OHK?534-5.7.14 0BY662sxzm65-9UDBTIcg4jlZFvKYpxkadVDFFzTsqqAP_G_mQyHWVBM6HIMVqu0lUQDG4?534-5.7.14 kMCuF6Bu6LhODY28beu--zXhFNo0> Please log in via your web browser and?534-5.7.14 then try again.?534-5.7.14 Learn more at?534 5.7.14 https://support.google.com/mail/answer/78754 ho10sm5457453wjb.39 - gsmtp) -
the one time message i get in my inbox is :
-
i want to highlight one important thing is the warning message i get is in my gmail account that exist in /etc/postfix/sasl_passwd not the recipient email """mail myemail@domain.com"""
-
I believe that there is a setting that you have to change in Gmail to lower the security settings.
-
do you know where is that setting in my gmail account??
-
Other than preventing SPAM, I've never understood why devices like this don't have their own SMTP mail server (actually I think they do, but don't seem to work as one might expect).
For example - why can't my Copy machine just send an email to any email server on the planet? Why does it need to forward the email to my email server, then my server forwards to whomever?
Did I answer my own question in the first sentence, because of SPAM?
-
@Dashrender said:
Did I answer my own question in the first sentence, because of SPAM?
Yup. All of those devices can send. Nearly nothing accepts it.
This goes back to our discussions about why trying to host your own email server is problematic. Didn't you state that you didn't have these problems?
-
I have devices like this send to us through whitelisting. If you don't whitelist it, any commercial SPAM filter will normally catch it.
-
@scottalanmiller said:
Didn't you state that you didn't have these problems?
I don't have these problems because I host my own email. Of course assuming I move to O365, then I will begin to have these problems.
-
@Dashrender said:
I don't have these problems because I host my own email. Of course assuming I move to O365, then I will begin to have these problems.
But you just said that you can't send out from these devices, which are each hosting your own email. You wanted to send to other people and couldn't, I thought.
-
@scottalanmiller said:
I have devices like this send to us through whitelisting. If you don't whitelist it, any commercial SPAM filter will normally catch it.
I too whitelist my internal devices for receiving/forwarding SMTP mail from these types of devices.
-
@Dashrender said:
For example - why can't my Copy machine just send an email to any email server on the planet?
This line. in one breath you are asking why you can't. In the next you are saying that you can.
-
When I host my own Postfix servers I can put in a lot of effort and get them to sometimes get mail accepted if I give each their own IP address, but it is not super reliable. Or I can send through our existing email infrastructure. But running each as its own is very problematic for reliable third party delivery.
-
@Dashrender said:
Of course assuming I move to O365, then I will begin to have these problems.
Why would you assume that?
-
anyone know how to solve this problem ??
-
how can i inform my gmail account to allow postfix to use it as a relay ??
-
Does this line tell us anything...
Aug 20 15:59:20 localhost postfix/smtp[13618]: connect to smtp.gmail.com[2a00:1450:400c:c07::6c]:587: Network is unreachable
Maybe there is a network error here? Test that port with telnet.
-
@scottalanmiller said:
@Dashrender said:
Of course assuming I move to O365, then I will begin to have these problems.
Why would you assume that?
Because of posts like this. Of course we could get lucky and things like this might be working better.
-
@Dashrender said:
Because of posts like this. Of course we could get lucky and things like this might be working better.
But this is about GMail. Did someone talk about Office 365, which is unrelated to Gmail.
-
@scottalanmiller said:
Does this line tell us anything...
Aug 20 15:59:20 localhost postfix/smtp[13618]: connect to smtp.gmail.com[2a00:1450:400c:c07::6c]:587: Network is unreachable
Maybe there is a network error here? Test that port with telnet.
can you explain what do you mean please