Actually, I was looking at the release notes, not the man page, but yes I
should have known that from version 1.0. Thanks.

As for the empty messages, I found that if my filter has no output a blank
message is sent to the envelope recipients. I circumvented by this
modification to qmail-qfilter.c v1.0:

/* remap the appropriate FDs and exec qmail-queue */
int run_qmail_queue(int tmpfd, int envpipe[2])
{
struct stat mystat;
struct stat *ptr_mystat;
ptr_mystat=&mystat;
fstat(tmpfd,ptr_mystat);
if (mystat.st_size > 5){
  if(close(envpipe[1]) == -1 ||
     dup2(tmpfd, 0) != 0 || close(tmpfd) == -1 ||
     dup2(envpipe[0], 1) != 1 || close(envpipe[0]) == -1 ||
     close(2) == -1)
    return QQ_WRITE_ERROR;
  execl(QMAIL_QUEUE, QMAIL_QUEUE, 0);
  return QQ_INTERNAL;
}
return QQ_SUCCESS;
}

It's kind of a hack, but it works so far. Should I continue to use this method or is 
there a better solution here?

Thanks again for all your help and patience with a newbie. :)

Josh






Bruce Guenter <[EMAIL PROTECTED]> on 07/19/2000 06:14:42 PM

To:   [EMAIL PROTECTED]
cc:   [EMAIL PROTECTED]
Subject:  Re: How to grab the envelope contents while filtering?


On Wed, Jul 19, 2000 at 05:01:48PM -0400, [EMAIL PROTECTED] wrote:
> Yup, I use the mess822 stuff too, but I need envelope addresses, not
header
> addresses.
>
> I see now that qmail-qfilter 1.3 sets QMAILRCPTS to the message
recipients.
> I assume this is envelope recipients. If so, I'm halfway there. I just
need
> to doctor up 1.3 a little bit to also pass a variable for envelope sender
> (and to drop empty messages). Can anyone confirm?

The same man page tells you that qmail-qfilter sets QMAILUSER and
QMAILHOST to the username and hostname portions of the envelope sender.
Dropping empty messages is something you can do in your filter.
--
Bruce Guenter <[EMAIL PROTECTED]>                       http://em.ca/~bruceg/


$RFC822.eml

C.DTF

Reply via email to