Lähettäjä: W B Hacker Päiväys: Vastaanottaja: exim users Aihe: Re: [exim] add_header when header already exists?
Patrick von der Hagen wrote: > Hi all,
>
> if a user activates an ooo-message our exchange-server sends
> auto-replies even to spam the exchange-server itself judged to be spam
> (!!!). However, it does not sent auto-replies if the message contains a
> "Precedence: (bulk|junk|list)"-header.
>
> As you can guess my exchange-admin told me to include a "Precedence:
> junk" header in every message classified as spam by spamassassin. I'm
> not sure I really want to do that, since such a header might already
> exist and I don't dare to alter headers that are already present.
>
> Now my question: how does exim react if I do "add_header" (during acl)
> for a header that already exists?
If you have not installed the 'mind_reader_pcre' module it JF does what it is
told to do. Adds the header.
IOW - (look at some of the headers of posts to this list) Exim just doesn't care
about pre-existing headers of the same title unless you program it to do so, as in:
- looking for some sort of full/partial/wildcard match, branching accordingly
- stripping or re-ordering headers.
>
> What happens if a message has "Precedence: list" and I do "add_header =
> Precedence: junk"?
> Would exim alter the existing header,
No.
> would exim add a second header or
Yes.
> would exim skip adding that header?
>
If you program it to, yes. ELSE not.
> What happens if a message has "Precedence: junk" and I do "add_header =
> Precedence: junk"?
> Would it result in one or two header lines?f
>
(At least) two.
> The documentation doesn't mention the case that a header might already
> exist. But I think I could solve the issue using string-expansion anyway.
>
>
Not sure what 'solve' means to you, but it is dirt-simple to do some tests.