Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.uwa.edu.au!disco.iinet.net.au!news.uoregon.edu!vixen.cso.uiuc.edu!newsfeed.internetmci.com!in2.uu.net!minerva.ibernet.es!artemis.ibernet.es!usenet From: Antonio Navarro Navarro <antonio@host.bemarnet.es> Newsgroups: comp.unix.bsd.freebsd.misc Subject: Problems redirecting e-mail Date: Mon, 24 Jun 1996 18:45:34 +0200 Organization: BemarNet Management Lines: 57 Message-ID: <31CEC62E.664C@host.bemarnet.es> NNTP-Posting-Host: ariadna.bemarnet.es Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 2.02b1 [es] (Win95; I) Hi all ! I need to process incoming e-mail directed to a particular account (for example to the POP account foo@bemarnet.es) with a program. I have modified the /etc/aliases files adding the following line : foo: "|/usr/local/bin/process" There is the source code in C lenguaje of the program called "process" : #include <stdio.h> #include <stdlib.h> int main() { int x; char ch; file *output; output=fopen("/usr/local/bin/majordomo.txt", "a+"); for(x=0;(!feof(stdin));x++) { ch=fgetc(stdin); putc(ch, output); } fclose(output); return(0); } As you can see the program should open a file called /usr/local/bin/majordomo.txt and append to it the e-mail content, in fact the program works fine when called through the command line (example : cat 123|/usr/local/bin/process") The mailer returns the following error : ----- The following addresses had delivery problems ----- "|/usr/local/bin/process" (unrecoverable error) (expanded from: foo) ----- Transcript of session follows ----- Memory fault 554 "|/usr/local/bin/process"... unknown mailer error 139 Any ideas ? Does anybody knows the meaning of the 139 error ? Thanks in advance. +-----------------------------------------------------------------------+ | Antonio Navarro Navarro E-mail: webmaster@bemarnet.es | +-----------------------------------------------------------------------+ | BemarNet Management Phone : +34-6-165.66.44 | | Makes business easier... ,,, Fax : +34-6-165.65.14 | | http://www.bemarnet.es (o o) | +------------------------------o00-(_)-00o------------------------------+ | Have a nice day - Have a nice day - Have a nice day - Have a nice day | +-----------------------------------------------------------------------+