News for hackers. Stuff that matters.
Re:Is Gmail killing independent email? by lisper on Friday April 28, 2023 @08:17PM (#35748724)
I run my own email server in part so I could implement a spam filtering strategy that had access to my outgoing mail. Anything received from someone I sent mail to is assumed non-spam, and that is the anchor for the rest of the filtering.

I was planning to build a pretty sophisticated bayesian filter on top of that but it turned out to be unnecessary. The strategy I ended up with, which has served me well for many years now, is:

1. Block a small number of extremely spammy TLDs. There are about a dozen of these, including .biz, .casa, etc.

2. Anything received from someone I've sent mail to, or a sender I've previously marked as good, is assumed good.

3. Anything received from an address whose name contains an English word on a relatively short list of spammy words (discount, offer, etc.) is assumed spam.

4. Anything received from an address that I have received email from before and not marked as good is assumed spam.

That leaves emails from addresses that are sending me email for the first time. These are overwhelmingly spam, but after the four filters above there are few enough of these that I just scan them manually once a day or so.

The real key here is treating the first email from any given address as essentially a "contact request" with the default action being "deny in the future". That just turns out empirically to work incredibly well. More than 90% of my spam is from repeat offenders.

Re:Is Gmail killing independent email? by Dalewyn on Friday April 28, 2023 @08:58PM (#35748943)
>1. Block a small number of extremely spammy TLDs. There are about a dozen of these, including .biz, .casa, etc.

Honest question: Is there any reason to not just blacklist all emails from TLDs that aren't the Big Four (.com, .net, .org, .gov) and country TLDs (eg: .co.uk, .jp, etc.)?

I can't recall ever needing, let alone wanting, email from the later TLDs like .biz or any of the bloody stupid new TLDs that comprise entire words.

Re:Is Gmail killing independent email? by ZhadruOmjar on Friday April 28, 2023 @09:07PM (#35748994)
There are lots of businesses using `.io` `.ee` `.co` etc that depending on your email use-case would be detrimental to block especially if you're doing any kinds of business or outreach.
Re:Is Gmail killing independent email? by NickNameNick on Friday April 28, 2023 @09:13PM (#35749033)
Those are country code TLDs
Re:Is Gmail killing independent email? by mthoms on Friday April 28, 2023 @09:59PM (#35749299)
In name only. Domains with those TLDs are available to anyone willing to pay.
Re:Is Gmail killing independent email? by DangitBobby on Friday April 28, 2023 @11:34PM (#35749773)
This was in the original comment:

> Honest question: Is there any reason to not just blacklist all emails from TLDs that aren't the Big Four (.com, .net, .org, .gov) and country TLDs (eg: .co.uk, .jp, etc.)?

Re:Is Gmail killing independent email? by yieldcrv on Friday April 28, 2023 @09:06PM (#35748988)
as someone that’s never needed SEO perks of a .com since none of my customers would use a search engine to find me (they’ll click thru from posts and ads on social media and group chats)

I typically register both a new TLD and a .com, and I use the .com for the email campaigns and reply-to

if it gets flagged that doesnt affect my more official one-to-one emails from the actual domain

so I would say, maybe? because I’m not allergic to “bloody stupid” TLD’s and have already adapted to what you’re wondering about

Re:Is Gmail killing independent email? by lisper on Friday April 28, 2023 @09:49PM (#35749234)
I personally have a dot-email address.

And you left out dot-edu.

And I get a fair bit of ham from other weird TLDs. So I think a whitelist is a bad idea. But that's because I prefer to have some spam get through than have ham get blocked by mistake. Even with my very sloppy algorithm, the only time spam ends up in my inbox is if a spammer spoofs one of my contacts, and that is extremely rare.

Re:Is Gmail killing independent email? by Dalewyn on Friday April 28, 2023 @10:21PM (#35749425)
I knew I was forgetting one, thanks for reminding me about .edu.
Re:Is Gmail killing independent email? by lisper on Saturday April 29, 2023 @11:15AM (#35753697)
There is also .mil though I have not actually seen that one used in a very long time.
Re:Is Gmail killing independent email? by mcluck on Saturday April 29, 2023 @01:38AM (#35750347)
I setup my website and email at a dot-tech because, surprise, I work in tech and the equivalent com and io were taken and/or prohibitively expensive
Re:Is Gmail killing independent email? by jenadine on Saturday April 29, 2023 @01:39AM (#35750349)
My company has a .tech domain.
Re:Is Gmail killing independent email? by sveme on Saturday April 29, 2023 @02:05AM (#35750455)
There‘s also the fancier new stuff like .ai and .io.
Re:Is Gmail killing independent email? by remedan on Saturday April 29, 2023 @02:31AM (#35750563)
Aren't both of those country TLDs?
Re:Is Gmail killing independent email? by cassianoleal on Saturday April 29, 2023 @08:14AM (#35752183)
Yep, .ai is the TLD of Anguilla (United Kingdom) and .io is British Indian Ocean Territory (United Kingdom).

https://en.wikipedia.org/wiki/Country_code_top_level_domain

Re:Is Gmail killing independent email? by sveme on Saturday April 29, 2023 @10:02AM (#35752944)
Oh, wasn‘t even aware. Today I learned.
Re:Is Gmail killing independent email? by derefr on Saturday April 29, 2023 @03:12AM (#35750767)
As a B2B SaaS company, most of our legitimate, paying customer base uses .app or .io domains.
Re:Is Gmail killing independent email? by omnicognate on Saturday April 29, 2023 @06:24AM (#35751644)
.co.uk isn't a country TLD, .uk is. If you block .ac.uk you'll block every UK university, .gov.uk the UK government and if you block .me.uk you'll block, well, me.
Re:Is Gmail killing independent email? by account42 on Thursday May 04, 2023 @03:59AM (#35812567)
That's exactly the kind of arbitrary bullshit policy we don't need more of.
Re:Is Gmail killing independent email? by wahern on Friday April 28, 2023 @09:36PM (#35749148)
I do something similar to add greylist exemptions: compile top N most recent recipient domains from my outbox and sender domains from my inbox, enumerate SPF sender IP addresses for each domain, and exempt those IP addresses from greylisting (for spamd on OpenBSD, include in /etc/mail/nospamd).

This is useful so password resets, banking notices, etc don't get held up just because you recently flushed your whitelist, which is a good idea to do regularly. Likewise, it helps with senders (looking at you, American Express!) who redeliver from different origin addresses. Doesn't help for a sender with whom you don't regularly communicate, but I can't remember the last time I was on a phone call and had to awkwardly tell someone that their e-mail message will take at least 5+ minutes to get through.

Other than greylisting and RBLs, I don't have a sophisticated anti-spam setup. But I don't get much more unsolicited spam than any GMail account I've ever used (for work, etc). I do get more spam generally, but that's because I've had the same address for decades and use it for various paid services (past and present) which continually bombard me with notices, offers, and alerts; its a chore to maintain opt-out status, when that even works. Most malicious spam is blocked by greylisting or RBLs, with the caveat that GMail is one of the biggest senders of malicious spam and thus readily bypass greylisting and RBLs.

Re:Is Gmail killing independent email? by yarg on Friday April 28, 2023 @09:44PM (#35749198)
Throw a honeypot into the mix.

Anything that reaches addresses that you don't use gets marked as spam.

Common prefixes will work for cases where they're guessing your address, and hidden mailto links will cover situations where they're scraping your webpage.

Re:Is Gmail killing independent email? by wyclif on Saturday April 29, 2023 @01:41AM (#35750363)
Kind of semi-tangential, but you mention .biz and .casa. What are the other most spammy TLDs you've encountered?
Re:Is Gmail killing independent email? by lisper on Saturday April 29, 2023 @01:54AM (#35750415)
Here is the complete list:

'top','tv','biz','rocks','ru','science','bid','date','casa','buzz','work'

Re:Is Gmail killing independent email? by 2000UltraDeluxe on Saturday April 29, 2023 @02:32AM (#35750570)
I'd add .xyz to that list.
Re:Is Gmail killing independent email? by lisper on Saturday April 29, 2023 @03:20AM (#35750813)
Yeah, you'd think that would be a pretty spammy TLD, but for some reason I don't get a lot of spam from there.
Re:Is Gmail killing independent email? by cornholio on Saturday April 29, 2023 @02:56AM (#35750687)
> "heuristsics, shared models, and tea-leaves"

I have no idea how blocking TLDs of entire countries with hundreds of millions of citizens can be considered a valid anti-spam advice.

Just like the parent comment explained, you are actively pushing all of those people into the hands of Gmail (or Yandex in this case).

Re:Is Gmail killing independent email? by lisper on Saturday April 29, 2023 @03:16AM (#35750790)
There is only one country TLD on my list, and frankly I have absolutely no moral qualms about blocking that one.
Re:Is Gmail killing independent email? by swexbe on Saturday April 29, 2023 @03:57AM (#35750997)
.tv and .ru, that’s 2.
Re:Is Gmail killing independent email? by popcalc on Saturday April 29, 2023 @04:30AM (#35751166)
Correct me if I'm wrong, but I think .tv domains are pretty pricey. They're loved by people who need a bulletproof domain for their sketchy business but I don't see how they would be useful as a disposable spam source that's going to get burned quickly anyways.
Re:Is Gmail killing independent email? by lisper on Saturday April 29, 2023 @11:13AM (#35753674)
> I think .tv domains are pretty pricey

$35/year. That's not too bad. Compare to e.g. https://tld-list.com/tld/protection

Re:Is Gmail killing independent email? by zem on Saturday April 29, 2023 @03:57AM (#35750999)
what did Tuvalu ever do to you?!
Re:Is Gmail killing independent email? by lisper on Saturday April 29, 2023 @11:09AM (#35753624)
Oh, right, I actually forgot that .tv was actually a country code and not a TLD for television.

So... my apologies to the 12,000 residents of Tuvalu. I'm sorry to have to block you all, but for some reason your country code attracts spammers like flies to honey.

Re:Is Gmail killing independent email? by AndyMcConachie on Saturday April 29, 2023 @05:02AM (#35751314)
Keep in mind we're talking about a single person here. It's possible that everyone's individual list of tricks would be different given where they live and who they communicate with. If you were to use this blunt instrument on a few million subscribers you would undoubtably experience more false positives than OP experiences.
Re:Is Gmail killing independent email? by krisoft on Saturday April 29, 2023 @05:42AM (#35751488)
> I have no idea how blocking TLDs of entire countries with hundreds of millions of citizens can be considered a valid anti-spam advice.

It is very different if you offer it as a service to other people, or if you do it for yourself.

If you are doing it for yourself you know if you expect emails from country X or not. And if things change and suddenly you have a pen pal from there you can change your filters easily. So you can live with such simplifying assumptions.

If you are providing email services to masses of other people then you can’t make these assumptions of course. You have to use more sophisticated means then.

Re:Is Gmail killing independent email? by Avamander on Saturday April 29, 2023 @07:18AM (#35751906)
> If you are providing email services to masses of other people then you can’t make these assumptions of course. You have to use more sophisticated means then.

These things just get thrown in the large pot of heuristics.

Re:Is Gmail killing independent email? by denton-scratch on Saturday April 29, 2023 @06:01AM (#35751556)
I used to do this at one time. I had no users who corresponded with addresses in Russia, Romania or China, and those represented a very high proportion of inbound spam.

Nowadays (irony of ironies!) most inbound spam is from gmail.

Re:Is Gmail killing independent email? by cornholio on Saturday April 29, 2023 @10:45AM (#35753349)
So, bigotry as a spam filter. Hey, whatever works for you.
Re:Is Gmail killing independent email? by denton-scratch on Saturday April 29, 2023 @11:34AM (#35753899)
Not bigotry at all. If my server gets a lot of chinese spam, and none of my users reads chinese, then it's just silly to waste bandwidth and storage on messages that aren't going to be read.
Re:Is Gmail killing independent email? by cornholio on Saturday April 29, 2023 @04:30PM (#35756854)
But you aren't blocking the Big5 character set, you've determined that 1 billion people can't possibly learn English and have no reason to contact your users. Because reasons.
Re:Is Gmail killing independent email? by Avamander on Saturday April 29, 2023 @09:11PM (#35758827)
When Chinese and Russian ISPs start taking abuse complaints seriously then they can be given the benefit of the doubt. But until that happens they're going to remain on most RBLs for a good reason.
Re:Is Gmail killing independent email? by cornholio on Sunday April 30, 2023 @01:26AM (#35759893)
So you've determined an entire population has a certain behavior because of past interactions with other entities from that continent-sized part of the world.

Do tell me more about this wonderful new method of spam filtering with absolutely no bigotry.

Re:Is Gmail killing independent email? by Avamander on Sunday April 30, 2023 @07:27AM (#35761571)
Judging someone by their current behaviour is not bigotry. As I said, they have the option of taking abuse complaints seriously, but they haven't for a really long time now.
Re:Is Gmail killing independent email? by cornholio on Sunday April 30, 2023 @09:43AM (#35762463)
"Someone", "they". Just try to apply the same logic to, say minority dominated cities in your own country, and see what you get.
Re:Is Gmail killing independent email? by froggit on Monday May 01, 2023 @01:14AM (#35769322)
there's no such thing as a "woke" spam filter... i mean, it'd hafta be inclusive or whatever to make sure none of the email feels marginalized or sad... so to be "PC" it's gotta let everything through... which means it isn't filtering spam...
Re:Is Gmail killing independent email? by cornholio on Monday May 01, 2023 @04:18AM (#35770283)
This isn't about being "woke", whatever that means. It's just about not being a bigot and classify broad people in a certain way because of their geographic position and - by extension, ethnic and national origin.

Just imagine the racket if Gmail would start de-prioritizing email from Alaska or Hawaii because, in their experience, that's a large source of spam. If might even be true, so what? That's the exact thing racists say, racism works: we found the guy suspicious because no black people live around these parts, so we knew he was up to no good.

Re:Is Gmail killing independent email? by froggit on Monday May 01, 2023 @06:34AM (#35770994)
let me make sure I understand... filtering spam from geographical sources known to produce a disproportionate amount of spam, that someone never gets legit email from as they have no interaction with anyone there, means they're a bigoted racist... so instead we should just not filter spam, it's not fair to the spam for us to microaggressively generalize it into some group that gets marginalized, every email deserves equal treatment regardless of where it originated from (since that's all PC and woke, etc.), which ultimately makes sunshine and rainbows go everywhere and world peace and stuff?

you're making comparisons here that are so disjointed it's not even apples and oranges... it's more like apples and rocks...

this thread grew outta the spam filter setup of someone hosting their own email server. bringing gmail into this and talking about how they'd have a PR nightmare if they screw with hawaii doesn't work. yeah, they both send/receive email, that doesn't mean they're comparable in the way you're tryna say... i mean, apples and rocks are both round sometimes, but you wouldn't try comparing how they taste, right?

Re:Is Gmail killing independent email? by cornholio on Tuesday May 02, 2023 @06:56AM (#35785706)
This thread grew out of someone claiming blocking entire countries is a good anti-spam technique because they just "know" those people have nothing to say to their users. This is bigotry pure and simple, no need to go any further, they hold strong opinions that can't be objectively verified about large parts of the human population based on national origin.

As someone who was on the receiving end of the "Romanian users have nothing to say to my users and postmastars there can't even RFC" blackholes, trying to get legitimate email delivered while respecting all the rules of the internet, I can only say that whomever thinks like that is an idiot and a bigot. Unfortunately, there are many such idiots on the internet at large, and the aggregate effect is that only large sites like Gmail can maintain good deliverability, which was the subject all along.

Re:Is Gmail killing independent email? by nkrisc on Saturday April 29, 2023 @07:08AM (#35751851)
If I ran my own, personal email server, I could probably block the TLDs of every country in Asia, Africa, and South America and never actually block a single email. I don’t receive emails from those TLDs and I quite possibly never will. If I expected to, I wouldn’t block it. I don’t travel the world, making friends in every country I go to. That sounds nice, but that’s not my life.

The poster you’re replying to is talking about their filtering method for their own email. Presumably they know if they expect to ever receive an email from a given country.

Re:Is Gmail killing independent email? by froggit on Monday May 01, 2023 @12:47AM (#35769189)
Is there a particular reason to go ahead and preemptively blacklist every country's TLD you doubt you'd ever receive an email from? Would it not be better like if spam isn't expected to be an issue you might as well leave it open, then if you do one day receive a spam from that TLD, block it then?

Otherwise, let's hypothetically say you have a friend named "jacob peter" who really likes his initials (and doesn't understand the topic of this discussion), so he registers somewhere in Japan that lets him have dot-JP as his TLD. The only hypothetical way he knows to contact you is via your email server (let's also assume he doesn't do stuff like social media, phones, etc., so he can't find any other way and you have no way to contact him). If you have hypothetically preemptively blacklisted all of Asia's TLDs, then you'd never talk to him again for as long as you live, right?

Re:Is Gmail killing independent email? by nkrisc on Saturday May 06, 2023 @10:23PM (#35847300)
If this entirely fictional friend only ever emailed me from his .jp email address and never contacted me any other way, I guess so, I would never talk to him again.

Since he’s not real I don’t know if that’s a good thing or a bad thing. Maybe he’s kind of a dick.

Re:Is Gmail killing independent email? by progval on Saturday April 29, 2023 @07:11AM (#35751865)
In my experience, it changes all the time. A strong factor is NameCheap doing dollar sales on some TLD; causing a surge in DKIM-signed spam using that TLD for a few months.
Re:Is Gmail killing independent email? by waste_monk on Saturday April 29, 2023 @08:33AM (#35752289)
Honestly, just block all everything except the traditional TLDs like .com, .net, etc. and country-code TLDs for countries you expect to interact with. It's a trivially easy way to greatly reduce the amount of junkmail you receive, and saves on compute resources too (since you can reject mail before it even hits your AV/anti-spam/etc. stack).

In many years of doing this at work I think we've had to manually whitelist three domains (our corporate travel provider started sending from a .travel domain instead of their .com without telling us they would make that change...). I don't have numbers handy but it significantly reduced our junkmail intake.

Re:Is Gmail killing independent email? by theK on Sunday April 30, 2023 @07:03AM (#35761440)
Isn't that a bit like trying to predict who will want to talk with you? Maybe you are not in that sort of business but I constantly give out my email to people I meet at conferences and through that get Ham from pretty much any existing TLD, how do you cater for this case?
Re:Is Gmail killing independent email? by waste_monk on Sunday April 30, 2023 @09:56PM (#35768358)
We mainly deal with governments and other businesses in the same fairly small industry, so it's somewhat easier for us in that respect - we do know most of the entities who walk to talk to us in advance. Also, we have a good relationship with our staff and they're usually proactive about telling us when they're expecting mail coming in / we add a new supplier / etc. so we can keep an eye on mail delivery.

There's always some mail that gets blocked, of course, but it's a relatively rare occurrence.

Maybe in your case something that allows users to view and release their own quarantined mail [1] coupled with a healthy dose of training on spotting malicious emails and so on?

[1] e.g. this sort of thing https://community.spiceworks.com/topic/2474067-office-365-by... - not endorsing M365, just as an example.

Re:Is Gmail killing independent email? by bityard on Saturday April 29, 2023 @07:56AM (#35752098)
I run my own mail server too. Rspamd does a reasonable job of cutting back the amount of down that gets though, but I feel like I have no control over it or visibility into what it's doing.

What tools are you using to implement the controls you describe above?

Re:Is Gmail killing independent email? by lisper on Saturday April 29, 2023 @11:04AM (#35753565)
I rolled my own. It consists of Postfix, Dovecot, a custom milter written in Python, some small sieve scripts, and the spam filter written in Clozure Common Lisp using SQLite3 as the database.