Can't send mail from my server (Ubuntu14 / mailinabox) to gmail - filter

I have an issue with my mail server on Digital Ocean. My mail server works on the “Mail in a box” app. Each time, when I tried to sent mail to, for example: some#gmail.com I had the same response:
Undelivered Mail Returned to Sender
From
MAILER-DAEMON#mail.sporta.io
This is the mail system at host mail.sporta.io.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The mail system
<denis.rohlinsky#gmail.com>: host gmail-smtp-in.l.google.com[108.177.126.27]
said: 550-5.7.1 This message does not have authentication information or
fails to pass 550-5.7.1 authentication checks. To best protect our users
from spam, the 550-5.7.1 message has been blocked. Please visit 550-5.7.1
https://support.google.com/mail/answer/81126#authentication for more 550
5.7.1 information. v27si4529334edm.111 - gsmtp (in reply to end of DATA
command)
Reporting-MTA: dns; mail.sporta.io
X-Postfix-Queue-ID: 83217200D6
X-Postfix-Sender: rfc822; admin#sporta.io
Arrival-Date: Fri, 1 Feb 2019 20:27:51 +0100 (CET)
Final-Recipient: rfc822; denis.rohlinsky#gmail.com
Original-Recipient: rfc822;denis.rohlinsky#gmail.com
Action: failed
Status: 5.7.1
Remote-MTA: dns; gmail-smtp-in.l.google.com
Diagnostic-Code: smtp; 550-5.7.1 This message does not have authentication
information or fails to pass 550-5.7.1 authentication checks. To best
protect our users from spam, the 550-5.7.1 message has been blocked. Please
visit 550-5.7.1
https://support.google.com/mail/answer/81126#authentication for more 550
5.7.1 information. v27si4529334edm.111 – gsmtp
Subject
test
From
admin#sporta.io
To
denis.rohlinsky#gmail.com
Date
Today 21:27
P.S. I checked my server via another services (sent message to mail.io, mail.com, mail.ru)
and it worked correctly. I can send mails to this services without any problems, but gmail continues to block my mail. What do I need to resolve this issue?
to send mail to mail.com, mail.ru successfully
to receive my messages from gmail

Register the sending email address with Gmail and wait for it to be authenticated. Gmail will accept mail only from gmail addresses or addresses known to be associated with a Gmail account.

As Juan mentioned in his reply here, you would probably need to add required DNS TXT records. Alternatively, you could look into the Google Postmaster Tools. It might shed some light on the issue at hand.

Emails without authentication often get rejected or marked as spam to protect recipients from phishing scams. Unauthenticated emails with attachments might get completely rejected for security reasons.
To ensure Gmail can authenticate you:
Send from the same IP address
Keep valid reverse DNS records your IP address that point to your domain
Choose the same address in the 'From:' header for every bulk message
For mail.sporta.io Reverse DNS Resolution - No PTR Record found.
For dmarc:sporta.io DNS Record not found.
For spf:sporta.io DNS Record not found.

Related

Expected response code "250" but got code "550", with message "550-Requested action not taken: mailbox unavailable 550 Sender address has null MX"

I have a Laravel 9.x site that I'm hosting on IONOS (shared-hosting).
In my site, I utilize mail a lot. So I'm sending mails to my customer frequently. While developing the system - I was using MailTrap.io - but for deployment, I need all the mails to go to my IONOS Mail Account i.e info#domain.com - for that, I need to use IONOS' Mail Configuration.
Following is my mail config (censoring out private info):
MAIL_MAILER=smtp
MAIL_HOST=smtp.ionos.com
MAIL_PORT=587
MAIL_USERNAME=############.com
MAIL_PASSWORD=################
MAIL_ENCRYPTION=tls
MAIL_FROM_NAME="${APP_NAME}"
MAIL_FROM_ADDRESS=#############.com
This is the error I'm getting:
This is the piece of manual documentation I got from IONOS' Dashboard:
How do I fix this? What is causing this issue? Like I mentioned before, all of it was working fine with MailTrap.io - so I'm really curious what am I doing wrong.
Thank you :)
As per ionos.com documentation
550 Sender address has null MX
The domain from which you send email has a configured No Service MX record (zero MX). The IONOS SMTP recipient rejects such emails
Delete the No Service MX entry in the DNS settings of your domain. For more information about a No Service MX entry, see RFC 7505.

email verification and forgot password being tag as spam in Laravel 8

