[exim] local scan

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Gerald Walden
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: [exim] local scan
I am attempting to adopt the SA-exim local scan code.

I have pretty much followed the example from SA-exim.c.

I can read the headers and process them -

but when it comes to processing the data I am following the same
process as in local_scan.c (the example given for the local scan for
SA) -

AND
---------------------------------------------
the code is:

  ret=fstat(fd, &stbuf);
     CHECKERR(ret,"fstat fd",__LINE__);


     /* this is the body size plus a few bytes (exim msg ID) */
     /* it should be 18 bytes, but I'll assume it could be more or less 
*/
     fdsize=stbuf.st_size;
     scansize=fdsize;
     fprintf("fdsize = %d\n", scansize);
----------------------------------------


and the result is that fdsize = 0 so if you look at the corresponding
telnet session that I initiated with exim:

Mail From: aldenge@???
Rcpt To: aldenge@???
Data
hello there
.

I get the following:
LOG: I73GEV-0000FG-7J sent headers to domainkeys. Sending body...
trying to read 0 bytes from file

For some reason that I do not understand - the file descriptor does not
seem to be in sync with the body of my message

Here is how I "launched" exim:

/usr/exim/bin/exim -bh 127.0.0.1

please tell me what I am doing wrong


Kindest Regards

Jaraslav