On Fri, May 19, 2000 at 11:32:35AM +0530, Suresh Ramasubramanian wrote:
> David T-G proclaimed on mutt-users that: 
> 
> >The "script" method, I hope :-)  Yeah, once the script exists, it's easy
> >enough for anyone to use it.
> 
> Making local copies of the script for every user would be tedious, to say
> the least :)  So, the dummy login :)
Where I'm, I can't create a dummy login, but we have a commun directory.
I just have to put the script in, and everyone could use it...

there is the script :


TO=`tee /tmp/mutt_notify.$USER | formail -R Return-Receipt-To: 
Disposition-Notification-To: | formail -R X-Confirm-Reading-To: 
Disposition-Notification-To: | formail -x Disposition-Notification-To:`
SUBJECT=`formail -x Subject: < /tmp/mutt_notify.$USER`
FROM=`formail -x To: < /tmp/mutt_notify.$USER`
DATE=`date`
if [ -n "$TO" ] ; then
               echo "Sending notification to$TO"
               echo "Your message has been displayed on the screen of$FROM on $DATE" | 
mutt -s "NOTIFICATION OF:$SUBJECT" "$TO"
        else
               echo "No notification needed
fi
sleep 1
rm -f /tmp/mutt_notify.$USER


and there the macro for this script :

macro pager \cv "|mail_notify.sh\n" "Notification de lecture"
macro index \cv "|mail_notify.sh\n" "Notification de lecture"

If you have any idea to make this script better, tell it to me

Thanks

Antoine

Reply via email to