hi suresh and listers,

> > > How have you defined this lmailalert?
> >  I have put it in /usr/bin/ and created a symlink from this script to
> > /etc/smrsh/lmailalert. It works most of the times. But only a few times
I
> > get this error. I will have find out when it occurs.
>
> like, for example, when lmailalert exists returning a different code?
>

this lmailalert sends a winpop message to the users(all are windows users).
This error occurs when that particular machine is not switched on. So this
script fails to send the message. Is there any way to avoid it.

I have added the following lines in the user's .forward file.
[EMAIL PROTECTED]
"|/usr/bin/lmailalert \"Mail Server\" \"logu-si\" \"Hi Logu..  You have a
new mail.\""


Here is the script
-----------------------------start--------------------
#!/bin/bash
#by Logu

 f=$1
 t=$2
 if [ $3 ] ; then
     shift 2
     mesg=$*
     /bin/echo $mesg|/usr/bin/smbclient -M "$t" -U "$f" > /dev/null
     exit 0
 fi
        /bin/echo "Sends a winpop message to the netbios user or machine "
        /bin/echo "Usage: $(basename $0) {from name to display}
{netbios(machine|user)to send} {message}"
        /bin/echo ""
------------------------end------------------------------





_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help

Reply via email to