I upload my app on siteground. I ask them already a bunch of question regarding this issue and they just gave me links to their tech articles, followed them but still doesn't work. I been searching for an answer for too long. I hope you can suggest a procedure or help me to fix this.
The issue I am having is the email verification and forgot password is being sent to spam section or in some other instance it is blocked due to security reason.
here's the bounce email I am receiving
This message was created automatically by mail delivery software.
A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:
user#gmail.com
host outbound.mailspamprotection.com [xx.xxx.xxx.xx]
SMTP error from remote mail server after end of data:
550 This message has been reported as spam by other users.
Reporting-MTA: dns; xxxxxxx.siteground.xxxxxx
**Action:** failed
**Final-Recipient:** rfc822;user#gmail.com
**Status:** 5.0.0
**Remote-MTA:** dns; outbound.mailspamprotection.com
**Diagnostic-Code:** smtp; 550 This message has been reported as spam by other users.
MESSAGE HEADER
**Return-path:** <>
**Envelope-to:** serveremail#mysite.com
**Delivery-date:** Fri, 26 Nov 2021 19:16:44 +0000
**Received:** from mailnull by xxxxxxxx.siteground.xxxxxx with local (Exim 4.90-.1)
id 1mqgiC-000Aqa-Ln
for serveremail#mysite.com; Fri, 26 Nov 2021 19:16:44 +0000
**X-Failed-Recipients:** user#gmail.com
**Auto-Submitted:** auto-replied
**From:** Mail Delivery System <Mailer-Daemon#sgp1000.siteground.asia>
**To:** serveremail#mysite.com
**References:** <f1bb46cdbbacd8db694337f14ad1fafc#127.0.0.1>
**Content-Type:** multipart/report; report-type=delivery-status; boundary=1637954204-eximdsn-1244935018
**MIME-Version:** 1.0
**Subject:** Mail delivery failed: returning message to sender
**Message-Id:** <E1mqgiC-000Aqa-Ln#sgp1000.siteground.asia>
**Date:** Fri, 26 Nov 2021 19:16:44 +0000
here's what I have in my env file
MAIL_DRIVER=smtp
MAIL_PORT=465
MAIL_HOST=xxxxxxx.siteground.xxxxxx
MAIL_USERNAME=serveremail#site.com
MAIL_PASSWORD='mypassword'
MAIL_ENCRYPTION=ssl
MAIL_FROM_ADDRESS=serveremail#site.com
MAIL_FROM_NAME='my app name'
I have other notification functions my app that notify/email the admins. It triggers when some certain actions are made like if there's new application etc. those notifications are being sent to inbox and not in spam.
Any suggestions? or links with really working steps that I can follow? Any suggestions will be very much appreciated.
Thank you!

trouble with sending mail with Spring mail through somain registrar 1and1 smtp

I'm trying to send an email from a spring boot application with spring mail (1.5.8.RELEASE) JavaMailSender
sending through gmail SMTP is fine. however sending email through my domain registrar's amtp (registrar name- 1and1, in case someone already worked this out) is not working.
I'm getting this error, which imo - is more generic than useful:
com.sun.mail.smtp.SMTPSenderFailedException: 550-Requested action not taken: mailbox unavailable
550 invalid DNS MX or A/AAAA resource record
domain I'm sending through is bank.org, and has this DNS settings:
bank.org. 3600 IN A 178.79.161.205
bank.org. 3600 IN MX 11 mx01.1and1.com.
bank.org. 3600 IN MX 10 mx00.1and1.com.
the issue is, I'm able to send emails to gmail with the settings specified in this guide:
http://www.baeldung.com/spring-email
these are settings to send with gmail:
spring.mail.host=smtp.gmail.com
spring.mail.port=587
spring.mail.username=<login user to smtp server>
spring.mail.password=<login password to smtp server>
spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.starttls.enable=true
However when i try to send messages via my registrar these settings are not successful:
spring.mail.host=smtp.1and1.com
spring.mail.port=587
spring.mail.username=username
spring.mail.password=password
spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.starttls.enable=true
thew issue is - I am able to connect to the 1and1 SMTP using thunderbird email client. so I know the credentials are working.
I guess what I need is to find out a way to detect the correct settings because the support team can't assist with issues related to sending email programmatically from spring mail
the cause of the issue was - I didn't programmatically set the sender field (The "From" field) in my outgoing message
Once i set the From field the issue was resolved.
unfortunately the response from 1and1's SMTP was irrelevant ("550 invalid DNS MX or A/AAAA resource record")
Hope this helps anyone

Mandrill for outgoing mail in a mail client

I'm using Mandrill for my transaction email needs and it works great. Unfortunately very often when I send emails via my email client the emails go to the recipients spam folder.
Is there a way to use Mandrill for outgoing emails via a mail client (such as Apple Mail or Thunderbird)?
You can use the Mandrill's Outgoing Server (SMTP) Setting in the MailClient of your choice.
SMTP Settings
Outgoing Server: smtp.mandrillapp.com
Outgoing Server Port: 587
Auth Required: True
TLS: True
Username: complete email-id
Changing the MailClient is not probably going to mark your mails as legitimate.
There are multiple reasons for mail going to spam folder of recipient like:
Mandrill's IP address got blacklisted in recipient's SMTP (MX) server.
Your mail contains some links or content which is recognized as suspicious and hence recipient marks such mails as spam.
In short, mail getting marked as spam depends upon:
Sender SMTP server's reputation.
Sender's mail content.
Receiving SMTP (MX) (i.e recipient's) server business logic for mail classification.

Help with problem using mail in ruby

The error that I get is:
Net::SMTPFatalError: 550 5.7.1 Unable to relay for you#test.lindsaar.net
I am using mail-2.3.0
With Ruby 1.9
on windows XP.
The exact code I used is:
require 'rubygems'
require 'mail'
Mail.deliver do
from 'me#test.lindsaar.net'
to 'you#test.lindsaar.net'
subject 'Here is the image you wanted'
end
I don't understand what I am missing. Thanks for your help.
The error message comes from your SMTP server. Although this message can have many causes, it is most likely you forgot to provide the necessary authentication data to your SMTP server.
Taken from http://www.eudora.com/techsupport/kb/1593hq.html:
Most Internet Service Providers restrict access to their outgoing mail
servers to prevent SPAM from being sent through their mail servers. If
you are getting the "550 Relay Denied" error message, the outgoing
mail server cannot verify who you are and will not allow you to send
mail.
To configure Mail you have to prepare your own SMTP connection. See https://github.com/mikel/mail/wiki/Sending-email-via-google-smtp for an example.
You can get your username/password from your ISP (the one providing the SMTP server)

Resources