LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Most of the emails from my mail server are going into SPAM on gmail (https://www.linuxquestions.org/questions/linux-server-73/most-of-the-emails-from-my-mail-server-are-going-into-spam-on-gmail-4175665219/)

mfoley 12-01-2019 12:00 AM

Most of the emails from my mail server are going into SPAM on gmail
 
This has been happening a lot lately. When I send an email to someone with a gmail account it invariably goes into their SPAM. I tried this with a never-used gmail account of mine, sending from my own mail server novatec-inc.com, and it too went into SPAM. The reason given by gmail was, "Why is this message in spam? It is similar to messages that were identified as spam in the past." To whose "past" are they referring? Certainly not mine as this is the first email I've sent to that gmail account. I've posted a 'Support' message from my gmail account asking what the problem might be, but I've received no answer, and don't expect to.

Does anyone have any idea what I could look for to figure out why gmail considers me to be a SPAMmer? I need to sort this out because email is how I communicate to everyone, family, friends and customers.

scasey 12-01-2019 12:12 AM

Things to look at:
Does your mail server have a reverse DNS (rDNS)?
Is your mail server’s IP address a dynamic IP?
Is your mail server’s IP listed in any RBLs?
Look at the headers of the email received at gmail — are there any indications there of why it got marked as SPAM?

ondoho 12-01-2019 02:43 AM

In very crude layman terms - there's something like SSL certificates for mail (DKIM), and if your mail server doesn't have that, it's not "Trusted".
Adding to that a slight misconfiguration or unorthodox way of setting it all up, gmail will certainly see it as spam.

mfoley 12-02-2019 11:51 PM

Quote:

Originally Posted by scasey (Post 6063540)
Things to look at:
Does your mail server have a reverse DNS (rDNS)?
Is your mail server’s IP address a dynamic IP?
Is your mail server’s IP listed in any RBLs?
Look at the headers of the email received at gmail — are there any indications there of why it got marked as SPAM?

I do not have a reverse DNS:
Code:

$ host novatec-inc.com
novatec-inc.com has address 184.57.60.212
novatec-inc.com mail is handled by 10 novatec-inc.com.

$ host 184.57.60.212
212.60.57.184.in-addr.arpa domain name pointer cpe-184-57-60-212.columbus.res.rr.com.

where rr.com is RoadRunner (part of Spectrum/Time-Warner) and is my ISP and one of the SMART_HOST mail servers.

The IP address is Dynamic.

I checked my IP at https://whatismyipaddress.com/blacklist-check. Yes, it is listed at 3 blacklists: dnsbl.spfbl.net, dnsbl.sorbs.net, dul.dnsbl.sorbs.net. I'll have to investigate that. Last time I checked it wasn't my IP per se, but one of the roadRunner mail relays. My server is pretty secure. I'm sure no one is using me as an open relay, although spammers could certainly spoof my address. I monitor the log file and have spamassassin which I train regularly.

I am using TLS, but the cert was from cacert.org, which may not be recognized, and is expired anyway.

I suppose I really need to look into getting a static IP.
Quote:

Originally Posted by ondoho (Post 6063572)
In very crude layman terms - there's something like SSL certificates for mail (DKIM), and if your mail server doesn't have that, it's not "Trusted".
Adding to that a slight misconfiguration or unorthodox way of setting it all up, gmail will certainly see it as spam.

I do have DKIM set up. Sometimes it seems to validate, sometimes not. That's a separate question I've posted.

scasey 12-02-2019 11:56 PM

No rDNS
A dynamic IP
Listed in RBLs

Any one of these could (probably does) cause email to marked as SPAM.
On my server they’d cause the mail to be rejected (BOUNCed)

TenTenths 12-03-2019 05:28 AM

Your IP shows up as "Residential" when checked against at least one IP lookup service.

Mail providers generally don't like "Residential" IPs sending directly in to their mail servers as this is a good indication that the mail is coming from a compromised home machine that's on a 'botnet.

Either route your mail via your ISP's mail server, or get a cheap VPS with a large hosting company and use that as your outbound mail relay.

bradvan 12-09-2019 05:43 AM

I've been pretty happy using dynamic ip updating through no-ip. I've never had a problem sending to gmail. I'm running my domain from a server in my home and my ISP routinely changes my dynamically assigned ip address. I have a daemon running on my server that reaches out to no-ip's servers and updates my dynamically assigned ip. They then change my domain ip to point to the new dynamically assigned ip. Been using for a few years with no complaints. :)

