I use postfix, dovecot 2.1 and amavis for my emails.
How can I refuse emails (from other email servers) that date are to old (e.g. >=1 month) or to new (eg. >=1d in the future)?
Postfix has a header_check facility to allow you to scan headers and decide what to do with the email at that time.
This is an example of a date check. Unfortunately, this is not dynamic.
Postfix does support Sendmail milters. I quickly found a date type milter here:
I suspect you will likely need to use a Milter.
Alternatively, I am not sure if you are using something like Spamassassin, but it too may have rules to help flag emails with bad dates.
You can probably do something with header_checks, with the caveat that you'll probably have to manually update the regex to stay current, or you could write your own script to update it, ensuring that part of the script calls