Re: [Exim] how to check remote recipient

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Ryan Tracey
Data:  
Para: 'exim-users'
CC: Benjamin Ritcey
Assunto: Re: [Exim] how to check remote recipient
Hi

> You can use LDAP to see if the address is valid. See
> http://www.exim.org/exim-html-4.30/doc/html/C043.txt, especially the
> 'exchangeothermailboxlookup' and 'exchangemaillookup' sections.
>
> I started with this setup and it works fine (I've switched to generating
> a flat-file every hour or so, so I don't have to rely on the Exchange
> server being up).


Using LDAP works for me. Although, I too would like to use a regularly
generated flat file in a router above the exchange/ldap routers in the
following way:

rtr_exchange_list:
    ...
    local_parts = /path/to/list


rtr_exchange_ldap:
    ...
    condition = "${lookup ldap ....etc}"



Where I am hitting a problem is in generating the list of local_parts.
Ideally, I would like to send $local_part to a script that takes it as
input and updates the text file if $local_part is not already in the
text file. Something like:

    command = /path/to/script $local_part


How can I get a message to go though the exchange/ldap router as well as
a router capable of piping the message (and/or the $local_part
parameter) to a script.

I have RTFM'd and seen that what I might do is use 'unseen' in the
rtr_exchange_ldap and pass the message to another router/transport which
will pipe the message as required.

I could 'headers_add = "X-foo: logme"' in rtr_exchange_ldap and then
'condition = "${if {def:h_X-foo...}"' in the next router to create the
matching condition.


So I would have something like:

rtr_exchange_list:
    ...
    local_parts = /path/to/list


rtr_exchange_ldap:
    ...
    condition = "${lookup ldap ....etc}"
    headers_add = "X-Ldap: $local_part"
    unseen


rtr_log_ldap_local_part:
    ...
    condition = ${if {def:h_X-Ldap:}{}{yes}{no}}
    pipe_transport = somepipetransport



I guess my questions are whether this is the best approach or whether I
am overcomplicating things. I have in the past overlooked the obvious.


Thanks for any comments, questions, or suggestions.

Cheers,
Ryan

--
Ryan Tracey          | +27 21 917 8909
Thawte Certification | https://www.thawte.com
To get something done, a committee should consist of no more than three
persons, two of them absent.