DragonFly BSD
DragonFly kernel List (threaded) for 2003-09
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Anybody working on removing sendmail from base?


From: Kent Ibbetson <bsd@xxxxxxxxxx>
Date: Tue, 30 Sep 2003 00:11:38 +0930

David P. Reese, Jr. probed the keyboard and on Mon, Sep 29, 2003 at 11:28:34AM +0000 produced:
> In article <20030929090916.GA23246@xxxxxxxxxxxxxxxxxxxx>, Tim wrote:
> > It's not clear to me what you are trying to do.
> > 
> > The script I mentioned was written for xbiff, which obviously will
> > work if you are running X.  If you run a screen variation or whatever,
> > then I would recommend starting with something like biff and modify
> > appropriately.
> > 
> > If you want true asynchronous notification then you might have to
> > muck with qmail's delivery mechanism so that whenever a new piece of
> > e-mail arrives you will be notified immediately, such as putting a
> > filter in .qmail.
> > 
> > Tim
> > 
> > On Sat, Sep 27, 2003 at 09:46:21AM -0700, Chris Pressey wrote:
> >> > I suppose I can make login not check, and do it with the
> >> > shell?
> >> 
> >> There must be a way.  Tim mentioned a precmd alias for tcsh - that's
> >> probably a good lead.
> >> 
> >> But - what I don't like about this setup is that it's synchronous with
> >> displaying a new prompt.  If I get new mail, but leave my tcsh prompt
> >> untouched for an hour, I won't see the message for an hour.  :(
> >> 
> >> Perhaps in the days before X11 and screen when one instance of the shell
> >> was in more or less constant use, this was marginally acceptable... but
> >> surely in an asynchronous-friendly OS like DragonFlyBSD there should be
> >> a way to be notified right when it happens...?  It can't be too hard to
> >> have a background process write to the terminal - kind of messy, though.
> >> 
> >> -Chris
> 
> Have procmail send a signal to your shell and implement a signal handler
> in tcsh that catches it, printing a new mail message to the terminal.
> You could even forget about procmail and send the signal from .forward.
> 
> A quick and dirty hack, but it should work.

Attached is a quick and dirty hack - beware, I'm not at all a shell
programmer :)

While we as developers desire to add functionality and feature pack our
favourite OS, we sometimes forget the past and miss the most obvious
solution (I am always doing this) - wheel reinvention you might call it.
. forward already provides all the functionally we need for asynchronous
notification of incoming email's.  By luck or good planning previous
developers came up with some great idea's lets not ignore them.  Of
course there are caveats - the script attached executes awk and grep twice, 
and ls once for every received email - perhaps a shell script isn't the
correct mechanism.

Anyway, enough rambling from me, malert.sh is attached and throw something
like the following into .forward

"|exec /usr/local/bin/malert.sh"


> -- 
>    David P. Reese, Jr.                                     daver@xxxxxxxxxxxx
>                                                http://www.gomerbud.com/daver/


Cheers,

-- 
Kent Ibbetson
bsd@xxxxxxxxxx

Attachment: malert.sh
Description: Bourne shell script



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]