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 [EMAIL PROTECTED]
is ok!

But when I try with:
exim4 -bh IP I have this error:

calling maildir_overquota2 router
 >>> maildir_overquota2 router: defer for [EMAIL PROTECTED]
>>> 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=<[EMAIL PROTECTED]> temporarily rejected RCPT [EMAIL PROTECTED]: 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 [EMAIL PROTECTED])
--------> maildir_overquota2 router <--------
local_part=root domain=domain.it
calling maildir_overquota2 router
maildir_overquota2 router called for [EMAIL PROTECTED]: 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 [EMAIL PROTECTED]

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 [EMAIL PROTECTED]: 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 [EMAIL PROTECTED]
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=<[EMAIL PROTECTED]> temporarily rejected RCPT [EMAIL PROTECTED]: 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

--
## List details at http://www.exim.org/mailman/listinfo/exim-users ## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://www.exim.org/eximwiki/

Reply via email to