On Tue, 11 Dec 2001, Sam Varshavchik wrote:

> Jim Cooley writes: 
> 
> > Is there any way for a perlfilter to see a bcc address, especially
> > if that bcc address is causing the server to deliver the mail to a
> > local account?
> > 
> > Any help is greatly appreciated.
> 
> The only thing that can be done is to read the control file, and fetch the 
> envelope recipients from the control file. 

Except that filters aren't given any indication of what the control file 
for this message is.

The patch that I've attached modifies submit2.C so that the contol file 
names are given to the filters.  I believe that this is the absolute 
minimum change (removes about 10 LOC from get_msgid_for_filters) to get 
courierfilter to work as it is documented to.

Several people working on courier global filters have complained that 
global filters aren't given the information that the documentation claims 
that they should.  Will this behavior or the documentation be corrected?

-- 
If I had a dollar for every brain that you don't have,
        I'd have one dollar. - Squidward to SpongeBob
diff -ruw courier-0.36.1/courier/submit2.C courier-0.36.1-filter/courier/submit2.C
--- courier-0.36.1/courier/submit2.C    Thu Nov 29 19:41:24 2001
+++ courier-0.36.1-filter/courier/submit2.C     Wed Dec 12 13:59:57 2001
@@ -968,25 +968,13 @@
 {
 SubmitFile *objptr= *(SubmitFile **)p;
 CString        ctlname;
-struct ctlfile ctf;
-CString        msgid;
 
        if (objptr->num_control_files_created == 1)
                ctlname=objptr->name1stctlfile();
        else
                ctlname=objptr->namefile("C", n+1);
 
-
-       if (ctlfile_openfn(ctlname, &ctf, 1, 0))
-               clog_msg_errno();
-
-int    i=ctlfile_searchfirst(&ctf, COMCTLFILE_MSGID);
-
-       msgid="";
-       if (i >= 0 )
-               msgid=ctf.lines[i]+1;
-       ctlfile_close(&ctf);
-       return (msgid);
+       return (ctlname);
 }
 
 static void print_xerror(const char *address, const char *errbuf, int isfinal)

Reply via email to