[comp.mail.elm] Filter Problem

david@wubios.wustl.edu (David J. Camp) (06/12/89)

Hello, I am using filter 2.1 PL1 and 2.2 PL8 on a Sun 3/260 running
SunOS 4.01.  I have a rather longish ~/.filter-rules file.  With version
2.1, when I type 'filter -r' it prints a few of the rules, then gives a
segmentation fault.  When I do the same thing with version 2.2, I
immediately get a 'Bus error'.  I also have it configured in my
~/.forward file to place incoming messages in various notebooks.  I know
some of the messages are being placed correctly, but I have not tested
it completely enough to know if it is getting these errors while
handling messages.

Any help would be appreciated.  -David-

-- 
Bitnet:   david@wubios.wustl                ^      Mr. David J. Camp
Internet: david%wubios@wucs1.wustl.edu    < * >    Box 8067, Biostatistics
uucp:     uunet!wucs1!wubios!david          v      660 South Euclid
Washington University (314) 36-23635               Saint Louis, MO 63110

brian@redneck.intel.com (Brian L. King) (11/13/90)

	I am a *relatively* new user of this news-service stuff.  I have been 
reading mostly (and learning!).  I have been using elm for a goodly while
(HIGHEST regards to its creators) and have now (thanks to you folks) become
interested in using this "filter" thing.

	Some problems though....

	I've read (what appeared to be) the appropriate docs, set up my environ-
ment ($HOME/.forward, $HOME/.elm/filter-rules), and anxiously executed 
'filter -r'.

	Results:

filter (brian): Couldn't read user filter rules file!
filter (brian): Couldn't get rules!

	First thing I thought about was directory perms (mine are a touch strin-
gent).  So, I opened up my HOME dir (and .elm), rwx fer all...still no luck.
Perms on filter-rules rw-fer-all also.

	I want to provide you folks with all/any info you may need, so I'll
include the listing of my simplistic (hopefully correct) filter-rules file:

$cat .elm/filter-rules
#
#
if ( subject = "test" ) save /usr/tech/brian/tmp/MAIL

and .forward:
"| /usr/local/bin/filter -vo /usr/tech/brian/.elm/filter.err"



	Oh, BTW, when I tested this thing anyway (i.e. sent mail to myself w/
subject = "test"), there DID appear a filter.err file in my .elm dir.  So it
CAN write to that directory.

	I'm running AT&T UNIX SysV 3.2.2.2 on a 386@33MHz and I'm in a Korn-
shell.


	Any takers?


	Thank you for your time.





--
* * * * * * * * * * * * * * * \ "The country DJs know that I'm an outlaw,
* Brian L. King               |  they'd never come to see me in this dive,
* Intel Corporation           |  where bikers stare at cowboys
* Hillsboro, OR               |  who are laughin' at the hippies
* (503) 696-5751              |  who are prayin' they'll get out o' here
alive."
* brian@redneck.hf.intel.com  |  		-David Allen Coe
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

julian@comp.lancs.ac.uk (Julian G. Self) (05/11/91)

Basically, I am having trouble getting the filter program to work properly...
The rules and actions, etc all work, but as soon as the incoming mail is
appended to my mailbox or folder the initail From line disappears!  The means
elm assumes it is a corrupt mail file!! ARG!!! even though its created it 
itself!.

Any pointers appreciated either posted or mailed.

Thanks

	Julian..


-- 
NAME:	Julian G. Self 			PHONE: +44 524 65201 ext 3816
EMAIL:  julian@uk.ac.lancs.comp         FAX:   +44 524 381707
POST:	University of Lancaster, Department of Computing, Engineering Building,
        Bailrigg, Lancaster, Lancashire, LA1 4YR, UNITED KINGDOM.

greg@enterprise.Sun.COM (Greg George - Sun Project Development Manager - Midwest ) (06/26/91)

Dudes and Dudettes;
	I am running SunOS 4.1.1 and am trying to get filter running.
I have it compiled and it runs properly (sort of). If I try to put
an entry info .forward to pipe my mail through filter, sendmail
complains that it can't forward mail to a executable program.
HELP!!!

thanks!

greg

klr@decuac.dec.com (Kurt Reisler -- UNISIG Chairman) (06/27/91)

In article <5496@texsun.Central.Sun.COM> greg@enterprise.Central.Sun.COM writes:
>	I am running SunOS 4.1.1 and am trying to get filter running.
>I have it compiled and it runs properly (sort of). If I try to put
>an entry info .forward to pipe my mail through filter, sendmail
>complains that it can't forward mail to a executable program.

What do you know?  The exact same thing happens when I make use of
"filter" under HP-UX on a HP9000/835.  There is also a problem if the
.elm directory is mode 700, filter is unable to create the log file in
there.  However, it runs just fine under ULTRIX 4.1 on both my VAXen and
RISC platforms.   I think the problem is in sendmail.

Anyone got any suggestions?

