Hello,

how do I make qpsmtpd handle a mail with multiple recipients as several 
completely separate transactions?

As far as I understand a mail with two recipients triggers hook_rcpt 
twice. Problem: hook_rcpt returns only one return value.

Imagine a mail like this:
echo test | mail -r [EMAIL PROTECTED] -s test37 \ 
[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED]

Now [EMAIL PROTECTED] doesn't exist so my check (hook_rcpt) 
actually should return DENY, but recipient1 and recipient3 do exist so 
my check actually should return OK.
In fact if hook_rcpt returns DENY for my non existent recipient2 the 
other two won't get their messages.

Currently I save the returns, evaluate them afterwards (hook_data) and 
return OK as soon as at least one of them is OK.
Does anyone know an easy way how to hanldle this case, eg. how to send a 
reply "[EMAIL PROTECTED] doesn't exist"?

Related case:
Header lines can be accessed in hook_data_post which is only run once. 
How can I add different headers for each recipient like 
"X-Test-Redirected: for [EMAIL PROTECTED] to 
[EMAIL PROTECTED]"? Of course this should not be 
written to the headers of recipient3.

I think qpsmtpd does nothing wrong, it just handles mail. So in the end 
my question boils down to "how do I make qpsmtpd handle a mail with 
multiple recipients as several completely separate transactions?"

Thanks for your ideas, Joe

Reply via email to