Re: [exim] Adding a per-recipient message header

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Mike Cardwell
Fecha:  
A: exim-users
Asunto: Re: [exim] Adding a per-recipient message header
On Sat, 2006-10-14 at 15:19 -0700, SeattleServer.com wrote:

>> You can do this, by emulating/hacking a hash:
> This is exactly the thing I was looking for but wasn't occuring to
> me. I've already used emulated hash variables because I thought
> there were only 10 connection and 10 message variables, but it
> appears that there are actually 20 each in current exim releases
> so I can eliminate my other use of them...


Fantastic. There is one niggling thing that worries me about this
solution though, but it doesn't apply in my circumstance:

>> warn set acl_m4 = $acl_m4\n$local_part@$domain=YOUR_UNIQUE_ID


What if $local_part contains an '=' ? I guess it needs escaping
somehow...

This problem wouldn't exist if there were some inbuilt functions for
working with hash style acl variables, other than extracting from
them. Eg:

1.) ${hash_add{$acl_m4}{key}{value}}
2.) ${hash_get($acl_m4}{key}}
3.) ${hash_rem{$acl_m4}{key}}
4.) ${hash_exists{$acl_m4}{key}}

1.) Changes the value of acl_m4 and also returns the new acl_m4
2.) Returns the value of key in acl_m4
3.) Removes the value of key from acl_m4 and returns the new acl_m4
4.) Checks for the existance of key in acl_m4 and returns a boolean

Or similar.

> Works perfect! Thanks a million!


np.

Mike