This is a discussion on How to reject back-dated messages within the alt.comp.mail.postfix forums, part of the Mail Servers and Related category; I've been looking at the header_checks file and have put in a pair of lines that reject messages with ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I've been looking at the header_checks file and have put in a pair of lines
that reject messages with date strings that contain 19[0-9][0-9] and 20 [0-6]. There are two problems with this approach: 1) It has to be manually updated every year. 2) It does not reject messages from this year that are "old". Is there a way to reject any message with a time stamp more than xxx (1 month, for example) old? -- Bill Gee There are no 'X' chars in my email address. |
|
|||
|
Am Mon, 03 Sep 2007 16:17:59 -0500 schrieb Bill Gee:
> Is there a way to reject any message with a time stamp more than xxx (1 > month, for example) old? http://www.snertsoft.com/sendmail/milter-date/ Alexander |
|
|||
|
On 2007-09-03 23:17, Bill Gee wrote:
> I've been looking at the header_checks file and have put in a pair of lines > that reject messages with date strings that contain 19[0-9][0-9] and 20 > [0-6]. There are two problems with this approach: > > 1) It has to be manually updated every year. > > 2) It does not reject messages from this year that are "old". > > Is there a way to reject any message with a time stamp more than xxx (1 > month, for example) old? > > Maybe you can put: /Date:.*200[0-6]/ wrong year /Date:.*19[0-9][0-9]/ wrong year in header_checks well, start with "WARN wrong year" first, and see if it works /bb |
|
|||
|
On 2007-09-12 14:13, birre wrote:
> On 2007-09-03 23:17, Bill Gee wrote: >> I've been looking at the header_checks file and have put in a pair of >> lines >> that reject messages with date strings that contain 19[0-9][0-9] and 20 >> [0-6]. There are two problems with this approach: >> >> 1) It has to be manually updated every year. >> >> 2) It does not reject messages from this year that are "old". >> >> Is there a way to reject any message with a time stamp more than xxx (1 >> month, for example) old? >> >> > > Maybe you can put: > /Date:.*200[0-6]/ wrong year > /Date:.*19[0-9][0-9]/ wrong year > > in header_checks > > well, start with "WARN wrong year" first, > and see if it works > > /bb Sorry, that should be: /Date:.*200[0-6]/ REJECT wrong year /Date:.*19[0-9][0-9]/ REJECT wrong year I was a bit tired I guess :-) /bb |
|
|||
|
In article <fcb5pq$7r2$1@news.al.sw.ericsson.se>, birre wrote:
>> >> Maybe you can put: >> /Date:.*200[0-6]/ wrong year >> /Date:.*19[0-9][0-9]/ wrong year >> >> in header_checks >> >> well, start with "WARN wrong year" first, >> and see if it works >> >> /bb > > Sorry, that should be: > /Date:.*200[0-6]/ REJECT wrong year > /Date:.*19[0-9][0-9]/ REJECT wrong year Headers are just strings. Anchor the beginning of the line. /^(Date:.* 200[0-6])/ REJECT Set your clock. $1 is way off. And if you're in a mood for regular expressions, try this. smtpd_client_restrictions = ... check_client_access regexp:/etc/postfix/client-regex ... /^((a?dsl|dhcp|dyn(amic)?|ppp)([.-][0-9]{1,3}){4}.*)$/ REJECT Sending from $1 won't work. Use your ISP's SMTP server. Cameron |
|
|||
|
Alexander Dalloz wrote:
> Am Mon, 03 Sep 2007 16:17:59 -0500 schrieb Bill Gee: > >> Is there a way to reject any message with a time stamp more than xxx (1 >> month, for example) old? > > http://www.snertsoft.com/sendmail/milter-date/ > > Alexander Hmmmm, Â*Interesting! Â*I'll check this out. Â*Thanks! As it turns out, the bad dates I thought I was getting were not really from 1969. Â*They were truly invalid dates such as 34 August 2007. Â*KMail did something funky and put them down as 1969 dates. -- Bill Gee There are no 'X' chars in my email address. |