Re: [exim] Exim4 & QueryProgram

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Marco
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] Exim4 & QueryProgram
Nigel Wade ha scritto:

> Marco wrote:
>
>> Hi all,
>> I have created in my exim4.conf.template a new router with this
>> characteristics:
>> maildir_overquota2:
>> driver = queryprogram
>> command = /usr/local/sbin/checkQuota $local_part $domain
>> command_user = mail
>> command_group = mail
>>
>> This is my script (/usr/local/sbin/checkQuota)
>> #!/bin/bash
>> echo PASS
>>
>> When I test exim with:
>> exim4 -oMr spam-scanned -d -bt root@???
>> is ok!
>>
>> But when I try with:
>> exim4 -bh IP I have this error:
>>
>> calling maildir_overquota2 router
>> >>> maildir_overquota2 router: defer for root@???
>> >>> message: maildir_overquota2 router: command returned non-zero
>> code 127
>> >>> ----------- end verify ------------
>> >>> accept: condition test deferred
>> 451 Temporary local problem - please try later
>> LOG: H=localhost () [127.0.0.1] F=<user1@???> temporarily
>> rejected RCPT root@???: maildir_overquota2 router: command
>> returned non-zero code 127
>>
>> Could you help me?
>>
>> Thanks
>> Marco
>>
>
> The debugging output should tell you a whole lot more than you've
> shown us above.
>
> Firstly, in the situation where it doesn't fail with non-zero return
> code 127, is the router being run at all? The -oMr spam-scanned might
> mean another router is accepting the address before the
> maildir_overquota2 router is called.
>
>
> In the second case, where it fails, who actually ran the script (it
> should have been user mail, group mail, but what does the debugging
> output show?). Does that user have permission to execute
> /usr/local/bin/checkQuota?



Hi Nigel,
In first case the debugging output is: (with exim4 -oMr spam-scanned -d
-bt root@???)
--------> maildir_overquota2 router <--------
local_part=root domain=domain.it
calling maildir_overquota2 router
maildir_overquota2 router called for root@???: domain = domain.it
uid=8 gid=8 current_directory=/
direct command:
argv[0] = /usr/local/sbin/checkQuota
argv[1] = $local_part
argv[2] = $domain
direct command after expansion:
argv[0] = /usr/local/sbin/checkQuota
argv[1] = root
argv[2] = domain.it
command wrote: PASS
maildir_overquota2 router passed for root@???

end exim proceed with another router.

In second case the debugging output is: (with exim4 -bh IP)
--------> maildir_overquota2 router <--------
local_part=root domain=domain.it
calling maildir_overquota2 router
maildir_overquota2 router called for root@???: domain = domain.it
uid=8 gid=8 current_directory=/
direct command:
argv[0] = /usr/local/sbin/checkQuota
argv[1] = $local_part
argv[2] = $domain
direct command after expansion:
argv[0] = /usr/local/sbin/checkQuota
argv[1] = koron
argv[2] = koron.it
maildir_overquota2 router: defer for root@???
message: maildir_overquota2 router: command returned non-zero code 127
----------- end verify ------------
accept: condition test deferred
SMTP>> 451 Temporary local problem - please try later

451 Temporary local problem - please try later
LOG: MAIN REJECT
H=localhost (name) [IP] F=<user1@???> temporarily rejected RCPT
root@???: maildir_overquota2 router: command returned non-zero
code 127
and exim stop.

Permission of checkQuota script:
ls -lah /usr/local/sbin/
-rwxrwxrwx root:mail checkQuota

Help :-(
Thanks

Marco