[Exim] local_scan - child_open()

Page principale
Supprimer ce message
Répondre à ce message
Auteur: . kibble .
Date:  
À: exim-users
Sujet: [Exim] local_scan - child_open()
Hey there guys and gals,

I need a touch of help with the child_open() function in the local_scan API.
I've had no luck in getting it to work. All I would like to do is run a
command which will 'cat' the headers into a file that the exim binary can
read and write into. I have set the permissions in the directory and
everything on that side of things seems fine. Here is a snip of my code so
you can see what I'm roughly try to do.

////////// start code //////////

sprintf(kspam.path_argc, "cat > /home/mail/%s",
recipients_list[kspam.i].address);
log_write(0, LOG_MAIN, "kspam: local_scan: path_argc: [%s]",
kspam.path_argc);
kspam.ks_exim_argc = argv_path(kspam.ks_exim_argc, kspam.path_argc);
kspam.ks_pid = child_open(kspam.ks_exim_argc, NULL, 0, &kspam.ks_infdptr, \
        &kspam.ks_outfdptr, TRUE);


///////// end code /////////

As you can see I'm trying use the child_open, but it's not doing anything.
I'm using another function which does all the fdopen, fprintf, fclose and
child_close. I'm I even meant to use child_close ? Is there a simple & small
working example I can use to reference to so I can see where I’m going
wrong? Any help what so ever would be great or even if someone has any code
I can look at so I can learn by looking at it would be great too.

Thanks in advance...

Kibble

_________________________________________________________________
Express yourself with cool emoticons - download MSN Messenger today!
http://www.msn.co.uk/messenger