On Fri, 13 Nov 2026 22:20:27 +0000
Marc <[email protected]> wrote:

> > https://en.wikipedia.org/wiki/Perceptual_hashing  
> You are using this dinohash?

I just compared two hash algorithms, pHash looked satisfactory. 
I'd rather use the cheapest algorithm (CPU, hash size) than the best if
the best is just 0.01% better and 10 times slower :-/

The TODO list on my anti419er project is slowly diminishing.

I'll definitely focus on classic reporting before implementing a system
based on perceptual hashing.
So far I have Spamhaus, Spamcop, AbuseIPDB, ARF mails to abuse
addresses (incomplete). Razor and DCC are in the TODO list too, report
thru spamc...
https://en.wikipedia.org/wiki/Abuse_Reporting_Format

> How much more resource use, does this add to a default spamassasin?

I did not measure it yet.
A default SpamAssassin does not receive many pictures, so I guess it
will be negligible. 
There will be some lag if an e-mail arrives with many pictures
attached: the system will have to compute the pHash (probably the
quickest part) then query the DB, wherever it is.

> But how much would this increase the effectiveness of spamassassin? 

Big question. I /think/ this is mostly efficient against scams, which
are not that common, I admit.

> > It seems that clamAV has started using pHash.  
 
> But they are already scanning attachments, in what context do they
> use it?

I don't know exactly if this is much used, but this is implemented:
https://docs.clamav.net/manual/Signatures/LogicalSignatures.html#image-fuzzy-hash-subsignatures

> It all depends on the added value. For me rbls are the biggest win,
> of all initial rejects 18% is handled by spamhaus, 7% spamcop, 7% by
> spf, 18% a connect db, so I already have a smaller percentage that is
> handled by spamassassin, so your addition would be even smaller. 

Oddly, I receive less and less spam on my personal domains. My sample
is really too small to make reliable statistics but I am not surprised
when you say Spamhaus does the heavy lifting: they are terribly
efficient.
I have a terribly spammed GMX box that I only use to register on fishy
accounts -- and it gave my first scams samples.

> How much load do you have then? My setup has a load of 0. 

Lucky you! (you should send some RAM to Sam A if you don't use it :) )

top - 23:07:23 up 4 days,  7:21,  3 users,  load average: 2.47, 3.04, 3.11
Tasks: 364 total,   1 running, 363 sleeping,   0 stopped,   0 zombie
%Cpu(s): 19.5 us,  2.0 sy,  0.0 ni, 73.6 id,  4.5 wa,  0.0 hi,  0.4 si,  0.0 st 
MiB Mem :  64192.0 total,   1050.0 free,  14368.0 used,  51385.9 buff/cache     
MiB Swap:  65536.0 total,  61000.1 free,   4535.9 used.  49824.0 avail Mem 

The worst part on this server is that it has rotating disks, no SSD.
I could probably move some services elsewhere.

> First start thinking about if this is even interesting to add. Does
> the problem it solves even exist?

Scams definitely exist and are more dangerous than common spams.
Now, as I planned to report to Spamhaus and other RBL too, if Spamhaus
trusts submissions from my system, the scammers might well be
intercepted by RBLs before any pHash triggers a hit.
The main advantage is that scammers tend to reuse the same pictures, so
a scammer who moved to another mail provider will not be caught by
RBLs but might be caught by pHash.

Another point: scammers all use the same trick now. The first e-mail is
sent from a throwable address and just says something like "please
reply to [email protected]". The first address is very quickly burnt
so it changes often and the RBL are not that effective. They can also
use hacked services.
Oddly, the second address appears to survive weeks or months. Many are
at big hosting companies like gmail.com or outlook.com
Classic spamtrap mailboxes will not catch them: you have to start
talking to the scammer. If you do it automatically by blindly trusting
Reply-To or the address in the body, there is a high risk to hit
innocent third parties sooner or later, as some scammers can be nasty.
Also, this is not trivial: I've seen first messages that only had a
DOCX attached. I had to open the DOCX to read the message, see a
picture of the beautiful lady in case of a romance scam, and get the
reply address.
The coding agent overengineered the software in the beginning, but I let
it code it to see when it would explode, and it now appears that
reality needs something complex.
Scammers are very "creative" in their messages, and also on a technical
point. My unfinished project chocked on a not-compliant Message-ID
header although the RFC is *very* permissive for this SMTP header.
Threading is often a nightmare.

If you are interested, I will publish it when it is more stable.

-- 
MA 




Reply via email to