Re: [exim] Headers

Etusivu
Poista viesti
Vastaa
Lähettäjä: JAS
Päiväys:  
Vastaanottaja: wakko
Kopio: exim-users
Aihe: Re: [exim] Headers
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

Thanks



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