On Saturday 14 October 2006 08:30, Mike Cardwell wrote:
> What would be nice is if you could have a hash style variable so you
> could connect a recipient with an ID. Then in the routers you could add the
> header depending on the recipient using "headers_add"
>
> 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...

> In the rcpt acl:
>
> warn set acl_m4 = [EMAIL PROTECTED]
>
> In the router:
>
> headers_add = X-SeattleServer-ID: ${extract
> [EMAIL PROTECTED]
>
> Let me know if it works for you. I've never seen anyone other than my
> self use this hack in an exim configuration. There's probably some evil
> reason that makes this method "wrong". But it still works.

Close but you're missing the pass/fail value arguments for extract.  Here's 
what I did:

acl_check_rcpt:
        warn    set acl_m4      = ${lookup pgsql{select 
"statistics_record_message_recipient" 
(${quote_pgsql:${acl_m6}}, '${quote_pgsql:[EMAIL PROTECTED]')} 
{${value}}fail}
                set acl_m10     = [EMAIL PROTECTED] ${acl_m10}

[...]

maildrop:
        [...]
        headers_add             = X-SeattleServer-ID: 
[EMAIL PROTECTED]


Works perfect!  Thanks a million!

-- 
SeattleServer.com Mailing Lists - Casey Allen Shobe
[EMAIL PROTECTED] - http://seattleserver.com

-- 
## List details at http://www.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://www.exim.org/eximwiki/

Reply via email to