TenTenths 12-09-2019 05:48 AM

Quote:

Originally Posted by bradvan (Post 6066076)
I've been pretty happy using dynamic ip updating through no-ip. I've never had a problem sending to gmail. I'm running my domain from a server in my home and my ISP routinely changes my dynamically assigned ip address. I have a daemon running on my server that reaches out to no-ip's servers and updates my dynamically assigned ip. They then change my domain ip to point to the new dynamically assigned ip. Been using for a few years with no complaints. :)

Lucky you! Depends on how your ISP address range is classified by sources such as MaxMind. I suppose if it's non-residential, or has a high "static IP score" then it may be acceptable

scasey 12-09-2019 02:01 PM

Quote:

Originally Posted by TenTenths (Post 6066077)
Lucky you! Depends on how your ISP address range is classified by sources such as MaxMind. I suppose if it's non-residential, or has a high "static IP score" then it may be acceptable

no-ip is a "dynamic DNS" service that provides a static IP to domains and forwards requests to the ISPs dynamic IP. The user's dynamic IP is never seen.

TenTenths 12-09-2019 02:04 PM

Quote:

Originally Posted by scasey (Post 6066224)
no-ip is a "dynamic DNS" service that provides a static IP to domains and forwards requests to the ISPs dynamic IP. The user's dynamic IP is never seen.

Ah, I learn something every day!

mfoley 12-10-2019 02:02 PM

Quote:

Originally Posted by scasey (Post 6064154)
No rDNS
A dynamic IP
Listed in RBLs

Any one of these could (probably does) cause email to marked as SPAM.
On my server they’d cause the mail to be rejected (BOUNCed)

Yes, that's what I'm thinking too. I've been using this setup for more than a decade w/o too much problem, but I guess email ISP's are getting more strict lately. It's getting to be a real problem.
Quote:

Originally Posted by TenTenths (Post 6064197)
Your IP shows up as "Residential" when checked against at least one IP lookup service.

Mail providers generally don't like "Residential" IPs sending directly in to their mail servers as this is a good indication that the mail is coming from a compromised home machine that's on a 'botnet.

Either route your mail via your ISP's mail server, or get a cheap VPS with a large hosting company and use that as your outbound mail relay.

Actually, my mail is routed via the ISP mail server. My sendmail SMART_HOST is mail.twc.com, I'm using port 587 and I have the authinfo feature configured. I think the problem is that the domain itself is dynamic and there is no rDNS. The MX record points to my domain, whose IP is dynamic and, as you say, "Residential":
Code:

novatec-inc.com has address 184.57.60.212
novatec-inc.com mail is handled by 10 novatec-inc.com.

Quote:

Originally Posted by bradvan (Post 6066076)
I've been pretty happy using dynamic ip updating through no-ip. I've never had a problem sending to gmail. I'm running my domain from a server in my home and my ISP routinely changes my dynamically assigned ip address. I have a daemon running on my server that reaches out to no-ip's servers and updates my dynamically assigned ip. They then change my domain ip to point to the new dynamically assigned ip. Been using for a few years with no complaints. :)

no-ip is intriguing. I've not heard of that before. What about your domain name? Is it also pointing to a dynamic IP like mine? Does no-ip handle that?

I'll investigate no-ip, but I do have access to a server with a static IP. I'll post that as a separate thread since this issue has been answered.

scasey 12-10-2019 02:35 PM

Quote:

Originally Posted by mfoley (Post 6066568)
Yes, that's what I'm thinking too. I've been using this setup for more than a decade w/o too much problem, but I guess email ISP's are getting more strict lately. It's getting to be a real problem.

There are RBLs that identify "residential" IPs -- actually IPs that are assigned by ISPs dynamically -- AOL even publishes a list of theirs. Most ISPs are happy to share that information...they don't want residential customers doing what you're doing. EDIT: But you're not actually doing that...read on.
Quote:

Originally Posted by mfoley (Post 6066568)
Actually, my mail is routed via the ISP mail server. My sendmail SMART_HOST is mail.twc.com, I'm using port 587 and I have the authinfo feature configured. I think the problem is that the domain itself is dynamic and there is no rDNS. The MX record points to my domain, whose IP is dynamic and, as you say, "Residential":
Code:

novatec-inc.com has address 184.57.60.212
novatec-inc.com mail is handled by 10 novatec-inc.com.


