Re: [exim] Headers

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Wakko Warner
Data:  
Para: exim-users
Asunto: 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


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)

> 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/ ##

--
Lab tests show that use of micro$oft causes cancer in lab animals