How to reject back-dated messages

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 ...


Go Back   Usenet Forums > Mail Servers and Related > alt.comp.mail.postfix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-03-2007
Bill Gee
 
Posts: n/a
Default How to reject back-dated messages

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.
Reply With Quote
  #2 (permalink)  
Old 09-10-2007
Alexander Dalloz
 
Posts: n/a
Default Re: How to reject back-dated messages

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
Reply With Quote
  #3 (permalink)  
Old 09-12-2007
birre
 
Posts: n/a
Default Re: How to reject back-dated messages

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
Reply With Quote
  #4 (permalink)  
Old 09-13-2007
birre
 
Posts: n/a
Default Re: How to reject back-dated messages

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
Reply With Quote
  #5 (permalink)  
Old 09-14-2007
Cameron L. Spitzer
 
Posts: n/a
Default Re: How to reject back-dated messages

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

Reply With Quote
  #6 (permalink)  
Old 09-15-2007
Bill Gee
 
Posts: n/a
Default Re: How to reject back-dated messages

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.
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:46 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0