Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!rutgers!iuvax!pur-ee!uiucdcs!uxc.cso.uiuc.edu!uicsrd!kai From: kai@uicsrd.csrd.uiuc.edu Newsgroups: comp.unix.wizards Subject: Re: Help with sendmail.cf Message-ID: <43200010@uicsrd> Date: Sun, 22-Nov-87 20:10:00 EST Article-I.D.: uicsrd.43200010 Posted: Sun Nov 22 20:10:00 1987 Date-Received: Fri, 27-Nov-87 21:39:10 EST References: <10900008@bradley> Lines: 42 Nf-ID: #R:bradley:10900008:uicsrd:43200010:000:1660 Nf-From: uicsrd.csrd.uiuc.edu!kai Nov 22 19:10:00 1987 Simple if you are running 4.[23] BSD. I can't help you if you've got any other flavor. Setup an alias in /usr/lib/aliases to feed the mail through a pipe to a program. Try: bugfile:"| cat >> /usr/local/lib/bugfile" bugfile:"| mail_filter" Which just feeds the mail msg through a pipe to the "cat" pgm. Add the above line (double quotes are neccessary) to /usr/lib/aliases and execute the "newaliases" command. If you see messages about the database files not existing previously, execute newaliases again. The above alias is flawed, of course, because without using some method of file locking, two mail messages delivered at the same time to "host!bugfile" may cause trash to appear in the file. I worked around that by writing a simple "cat"-like pgm that uses FLOCK to ensure exclusive access. If you want to peruse the file using Mail, you will have to make sure that an empty line appears before each mail message. Mail seems to expect "From
" to appear at the beginning of each mail message, otherwise you appear to have one HUGE msg. It is also possible for individuals to write their own personal mail filter. Setup a .forward file in your home directory that contains a similar pipe. For example: "| /homes/pwolfe/bin/mail_filter" does what you might expect it to. Useful applications can be written for this, a better "biff", separating mail heading for group accounts, vacation notification replies, etc. Beware!! You alone are responsible for any messages lost due to a faulty mail filter!! Hope this helps. Patrick Wolfe Internet: pwolfe@kai.com UUCP: ...!{uunet,ihnp4}!uiucuxc!kailand!pwolfe