Message reject based on absense of a header(s)

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Message reject based on absense of a header(s)

Vladimir Kozlov
I'd like to reject messages without some headers (say, Date: or
Message-ID:).
As far as I understand, headers-checks and body-checks could be done as
described at http://www.postfix.org/BACKSCATTER_README.html

The only question I could not find answer to is: how to write regexp for
_absence_ of a header(s)?

Kind regards,
Vladimir.


smime.p7s (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Message reject based on absense of a header(s)

Noel Jones-2
On 2/18/2014 10:54 AM, Vladimir Kozlov wrote:

> I'd like to reject messages without some headers (say, Date: or
> Message-ID:).
> As far as I understand, headers-checks and body-checks could be done
> as described at http://www.postfix.org/BACKSCATTER_README.html
>
> The only question I could not find answer to is: how to write regexp
> for _absence_ of a header(s)?
>
> Kind regards,
> Vladimir.
>


The header_checks feature scans one header at a time and does not
save state between headers, making it impossible to detect missing
headers.

To detect missing headers you'll need a content filter such as
SpamAssassin.



  -- Noel Jones
Reply | Threaded
Open this post in threaded view
|

Re: Message reject based on absense of a header(s)

Andrey Repin
Greetings, postfix users!

>> I'd like to reject messages without some headers (say, Date: or
>> Message-ID:).
>> As far as I understand, headers-checks and body-checks could be done
>> as described at http://www.postfix.org/BACKSCATTER_README.html
>>
>> The only question I could not find answer to is: how to write regexp
>> for _absence_ of a header(s)?

> The header_checks feature scans one header at a time and does not
> save state between headers, making it impossible to detect missing
> headers.

> To detect missing headers you'll need a content filter such as
> SpamAssassin.

That's a bust :(
I receive 3-5 messages without date/msgid daily (and they are ALWAYS SPAM),
and I was hoping there's a way to save some horsepower.


--
WBR,
Andrey Repin ([hidden email]) 18.02.2014, <21:58>

Sorry for my terrible english...

Reply | Threaded
Open this post in threaded view
|

Re: Message reject based on absense of a header(s)

A. Schulze
In reply to this post by Noel Jones-2

Noel Jones:

> To detect missing headers you'll need a content filter such as
> SpamAssassin.

opendmarc-milter implement a test to verify RFC5322-required headers  
(RFC5322 3.6)
The feature is new, available in the 1.2.0 Beta only.
(https://sourceforge.net/projects/opendmarc/files/Pre-Releases/)

Andreas



Reply | Threaded
Open this post in threaded view
|

Re: Message reject based on absense of a header(s)

Noel Jones-2
On 2/18/2014 3:41 PM, Andreas Schulze wrote:

>
> Noel Jones:
>
>> To detect missing headers you'll need a content filter such as
>> SpamAssassin.
>
> opendmarc-milter implement a test to verify RFC5322-required headers
> (RFC5322 3.6)
> The feature is new, available in the 1.2.0 Beta only.
> (https://sourceforge.net/projects/opendmarc/files/Pre-Releases/)
>
> Andreas
>
>
>

While Date and From headers are required by RFC5322 and ancestors,
note that Message-ID "SHOULD" be present but is not required.

A few years ago I tried rejecting messages with no Message-ID. Much
to my surprise, there were far more false-positives than actual spam
rejected.  I doubt the situation has changed much since then, but YMMV.



  -- Noel Jones
Reply | Threaded
Open this post in threaded view
|

Re: Message reject based on absense of a header(s)

Wietse Venema
Noel Jones:
> A few years ago I tried rejecting messages with no Message-ID. Much
> to my surprise, there were far more false-positives than actual spam
> rejected.  I doubt the situation has changed much since then, but YMMV.

That was my experience, too. There was enough legitimate mail
without Message-ID that this was not a good test for spamminess.

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: Message reject based on absense of a header(s)

Michael J Wise

On Feb 18, 2014, at 2:57 PM, Wietse Venema wrote:

> Noel Jones:
>> A few years ago I tried rejecting messages with no Message-ID. Much
>> to my surprise, there were far more false-positives than actual spam
>> rejected.  I doubt the situation has changed much since then, but YMMV.
>
> That was my experience, too. There was enough legitimate mail
> without Message-ID that this was not a good test for spamminess.


Granted, but …

At the very least, such traffic should have to be safe-sendered to keep it out of the Junk.
IMHO.

Aloha,
Michael.
--
"Please have your Internet License            
 and Usenet Registration handy..."