Aidas Kasparas wrote:
> Hi,
> 
> I have learned that pythonfilter's xfilter can change contents of the
> message. But it does that in somehow complicated way. I would like to
> know is it the only correct/safe way to change message contents?
> 
> What bad will happen, if in filter I will
> A) read message (not the control file) file;
> B) create other file with modified contents;
> C) rename that new file to the old name of data file;
> D) [not sure for this] if more than one control file name was given,
> create hardlinks to new data file with .i suffixes for every control
> file [except first?]
> 
> Will it work? Will it work if some extra step(s) will be made? Or is
> it completely broken for some reason I didn't find in docs?

No, that won't work.  If this approach worked, the pythonfilter
wouldn't be going to all that trouble.

The problem is that Courier has already read the message into memory
before calling the filters and does not read it again after the
filtering.  So if you change the message file, the changes will not
be reflected in the copy of the message that is already in memory.

-- 
Bowie


_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to