Re: [exim] SPAM with empty subject field

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Mike Cardwell
Dátum:  
Címzett: Exim Users List
Tárgy: Re: [exim] SPAM with empty subject field
paul.mcilfatrick@??? wrote:

>>> My search of the pdf file found mention of the $h_subject variable.
>>>
>>> Is this variable available in Exim?
>> $h_HEADERNAME: contain the various headers and is case insensitive.
>> Eg: $h_subject: and $h_SUBJECT: and $h_Subject: all equal the same
>> thing.
>
> I have searched the v4.6x spec pdf file for $h_HEADERNAME but it wasn't
> found. Where is this all documented?


By stating $h_HEADERNAME: I was trying to explain that all headers can
be referenced using that particular method. You were supposed to replace
"HEADERNAME" with the header of choice. Examples:

$h_From:
$h_Subject:
$h_To:
$h_Reply-To:

>> These variables are only accessible in the data acl and the routers.
>
> Before you replied, I tried the following in the data acl:
>
> warn condition = ${if eq {${strlen:$h_subject}} {0}}


It's "$h_subject:" not "$h_subject"

Bad : ${if eq {${strlen:$h_subject}}{0}}
Good : ${if eq {${strlen:$h_subject:}}{0}}

> but then got this error for several e-mails:
>
> failed to expand ACL string "${if eq {${strlen:$h_subject}} {0}}":
> missing 2nd string in {} after "eq"
>
> Can e-mails arrive without a subject field as opposed to an empty
> subject field?


Yes. What are you trying to test for? A missing Subject header, or an
empty Subject header, or both? If the answer is both, the modified
substr condition I specified above is correct, but a more compact method
would be to compare it against the empty string:

condition = ${if eq{$h_Subject:}{}}

Mike