Re: [exim] Remove Tags from Subject

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Justin Koivisto
Data:  
Para: jas2803
CC: exim-users
Assunto: Re: [exim] Remove Tags from Subject
JAS wrote:

> justin@??? wrote:
>
>> JAS wrote:
>>
>>> I would like to be able to remove tags from a subject line.
>>> "[SPAM]this is spam". I would like to remove the [SPAM] so the line
>>> reads "this is spam" Can exim do this?
>>
>> If you're running SpamAssassin, just change the local.cf and comment
>> out the line that is similar to:
>>
>> rewrite_header Subject [SPAM]
>>
>>
>>
> I am not using spam assassin, this is being marked by a different system
> then sending it to mine. I figured out how to add stuff to the subject
> but, removing proves to be more difficult.
> I was thinking maybe somehow piping it, e.g. echo "[SPAM] this is spam"
> | sed -e 's/\[SPAM\]//'
> Removes [SPAM] just fine.


If you can set up a system filter, you can add and remove headers... I
haven't tested this at all (and have never tried something like this
either), but you might be able to do something like this:

if $h_Subject matches "/^\\[SPAM\\](.*)$" then
         headers add "New-Subject: $1"
         headers remove subject
         headers add "Subject: $h_New-Subject:"
         headers remove new-subject
endif


I've only been using exim for a few months now, so if this doesn't work,
someone else will probably fix my mistakes. ;)