[exim] Using ${run ...} to execute external command, dealin…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Morten W. Petersen
Dátum:  
Címzett: exim-users @ exim. org
Tárgy: [exim] Using ${run ...} to execute external command, dealing with result, Exim syntax
Hi,

I'm trying to use an external python script to verify that a remote SMTP
host
can accept a recipient. Using Exim's callout didn't work (getting too many
write lock issues).

The configuration looks like this:

[...]
begin acl

greylist_acl:
    warn set acl_m8 = ${run{/opt/nidelven/do_remote_callout.py 
$local_part $domain $sender_address $sender_host_address 
$sender_helo_name}{$value}{error}}
        log_message = greylisting ACL result: $acl_m8
    accept
        condition = ${if eq{$acl_m8}{greylist}{1}}
    deny
[...]


However, I don't see any entries in the log, so it doesn't look like the
command
or the logging is being run. Am I missing something to get logging working?

What is the right way to access the result of the command? Is that
stored in
acl_m8? Does $runrc represent the exit value of the command?

What's the right syntax for checking the exit value against 0, 1 etc?

Thanks,

Morten

--
Morten W. Petersen
Manager
Nidelven IT Ltd

Phone: +47 45 44 00 69
Email: morten@???