elaps@lut.ac.uk (Alan Schwarzenberger) (06/27/91)

  I have filter working on HP9000 (cluster of one 870 and three 855's).
Sendmail is the mail transport agent. ~/.elm has rwx pemissions for me
only. I write the error file to /tmp. There are several quirk's !! First
ignore the man page (if you have the same one as our's) and read "The
Elm Filter System Guide". 
  My .forward file contains:

"|/disks/disk15/el/elaps/bin/forward_filter"
(with all the quotes and everything)

This is a shell script that contains

#!/bin/sh
PATH=/usr/bin:/bin:/usr/lib:/usr/local/bin:/hpc/disks/disk15/el/elaps/bin
export PATH
if test "`hostname`" != hpc
then
	exec sendmail -oi -ba "`whoami`@hpc"
else
	add_unix_from | filter -o /tmp/`whoami`.filter.errors
fi

The add_unix from is a C-program that the System Administrator here
gave me. Apparently (I quote him) "the Elm filter requires a unix style
'From sender date' header at the start of all mail messages. When you
put filter in your .forward file this header is removed by the system
before running your filter program."  So this adds program adds it back
on. It is possible that this is a local modification to sendmail (?). 

The filter rules are in ~/.elm/filter-rules. I always check them with
filter -r as soon as I have altered them. In Elm you HAVE to set
keepempty=ON, as filter failed if the mailbox it wanted to put the
message in didn't exist (I think this was to do with permissions on the
/usr/mail directory. A final quirk is that filter creates the error
file, and then deletes it again if it doesn't find any errors, so check
it's non-zero size to see if any errors have occured. 

-- 

============================================================================
Alan Schwarzenberger    tel +44 509 222849     A.P.Schwarzenberger@lut.ac.uk
International Electronics Reliability Institute, Loughborough University, UK

greg@enterprise.Sun.COM (Greg George - Sun Project Development Manager - Midwest ) (06/28/91)

In article <1991Jun27.085737.4955@lut.ac.uk>, elaps@lut.ac.uk (Alan Schwarzenberger) writes:
|> 
|>   I have filter working on HP9000 (cluster of one 870 and three 855's).
|> Sendmail is the mail transport agent. ~/.elm has rwx pemissions for me
|> only. I write the error file to /tmp. There are several quirk's !! First
|> ignore the man page (if you have the same one as our's) and read "The
|> Elm Filter System Guide". 
|>   My .forward file contains:
|> 
|> "|/disks/disk15/el/elaps/bin/forward_filter"
|> (with all the quotes and everything)
|> 
|> This is a shell script that contains
|> 
|> #!/bin/sh
|> PATH=/usr/bin:/bin:/usr/lib:/usr/local/bin:/hpc/disks/disk15/el/elaps/bin
|> export PATH
|> if test "`hostname`" != hpc
|> then
|> 	exec sendmail -oi -ba "`whoami`@hpc"
|> else
|> 	add_unix_from | filter -o /tmp/`whoami`.filter.errors
|> fi
|> 
|> The add_unix from is a C-program that the System Administrator here
|> gave me. Apparently (I quote him) "the Elm filter requires a unix style
|> 'From sender date' header at the start of all mail messages. When you
|> put filter in your .forward file this header is removed by the system
|> before running your filter program."  So this adds program adds it back
|> on. It is possible that this is a local modification to sendmail (?). 
|> 
|> The filter rules are in ~/.elm/filter-rules. I always check them with
|> filter -r as soon as I have altered them. In Elm you HAVE to set
|> keepempty=ON, as filter failed if the mailbox it wanted to put the
|> message in didn't exist (I think this was to do with permissions on the
|> /usr/mail directory. A final quirk is that filter creates the error
|> file, and then deletes it again if it doesn't find any errors, so check
|> it's non-zero size to see if any errors have occured. 
|> 
|> -- 
|> 
|> ============================================================================
|> Alan Schwarzenberger    tel +44 509 222849     A.P.Schwarzenberger@lut.ac.uk
|> International Electronics Reliability Institute, Loughborough University, UK

Is there anyway to get your add_unix_from program???

greg

syd@DSI.COM (Syd Weinstein) (06/28/91)

In article <5615@texsun.Central.Sun.COM> greg@enterprise.Central.Sun.COM writes:
>In article <1991Jun27.085737.4955@lut.ac.uk>, elaps@lut.ac.uk (Alan Schwarzenberger) writes:
>|> The add_unix from is a C-program that the System Administrator here
>|> gave me. Apparently (I quote him) "the Elm filter requires a unix style
>|> 'From sender date' header at the start of all mail messages.
>Is there anyway to get your add_unix_from program???
In re, sendmail not adding the UNIX from line that Filter requires...

This is a configuration option within the sendmail.cf file.  If you
tell sendmail to add the line in the sendmail.cf file, then you don't
need such a program.

-- 
=====================================================================
Sydney S. Weinstein, CDP, CCP                   Elm Coordinator
Datacomp Systems, Inc.                          Voice: (215) 947-9900
syd@DSI.COM or dsinc!syd                        FAX:   (215) 938-0235