Make postfix block strange timestamps
Anyway, these emails are harder to delete (or annoying, at the very least). I'm wandering if it's possible to tell postfix to check the timestamps and throw out any emails that are impossible to have been sent at the time which they come in.
6 Replies
Also worth looking at is greylisting. I don't even check any rbls anymore - I just greylist and 99% of my spam is gone (most spam sent by botnets won't bother retrying)
I've never heard of greylisting.
@Piki:
I'm wandering if it's possible to tell postfix to check the timestamps and throw out any emails that are impossible to have been sent at the time which they come in.
Add to postfix main.cf:
header_checks = pcre:/etc/postfix/header_checks
Create header_checks:
# Reject mails with dates far in the past or future -
# they are designed to appear at the top or bottom of your inbox.
/^Date: .* 20[2-9][0-9]/ REJECT Date header is in the distant future.
/^Date: .* 201[2-9]/ REJECT Date header is in the future.
/^Date: .* 2010/ REJECT Date header is from last year.
/^Date: .* 200[0-9]/ REJECT Date header is from the past.
/^Date: .* 19[0-9][0-9]/ REJECT Date header is from the distant past.
@hoopycat:
(note: don't forget to update it annually)
Yeah; I usually spend a couple of hours on New Year's Day wondering why nobody emails me any more – then I update it.