Mailing List Archive

Re: qsmhook and cyrus: undue deferrals
At 23:14 16/02/96 -0500, Chris Harris wrote:
>Hello --
>
>I've just gotten qmail to work pretty well with the Cyrus (IMAP
>server) delivery program with the following ~alias/.qmail-default
>file:

(Good to note that Cyrus success. I might file that away for future
reference.)

>
>|/var/qmail/bin/qsmhook -x alias- -lsDFMPn
/usr/local/mail/cyrus/bin/deliver -f %g -d %u
>
>Delivery to valid cyrus mailboxes works fine. However, when the cyrus
>deliver program tries to indicate a "no such mailbox" error, qmail
>takes this to mean temporary, not permanent failure, as this log entry
>shows:
>
>Feb 16 23:05:43 justin qmail: 856163143.232947 delivery 207: deferral:
chris:_Mailbox_does_not_exist__/
>
>(on the machine, "chris" is not a valid account.)
>
>What is the propper way to get cyrus to generate a bounce message,
>instead of just a funny log entry like this? Do I need to write
>a wrapper around the deliver program to change the return code to
>something qmail-specific?

If you can encourage the Cyrus delivery program to generate a different exit
code, then you could confirm to the codes mentioned in "man qmail-command".
Ie:

command's exit codes are interpreted as follows: 0 means
that the delivery was successful; 99 means that the delivery
was successful, but that qmail-alias should ignore all
further delivery instructions; 100 means that the delivery
failed permanently (hard error); 111 means that the delivery
failed but should be tried again in a little while (soft
error). Currently 64, 65, 70, 76, 77, 78, and 112 are con-
sidered hard errors, and all other codes are considered soft
errors, but command should avoid relying on this.


So, a wrapper that translates exit codes is one way, of course avoiding a
wrapper might be a good move if your inbound mail load is high.


Regards.