--Multipart_Tue_Dec__2_18:33:28_1997-1 Content-Type: text/plain; charset=US-ASCII lenneis@statrix2.wu-wien.ac.at (Joerg Lenneis) writes: >purpose unless the ISDN link is open looks a bit hackish to me. It >would be interesting to check how difficult it would be to reset >/var/qmail/queue/lock/tcpto. Here is what we use at ping.de, hacked together from chunks of Dan's code. I sure wish the single site that needs this would use serialmail, though. Compile it in the qmail-1.01 source directory with suitable additions in the Makefile... qmail-del-tcpto: \ load qmail-del-tcpto.o ./load qmail-del-tcpto open.a lock.a seek.a qmail-del-tcpto.o: \ compile qmail-del-tcpto.c ./compile qmail-del-tcpto.c --Multipart_Tue_Dec__2_18:33:28_1997-1 Content-Type: application/octet-stream Content-Disposition: attachment; filename="qmail-del-tcpto.c" Content-Transfer-Encoding: 7bit #include "open.h" #include "readwrite.h" #include "exit.h" static char tcpto_buf[1024]; static char tcpto_buf_zero[1024]; static int fdlock; static int getbuf() { int r; int fd; fdlock = open_write("queue/lock/tcpto"); if (fdlock == -1) return 0; fd = open_read("queue/lock/tcpto"); if (fd == -1) { close(fdlock); return 0; } if (lock_ex(fdlock) == -1) { close(fdlock); close(fd); return 0; } r = read(fd,tcpto_buf,sizeof(tcpto_buf)); close(fd); if (r < 0) { close(fdlock); return 0; } r >>= 4; if (!r) close(fdlock); return r; } void main() { int n; if (chdir("/var/qmail") == -1) _exit(111); n = getbuf(); if (!n) _exit(1); seek_set(fdlock, 0); write(fdlock, tcpto_buf_zero,sizeof(tcpto_buf_zero)); close(fdlock); _exit(0); } --Multipart_Tue_Dec__2_18:33:28_1997-1