I've been developing a series of filters to block spam from being accepted by my mail server. One of them is as follows in the file referenced by the header_checks parameter in my Postfix main.cf:
It basically looks at the date the system sending the message has set in the message. If it's before this year, the message is blocked and the person told to update his computer clock, then a rule number for my own use. This works great at blocking the spam messages that are sent with a date far in the past to make it appear at the top of your inbox. However, I have run into a problem.
One of my users called me and said he couldn't send a message. I looked at what he was doing and he was trying to forward a message that he received in mid-2009 to somebody else as an attachment. The mail server responded with the above message because the attached message has a date set before this year.
Any ideas of how I could prevent a situation like this from happening again? I just removed the second line (2000-2009) from my header check file as a temporary workaround for the problem, but would very much like to find something permanent that will allow me to block what I want while ignoring the date- & time-stamps on forwarded messages.
Code:
/^Date: .* 19[0-9][0-9]/ REJECT Please update your computer clock and try again. SHC01
/^Date: .* 200[0-9]/ REJECT Please update your computer clock and try again. SHC02
It basically looks at the date the system sending the message has set in the message. If it's before this year, the message is blocked and the person told to update his computer clock, then a rule number for my own use. This works great at blocking the spam messages that are sent with a date far in the past to make it appear at the top of your inbox. However, I have run into a problem.
One of my users called me and said he couldn't send a message. I looked at what he was doing and he was trying to forward a message that he received in mid-2009 to somebody else as an attachment. The mail server responded with the above message because the attached message has a date set before this year.
Any ideas of how I could prevent a situation like this from happening again? I just removed the second line (2000-2009) from my header check file as a temporary workaround for the problem, but would very much like to find something permanent that will allow me to block what I want while ignoring the date- & time-stamps on forwarded messages.