Re: [exim] Headers

Top Page
Delete this message
Reply to this message
Author: JAS
Date:  
To: jas2803
CC: exim-users, wakko
Subject: Re: [exim] Headers


jas2803@??? wrote:

>
>
> jas2803@??? wrote:
>
>>
>>
>> wakko@??? wrote:
>>
>>>> closer,
>>>>
>>>> Remove_Headers = Subject:
>>>> headers_add = "X-Filter: $primary_hostname   \n\
>>>>                         Subject: ${sg{\[SPAM\]}{h_subject:}} \n\
>>>>                        Gives me [] subjecttext  I need to get rid 
>>>> of []  now

>>>>
>>>
>>>
>>>
>>> Please don't top post.
>>>
>>> Got the ordering wrong. Try this:
>>> ${sg{$h_subject:}{\N\[SPAM\] *\N}{}}
>>>
>>> Here's the test I did with exim -be:
>>> ${sg{[SPAM] random subject}{\N\[SPAM\] *\N}{}}
>>> returns: "random subject" (no quotes)
>>>
>>>
>> I even tried when it makes its second pass, so I did an sg on []
>> as follow
>>
>> ${sg{h_subject}{\N\[\] *\N}{}}
>> I get this error
>>
>>
>> router failed to expand "Subject: ${sg{$h_subject:}{N[]*N}{}}":
>> regular expression error in "N[] *N": missing terminating ] for
>>
>> character class at offset 6
>> I think it is telling what to lookfor, I am just not sure what it
>> is..... :-)
>>
> One last try before I call it a night
> exim -be
> ${sg{[SPAM] random subject}{\N\[ *\NSPAM\N\] *\N}{}}
> Worked perfect
> Place it in the conf file, still does not rid the message of spam.....


Tried one more thing,
{sg{[SPAM] random subject}{\N\[ *\N}{}}
Conf file, error at offset 5
{sg{[SPAM] random subject}{\N\] *\N}{}}
Nothing happened, well no error and [SPAM] was still there
totally baffled.
It looks like I can take out SPAM but not the brackets, unless anyone
else knows of a bug......

>
>>>
>>>
>>>> wakko@??? wrote:
>>>>
>>>>
>>>>> JAS wrote:
>>>>>
>>>>>
>>>>>> I am trying to remove the word spam from a subject line this is 
>>>>>> what I tried.
>>>>>> headers_add = "X-Filter: $primary_hostname   \n\
>>>>>>                        new-subject: ${sg{\[SPAM\]}{h_subject:}} \n\
>>>>>>                         Subject: $h_new-subject:"
>>>>>> I get
>>>>>> router failed to expand "X-Filter: $primary_hostname 
>>>>>> \nnew-subject: ${sg{[SPAM]}{$h_subject}} \nSubject: 
>>>>>> $h_new-subject:" missing or misplaced { or }
>>>>>> does anyone have experience with this that works and  would like 
>>>>>> to share how it does?

>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> Try:
>>>>> headers_add = "X-Filter: $primary_hostname   \n\
>>>>>                         new-subject: ${sg{\[SPAM\]}{h_subject:}{}} 
>>>>> \n\
>>>>>                          Subject: $h_new-subject:"

>>>>>
>>>>> However, I'm not sure it'd work, maybe:
>>>>> headers_remove = Subject:
>>>>> headers_add = Subject: ${sg{\N\[SPAM\]\N}{$h_subject:}{}}
>>>>>
>>>>> \N causes exim not to expand the rest of the string (till the next
>>>>> \N). Other wise, you'd need \\[SPAM\\]
>>>>>
>>>>> I don't actively do headers_add/remove so I don't know what
>>>>> happens to
>>>>> $h_subject: in the above. I would assume nothing and it would
>>>>> work, but I
>>>>> don't know for sure.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> ## List details at http://www.exim.org/mailman/listinfo/exim-users
>>>> Exim details at http://www.exim.org/ ##
>>>>
>>>
>>>