XF 2.0 No longer able to send emails

I have a new forum that I'm having email problems with. Initially, I tried setting it up using the 'Default' transport method, but emails were not getting sent despite the test outbound emails showing as having been successful in XF. So, I tried to set it up via SMTP instead. I got a G-Suite account set up with my domain, and eventually figured out how to get emails to be sent after configuring the MX settings on my Digital Ocean server. However, yesterday, emails stopped being sent. I did some investigating, and Google started blocking my server as an "Unknown Device". I logged into my Gsuite account and clicked on 'Yes, this is me' for that login, then I also turned on the 'Enable Access From Less Secure Apps' option in my Gsuite account. But my emails still aren't being sent out.

Oh, and there is nothing at all inside my /var/mail/ folder on the server.

I'm not committed to using Gsuite, and am open to any suggestions that might be better for me. Ultimately, my needs will probably be for my server to be able to send up to 20k email notifications per day, and for it to send emails without delays, as many of these email notifications will need to be sent to hundreds of users at the same time if possible.

I have not tried any other options. I was reading something about using Postfix, but I'm new to this stuff and don't really know anything about it or what my other options are or what the pros and cons of each one might be.

Any help you can provide would be appreciated. Thank you in advance.
 
I just spent an hour on the phone with google support. They double checked my "Less secure apps" settings, and had me try to set up my emails using smpt.gmail.com on port 465 with SSL, as well as asmptx.l.google.com on port 25 with no authentication, and smtp-relay.gmail.com on port 587 with TLS. None of these worked. I kept getting timeout errors.

Again, my email was working before they blocked my server as "unauthorized access". However, they are telling me that my server is not being blocked and that there is nothing wrong on their end and that my issue must be somewhere else...

The only other change I made since then was adding IPv6 to my digital ocean droplet.

I'm not sure what to do from here. The lack of support for getting emails working properly is frustrating.
 
Is the SMTP port open on the server? For testing, try something like this: https://mailtrap.io/

If that works, then perhaps find a new provider? Doesn't Google have sending limits using the G-Suite I thought? I would recommend Sparkpost or Amazon SES.
 
You can plug this into the XF settings, with your Username/Password:

mailtrap settings.webp

It's still likely a port issue on your server I'm guessing. I had to open a port on a Ubuntu dev box when testing SMTP awhile back ago.
 
I decided to set up Postfix with my server to see if I could route emails a different way, and after some reading I figured I should have set up Postfix anyhow. Once I did that, I was able to find my mail.log file on the server and I discovered that my emails are being blocked due to a 550-5.7.1 error because I am now listed on the SEM FRESH blacklist somehow. I am convinced that this was google that listed me there when they blocked my IP address as an "Unknown device". The timing of the two coinciding is too coincidental.

Here is the error from my mail log:

Feb 5 19:59:27 chipdonkey postfix/smtp[13321]: 9651D42A71: to=<username@gmail.com>, relay=gmail-smtp-in.l.google.com[108.177.98.27]:25, delay=30, delays=0/0/30/0.17, dsn=5.7.1, status=bounced (host gmail-smtp-in.l.google.com[108.177.98.27] said: 550-5.7.1 [159.89.141.223 1] Our system has detected an unusual rate of 550-5.7.1 unsolicited mail originating from your IP address. To protect our 550-5.7.1 users from spam, mail sent from your IP address has been blocked. 550-5.7.1 Please visit 550-5.7.1 https://support.google.com/mail/?p=UnsolicitedIPError to review our 550 5.7.1 Bulk Email Senders Guidelines. m9si5063598pfh.319 - gsmtp (in reply to end of DATA command))
 
You can plug this into the XF settings, with your Username/Password:

View attachment 168230

It's still likely a port issue on your server I'm guessing. I had to open a port on a Ubuntu dev box when testing SMTP awhile back ago.


Thank you, this is a great resource! When I enter my SMTP credentials from mailtrap.io everything goes through perfectly. I tried both port 25 and 465 with and without encryption.

It looks like my ports are open. I made an exception for Postfix in my UFW firewall setup in Ubuntu, and these test emails are coming through.
 
If mailtrap is working ok, then it's something with your GSuite configuration. I would recommend Sparkpost or Amazon SES to send emails via SMTP. I use both (for different sites), and have zero complaints.
 
Top Bottom