On Thu, 19 Dec 2002, Mxsmanic wrote: > What about appending directly to the mailbox file under /var/mail/$USER with > the script? It looks like the format of the file is very simple. Why > wouldn't that work? I've tried writing to it, but I can't, at least not > when the script runs from the aliases file (works fine when I run it myself, > though). > > Procmail is exactly the sort of bloated tool that I'm trying to avoid. > > I don't know that calling sendmail again would be _that_ hard. After all, > I'm mostly just copying the input to the output. I guess all I'd have to do > would be to change the recipient address to avoid a loop (?). Right? Can't > I just leave all the headers intact otherwise? >
Yes, using aliases would probably work to avoid a loop. You may even want to clean out the Cc: and To: lines of anyone and everyone you didn't want getting another copy (I'm not 100% sure this is the case, but it seems to me that if there's a long list of people Cc:'d, calling sendmail again without stripping them out will send them another email).. Someone else mentioned it, I think it's worth mentioning again. I'm not 100% sure what you want to do, but I'm 99% sure you'd be better off using Sendmail's Milter interface than trying to mess around with aliases and .forward files. Check out http://www.samag.com/documents/s=7178/sam0206l/. It's got an example of a small perl script Milter, and the sendmail source has some others (in C, last I checked). - Jeff Jirsa To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
