Hi Sam Varshavchik, you wrote. >> Hi, >> Am I right assuming that courierlocal's stdin is a file so that the >> lseek calls make sense? Who/where does that file get opened? And what is >> going to happen if I write to that file? SV> courierlocal is a daemon that delivers local mail. When there's local mail SV> to be delivered, courierlocal opens the message file, drops root, and runs SV> deliver, with the message file on stdin.
I should have been more specific: I was refering to courier/module.local/deliver.c which also does dynamic delivery among other things (didnt look at all of it but you would know better than I anyway ;-). SV> The deliver process, now running under the recipient's uid, only has a SV> read-only descriptor on stdin. Still for this to work with more than one delivery, lseek(descriptor) has to work to rewind it. I can't just use a pipe as stdin for the deliver process as there wouldn't be any more data the for the second and subsequent reads :-(. >> If that isn't possible (I didn't ever get round understanding why I'm >> not supposed to change the MIME structure of the mail during >> delivery), what error code must I supply to silently discard a mail >> after reinjecting the processed version thereof (suppose that would >> have to be done by means of sendmail, as I'm not allowed to talk to >> submit directly, right?)? SV> If invoked from a .courier file, a program that terminates with exit code 99 SV> will terminate delivery of that message, to this recipient. Without bounce I assume. Not feeling like creating temporary files for local (storing the data in memory and assigning stream controls to that buffer is theoretically possible but a rather bad hack and not exactly safe either), I'll probably go that route. Maybe add a feature to deliver.c that allows it to decide whether a filter was run on that message already without modifying the filter. Regards, Gabriel ------------------------------------------------------- This SF.net email is sponsored by: eBay Get office equipment for less on eBay! http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 _______________________________________________ courier-users mailing list [EMAIL PROTECTED] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
