Handling Junk email

Annoying Spam Messages

I read somewhere last year a scary statistic which suggested that 95% of the email circulating the internet is spam. I don’t know whether it is true or not, but sometimes it can feel that way.

What can you do about it?

Usually the first line of defence is to have some spam detection in forms. This can be a question, or image where you are asked to identify something. These rely on human interaction and image recognition. They can be annoying too, arguably more annoying than the spam they are supposed to prevent. Google has a function called Recapture that is used on many sites. The latest version is very good, but it appears to work most effectively if the user is accessing your site or form using Chrome. If they are not then the images pop up and you are asked to match things. We cannot guarantee that visitors are using Chrome of course.

Another method is a hidden field in a message that a computer can see, but a user cannot. The form logic detects whether some data has been added into the hidden field, and does not send the email if the form has been filled in by a computer.

Personally I tend to try to avoid quizes and image recognition, I think they put people off. But sometimes you get a persistent message coming through your website. I have one case like that now.

Spam Filtering

All email coming into your inbox has active filtering set up on it within the hosting. There are some standard checks made. A filtering tool also assesses the email to establish the likelyhood of it being spam. All accounts are currently set to High. There is one level above that which is Extreme. I have been asked by one organisation to set theirs on extreme. The risk here is it might start to filter out genuine emails. But if you are troubled by large volumes of spam, it might be worth thinking about.

Second Level Detection

Within the hosting, and also as a feature you can add in filtering by country. So if annoying messages are originating from say the Philippines, you can prevent your website being viewed from the Philippines.  This method relies on a database which resolves the IP address of the person visiting your site against a set of IP addresses for that country.  This has worked for some countries. It depends where the incoming messages are being sent from.  A surprising amount can come from France, and it may be advisable not to block France if some of the people visiting your site have holiday homes in France.

Block by sender IP address

This is also possible, however practically all residential and some business IP addresses change regularly, so while you can block it today, they may be on a different address tomorrow. You can also block by partial IP address by stating a range of IP addresses. However this may block some genuine users if you are not careful.,

Dark Web

There is a parallel universe out there, and some IP addresses cannot be resolved to countries. Many messages seem to come from this source. Particularly if they are scam related. It is difficult if not impossible to trace things in the dark web.

Last line of defence: Email Filtering

In this particular case, I have looked at filtering in the email account. In this case it is a generic email address that seems to be targeted by persons unknown. There is a regular stream of Adult Dating websites being pushed to this general email account through the contact form in the website.

It is not obvious which countries should be filtered out, so in this case I have looked at the email content and key/ common words, and created a simple filter. Below you can see an example of the email text that comes in.

This is one of several, but there are some common words in all of the emails.  Here is the filter I created. Click on the image below to expand it. 

It is not as complicated as it looks!

My message contains the following three words: “sexy”, “dating”, “meet”.

The first part of the filter says, if the incoming message contains all of these words in the body of the message: “sexy”, “dating” and “meet” then take some actions:

  • the first action is to send the message to me so I can check the filter is working. 
  • the second action is to send the message into the junk mail folder
  • the third action is to stop evaluating rules. 

If this works, I can remove the monitoring line which sends a message to me. Then these messages will never be seen.

It is also worth pointing out that statistically it would be unlikely to receive a message through the contact form to a charitable organisation with the words in: “sexy”, “dating” and “meet” the choice of words which you perform the filtering on is critical. This is why I am initially monitoring the filter. 

You can find this in your webmail account

The filtering function is built into your webmail account. If you have the same messages popping up all of the time, you can filter them out this way. Yes it is tedious, but it is the last line of defence before your inbox, after that you become the filter. 

If you have some examples, and need some help, drop me a line. 

Update 12/01/20

Well, I finally got to the bottom of this problem and it was a little surprising.  It really demonstrates that you should assume nothing, or as they say ‘Assume’ makes an ‘Ass’ out of ‘U’ and ‘Me’  (get it?).

So on with the story. I was eventually getting emails once or twice a day, at generally the same times, but the spam messages were based on dating sites (across the world), not just local, and other themes.  But I noticed when looking at the emails they all had this text in “C:/Frazes.txt” irrespective of the rest of the content in the file. I am sure it was an error on the senders part incorrectly constructing his message. So I used that text as a filter for email. Basically look for C:/Frazes.txt in the body of the email and if located move it to the junk folder.

But they still came in….

Then I found out that they were not making it to the recipients mail box at all, they were just coming to my email box. So was I being targetted?  No.

It turns out that the owner of the website had substituted another form in the website and replaced the one I had put there when the site was created. That in itself, is not a problem, however the form needs to be set up to send the message to a recipient. In this case the client did not do this. So what happened was the form substituted the registered email address on the website for the destination mailbox, which happened to be mine. That was why I was receiving them. The change had happened in November.

Having said all of that…

The mailbox filtering is a useful tool and can be used to combat annoying spam messages which keep coming in. Look for common threads in the message, if you can find some you can easily add a filter to your mailbox to trap them.