RE: [Exim] Rewriting subject header.

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Ted Cooper
Dátum:  
Címzett: exim-users
Tárgy: RE: [Exim] Rewriting subject header.
> From: Stephen Fulton
> Sent: Sunday, 21 March 2004 4:11 AM
>
> I'm using Exiscan, and it allows me to add an additional
> Subject header
> prefixed with "SPAM" (or some variation). Since it adds the
> header, some
> MTA's get confused and display the first Subject header,
> without the SPAM
> tag. I would prefer to rewrite the subject header entirely.
> How can I do
> this? I recall a thread about using a script, but I haven't
> been able to
> find it in the archives.


Always wanted to say this - RTFM.

I got this exact solution from the exiscan-acl-examples.txt and it is
what I use on my system. Further details in the docs.

[quote]
For the subject tag, we prepare a new subject header in the
ACL, then swap it with the original Subject in the system
filter.

In the DATA ACL, put this:
/* -----------------
warn message = X-New-Subject: *SPAM* $h_subject:
     spam = nobody
------------------ */


In the system filter, put this:
/* -----------------
if "${if def:header_X-New-Subject: {there}}" is there
then
headers remove subject
headers add "Subject: $h_X-New-Subject:"
headers remove X-New-Subject
Endif
[/quote]