Re: [exim] Testing pipe transport

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Peter Velan
Datum:  
To: exim-users
Betreff: Re: [exim] Testing pipe transport
am 2006-05-19 14:09 schrieb Tony Finch:
> On Fri, 19 May 2006, Peter Velan wrote:
>>
>> A robot sends a mail to exim, which target is a real external address.
>> Exim has to detect it as a special one (by means of ACLs) and routes it
>> to a perl script via pipe transport. My perl script creates a totally
>> new message and injects this locally to exim.
>
> Address-related things should be done by routers, not ACLs. ACLs are for
> client-related stuff.


Hmm, may be my explanation was confusing. A message comes in. By means
of acl_smtp_data I do some checking stuff and set a variable, indicating
special or normal message (no messing with address related stuff here).
The first router selects the piping transport if variable says "special"
and ends with 'no_more'.

After thinking about my testing concept, its evident that I'm doing too
much at once - thats's bad practice! First debug ACLs, then - and only
then! - do next testing steps (router, transport, etc.).

>> So what I want is this: inject message locally to exim with debugging
>> turned on and use eximtest.conf, but whatever happens, never deliver to
>> original real address, instead deliver to a local test account. For
>> sure, if - but only if! - after I made my job, then no message will
>> leave exim.
>
> I'd suggest using a macro for this. e.g. I have the following; you might
> want to use something similar to change your routing in debug mode.
>
> .ifdef DEBUG
> log_selector    = +all
> .else
> log_selector    = -retry_defer -skip_delivery -host_lookup_failed \
>           +incoming_interface +incoming_port +smtp_confirmation \
>           +sender_on_delivery +return_path_on_delivery +delivery_size \
>           +received_recipients +all_parents +address_rewrite \
>           +tls_certificate_verified +tls_peerdn \
>           +smtp_protocol_error +smtp_syntax_error \
>           +deliver_time +queue_time \
>           -lost_incoming_connection
> .endif


Oh yes! Never thought about using conditionals in config. I could
conditionally add a special router following the (possibly failed 1st
one) which routes anything received to my testing account! A very
helpfull hint, Tony.

Exim is a phantastic piece of software, with superb documentation and a
lot of skillfull helping hands around!

Thanks all, I've learned (and going to learn) a lot,
Peter