How to Block Emails From the Future Using SpamAssassin In cPanel

5/5 - (2 votes)

Getting emails from the future is a classic sign of SPAM. Unfortunately, SpamAssassin only bumps the score of these emails by less than 2 points, which isn’t usually enough to get it marked as SPAM.

To fix this, you can add a rule to SpamAssassin to block emails from the future.

First, open /etc/mail/spamassassin/local.cf in a text editor, then append the following lines:

header FROM_THE_FUTURE Date =~ /20[3-9]\d-[0-1]\d-[0-3]\d [0-2]\d:[0-5]\d:[0-5]\d [A-Za-z]+/i
score FROM_THE_FUTURE 20.0
describe FROM_THE_FUTURE Email from the future

Save the file, then restart SpamAssassin:

/scripts/restartsrv_spamd

This should score emails from the future with a value of 20, automatically marking them as SPAM.

Leave a Reply

Your email address will not be published. Required fields are marked *

Log in