Re: [Exim] Message-ID's

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Vadim Vygonets
Datum:  
To: exim-users
Betreff: Re: [Exim] Message-ID's
Quoth Hans Matzen on Sun, Oct 31, 1999:
> > So the job of making the Message IDs correct falls, I guess, on
> > MTA's shoulders. Perhaps it would be easy to do it using the
> > system filter, e.g.,
> >
> > if "${if def:h_Message-Id {yes}}" is yes and
> >     $h_Message-Id matches "@.*\\\\.local$" then
> >     headers remove Message-Id
> >     headers add "Message-Id: <${local_part:$h_Message-Id:}@${lookup{${domain:$h_Message-Id:}}dbm{/var/exim/data/msgid-hosts}{$value}}\n"
> > endif

> >
>
> I tried a bit and got
>
> if "${if def:h_Message-Id: {yes}}" is yes and 
>     ${lc:${domain:$h_Message-Id:}} matches "regex.4.your.domain"

      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Smart.  Why didn't I think about it?  But I think I'd actually
use:
      ${lc:${domain:$h_Message-Id:}} ends ".local.domain"


> then 
>       headers add
> "X-tmp-Message-Id:<${local_part:$h_Message-Id:}@uniquemsgid.my.friendliy.domain>\n"
>       headers remove "Message-Id"      
>       headers add "Message-Id:$h_X-tmp-Message-Id:" 
>       headers remove "X-tmp-Message-Id"  
> endif 

>
> I do not know why I have to use the X-tmp... stuff, but without
> it it is not possible to get the message id after you removed it.
> Is it variable dependant or doesnt this work for system
> filters ?


In the documentation about filters, I did not find any hint what
the correct behavior should be. It seems to me that right after
"headers remove", the removed headers become unavailable.

> e.g. headers_remove "reply-to", headers_add "Reply-to:
> $h_Reply-to: seems to work in a transport or director


Yup, they are preserved there.

> Vadim: check my msg-id am i now promoted from a very very bad
> to a bad guy only ? ;-))


Nice. "@uniquemsgid.". This message is to announce that Mr.
Hans Matzen is promoted to the status of Bad Guy.

Vadik.

--
To the systems programmer, users and applications serve only to
provide a test load.