Wietse Venema put forth on 3/12/2011 8:43 AM:
> Stan Hoeppner:

>> It appears I did understand Giovanni's need correctly.  He should be
>> able to use Sahil's checkdbl.pl daemon with some modifications.  He'd
>> simply check that X-custom-header exists.  If it doesn't, 
> 
> Wietse:
>> header_checks can't detect missing headers.
> 
> Stan Hoeppner:

> Postfix is table driven, meaning it has table-driven mechanisms
> such as header_checks or aliases, and it has table lookup mechanisms
> such as hash and pcre.

Ok, I think I found my error now that you reminded me exactly how
header_checks works. :(

> This is possible because table lookup is based on a simple (key,
> value) interface, and because the same interface can be used with
> all table mechanisms: hash, btree, pcre, cidr, tcp, ldap, *sql.
> 
> - The key is the search string.
> 
>   This key either used "as is" with hash, btree, pcre, cidr, tcp;
>   or it is embedded in some blob as with ldap, *sql, but that
>   happens under the universal (key, value) interface level, and is
>   invisible for table-driven mechanisms header_checks or aliases.
> 
> - The value is the result or an error (not found, database error).
> 
> So yes, you can implement counters in the code that receives the
> query, but there exists no query that will retrieve that counter,
> or that will reset it. Again, Postfix table driven mechanisms must
> use the same table lookup interface regardless of the underlying
> table implementation, or else the whole thing is worthless.

Yep, I found my error.  (slouches in chair)  I had confused the SMTP
access policy delegation protocol sending a blank line to signal the end
of the request with header_checks behavior when using a TCP server.  I
was using Sahil's header_checks TCP server daemon as a reference, and
thinking of how relatively easy it should be to adapt it, but I had the
policy protocol in mind for passing the data, instead of header_checks.
 I guess I was suffering mind lock, thinking of how Giovanni's need
could be addressed by an external daemon, and lost track of which
Postfix mechanism needed to be used to pass the relevant information to it.

-- 
Stan

Reply via email to