On Wed, 2011-04-06 at 07:30 +0200, Arnaud Yonnet wrote: > hum I have one more question, > i create the script for replace dovecot deliver. it's work .cool :) > but if it's crash for many raison, for exemple the hard disk full, > Postfix Bounce the mail.
If hard disk is full, deliver should return EX_TEMPFAIL, not crash. > I changed the code error in my script but nothing. The error code should be EX_TEMPFAIL = 75, Postfix bounces anything else. > this my script it's not finish I'm not too good with Perl, but: > system("/usr/lib/dovecot/deliver -p $Mail -d $Recepient"); > if ( $? == -1 ) > { > print "command failed: $!\n"; > } > else > { > printf "command exited with value %d", $? >> 8; > } > } > } It prints the $? but doesn't forward the exit error code.. Of course, if only some deliveries fail but others don't, it becomes problematic! I think in such situation you should return success, and re-send the failed messages via sendmail. All of this would be much easier and more robust with v2.0 and LMTP.