[comp.unix.questions] mail & nice

jwm@SUN4.JHUAPL.EDU (James W. Meritt) (04/09/91)

	I have my .forward aimed to a script that sorts the incoming to
appropriate mailing lists.  Unfortunately, when a large block of mail
gets freed up from someplace downstream and a dozen or so come in, each
piece of mail fires up the mail filter process, and the whole machine
gets bogged down. 

	Since mail isn't real high on my priority list, is there a way
to set this up such that the script gets its priority knocked down
such that the ttys can keep going?

Opinions expressed are solely those of the author, and do not necessarily
represent those opinions of this or any other organization.  The facts,
however, simply are and do not "belong" to anyone.
    jwm@sun4.jhuapl.edu or jwm@aplcen.apl.jhu.edu or meritt%aplvm.BITNET

berg@marvin.e17.physik.tu-muenchen.de (Stephen R. van den Berg) (04/15/91)

In article <9104081926.AA00724@tea-jwm.jhuapl.edu> you write:
>       I have my .forward aimed to a script that sorts the incoming to
>appropriate mailing lists.

>       Since mail isn't real high on my priority list, is there a way
>to set this up such that the script gets its priority knocked down
>such that the ttys can keep going?

Why don't you pull the sources of "Procmail" from comp.sources.misc.
It does the same sorting of the mail as your script does, but much more
robust (probably).  It doesn't currently support lower priorities, but
all you need to implement that, is insert a nice() call at the start of
the program.

BTW, I tried to mail this to you, but the mail bounced due to some
errors in your .forward file.  I'd be willing to mail you the error
messages it generated; but please, remove your .forward file first :-)
--
Sincerely,                 berg@marvin.e17.physik.tu-muenchen.de
           Stephen R. van den Berg.
"I code it in 5 min, optimize it in 90 min, because it's so well optimized:
it runs in only 5 min.  Actually, most of the time I optimize programs."