Hi qmail users,

I have configured a virtual domain for processing the messages through 
a filter and then re-send them. I used a classic solution with a 
.qmail file:

virtualdomains:         debug:debug 
.qmail-debug-default:   | myfilter | qmail-inject -f "$SENDER" -- "$DEFAULT"


This solution works fine but I have some doubts about the behaviour 
when the filter script (myfilter) finishes unexpectedly. If the script 
receives a signal (managed or not) that forces it to finish, 
qmail-inject will simply understand that the message's body has 
finished and will send a incomplete message. The original body will be 
lost forever.

I explored a solution catching the signal in the script. The signal 
handler sends a new signal (INT) to finish qmail-inject with a proper 
error code for showing that the message hasn't been delivered. 

Now there is my problem: Which is the proper qmail-inject's pid?

We can't use the group pid because all qmail processes belongs to 
qmail-send's group. We can try with parent pid (qmail-inject process 
is the myfilter's process parent) but if qmail-inject finishes before 
the script, this could send signals to the "init" (the parent 
for orphans).

Do you have any signal reliable solution ?

Thanks in advance for your help,

        David Jorrin.

PD: Please send me a copy by e-mail. Thanks again.
====
David Jorrin <[EMAIL PROTECTED]>

   "This chapter is about Laziness, Impatience
    and Hubris because this chapter is about
    good software design"
    Larry Wall, Tom Christiansen & 
    Randal L. Schwartz [Programming Perl]
  


----------------------------------------------------------------
Get your free email from AltaVista at http://altavista.iname.com

Reply via email to