The MX listing on your domain defines where it receives email, not where it's sent from. If you're sending with your ISPs mail host, then that's the host the receiving server is concerned about. That host has an rDNS, is not dynamic, and is not on any RBLs, so that makes my earlier guesses moot. Those are not the reasons for the problem, then.

Did you check the headers of the email as received at gmail? Was there any indication there?

bradvan 12-11-2019 04:04 AM

My domain name server is set to no-ip's. So, as my ISP changes my ip, no-ip dynamically updates it. I used to send my outgoing e-mail through my ISP logging in with my login id and password. They then stopped that saying they did it in order to try and stop spam. That is just bull-crap since I was logging in every time I sent out mail. So, they knew exactly whom was sending it. I know also pay no-ip to send out my e-mail for me.

mfoley 12-16-2019 05:04 PM

Quote:

Originally Posted by scasey (Post 6066579)
There are RBLs that identify "residential" IPs -- actually IPs that are assigned by ISPs dynamically -- AOL even publishes a list of theirs. Most ISPs are happy to share that information...they don't want residential customers doing what you're doing. EDIT: But you're not actually doing that...read on.

The MX listing on your domain defines where it receives email, not where it's sent from. If you're sending with your ISPs mail host, then that's the host the receiving server is concerned about. That host has an rDNS, is not dynamic, and is not on any RBLs, so that makes my earlier guesses moot. Those are not the reasons for the problem, then.

Did you check the headers of the email as received at gmail? Was there any indication there?

Hmmm, so now I'm reconfused. If the ISP has a reverse DNS that shouldn't be an issue. I tested by sending a message to a client's computer where Spamassassin is running. That generated a SPAM error: "KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS." I'll research that one more, but maybe the rDNS isn't quite working after all.

How do I inspect headers at gmail? I've clicked on about every option/icon on the mail page and I can't find any "view headers" option.

I've checked my MX record with mxtoolbox.com. It warns me that I have no DMARC record (whatever that is, I'll research), and says my IP is blacklisted at 3 blacklist sites: RATS Syna, SORBS DUHL, and Spamhaus ZEN. I'm pretty certain spam is NOT being sent from my IP. I've listed in /etc/mail/access only 3 expilict servers permitted to relay.

mfoley 12-16-2019 11:50 PM

Quote:

Originally Posted by scasey (Post 6066224)
no-ip is a "dynamic DNS" service that provides a static IP to domains and forwards requests to the ISPs dynamic IP. The user's dynamic IP is never seen.

scasey/bradvan - I'm looking into this. It may be my only solution. I've been to the no-ip site and the information is pretty sparse as far as selecting a service. Perhaps one of you no-ip "gurus" can guide me.

I have the dynamic IP attached to domain novatec-inc.com. Spectrum/Time-Warner is my ISP and I am using mail.twc.com as the SMART_HOST, with authentication from my mail server. Despite scasey's comforting assurances, gmail and others don't appear to like my messages. So, what service would I select at no-ip? They have:

No IP Hosted Mail - POP3 / IMAP Email: POP3/IMAP is the ideal option for those who do not want the headache of managing their own email server. I do want to host my own email server, so I don't think I want this option.

No IP Hosted Mail - Mail Forwarding: Mail Forwarding enables you to receive email for your domain and have it forward to an existing account. Not sure I understand this option.

Self-Hosted Mail - Alternate-port SMTP: SMTP is for admins that have a blocked port 25 or road warriors that don't want to change smtp settings. I don't think this is what I want.

Self-Hosted Mail - Backup MX: Backup MX gives you peace of mind. Should your mail server go down, you won't lose important email. I don't think this is what I want.

Self-Hosted Mail - Mail Reflector: Mail Reflector ensures you are able to receive email even if your ISP blocks port 25. It also provides all the features of Backup MX. I don't think this is what I want.

So, scasey, to which of these services are you referring in the bit I've quoted?

bradvan 01-14-2020 02:58 AM

I would think you would just need a dynamic dns service and maybe a server certificate? Just contact them and tell them your problem. They are pretty good at providing answers. I'm just paying for mail forwarding because my ISP is no longer forwarding e-mails from a different domain than theirs.

scasey 01-14-2020 11:55 AM

Quote:

Originally Posted by mfoley (Post 6068661)
So, scasey, to which of these services are you referring in the bit I've quoted?

I don't know. I have a static IP and I run my own MTA from a data center, not from my residence.

Your mail is being sent by your ISP, not by your mail server, yes?
Can you post the headers of one of the emails that gmail classified as spam? There should be some indication there of why.


All times are GMT -5. The time now is 04:37 PM.