procmail
[Top] [All Lists]

Re: CC, notify and logging

2001-09-03 00:24:17
I've been trying to test this receipe you created. I thought it was a
pretty sweet idea, and instead of trying to muttle through some perl
script to forward email notifications to my pager, I'd use something
like this.

Well, I set up the LOGABSTRACT=no and that seems to work for the most
part.  But it won't play the sound I have set up in the file, so it puts
that entry in the log.

play: play: No such file or directory
procmail: Program failure (127) of "play"

I've used play, `which play`, and even /usr/bin/play, and I always get
an error.  Here's another one of the errors I've gotten.

/usr/bin/play: basename: command not found
/usr/bin/play: uname: command not found
/usr/bin/play: sox: command not found
procmail: Program failure (127) of "/usr/bin/play"

Since I couldn't manage to get the *.wav to play, I thought I'd just
have a file saying "Email from 'so-n-so'" emailed to my text pager.
Basically using a command like:

cat test-file | mail pagerem(_at_)il(_dot_)address

Well I've found that I need to give the path names for everything.  So I
had to change that to:

/bin/cat $HOME/test-file | /bin/mail pagerem(_at_)il(_dot_)address

Well the mail gets put in it's folder, and 'sometimes' the page goes
though.  but I get this in my log.

From timh  Sun Sep  2 14:04:20 2001
 Subject: TEST
  Folder:  /bin/cat $HOME/test-file | /bin/mail pagerem(_at_)il(_dot_)address
From timh  Sun Sep  2 14:04:20 2001
 Subject: TEST
  Folder: /var/spool/mail/timh

Why does it do that?  And of course it can't, and doesn't over write
/bin/cat, or anything else of that nature, but why does it create that
line in the log?

Should I create a script instead, to then send the message to the text
pager?  Or should I edit this to read something else?  Here's the
receipe I'm trying to use.

:0
* ^From:(_dot_)*$USER(_at_)`hostname`
{
        LOGABSTRACT=all
        :0 hwic
        | /bin/cat $HOME/test-file | /bin/mail $USER(_at_)page(_dot_)`hostname`

        :0
        misc
}

Thanx for the help, and the receipe.
tdh

-- 
T. Holmes
-----------------
UNIXTECHS.org
tim(_at_)unixtechs(_dot_)org
-----------------
"Real Men Use Vi!"

Uptime: 
  --------------------------------------------------------------------
  1:48pm  up 17 days, 19:33, 11 users,  load average: 0.00, 0.00, 0.00
  --------------------------------------------------------------------
| I have written the following receipe to CC email to a different address,
| notify the user and deliver to the default mailbox.
| 
| --------------------------------------------------------------------
| :0
| * ^TO_user1(_at_)mydom(_dot_)com
| {
|         :0 c
|         ! team-lead(_at_)mydom(_dot_)com
| 
|         LOGABSTRACT=no
|         :0 hwic
|         | play /usr/sound/notify.wav
| 
|         :0
|         $DEFAULT
| }
| --------------------------------------------------------------------
| 
| I would like to log only the DEFAULT delivery to the log file. When this
| receipe runs, it logs the CC delivery and not the DEFAULT delivery.
| 
| Is their any redundancy in this reciepe? How do I fix it to log only for
| DEFAULT delivery?
| 
| TIA.
| -- 
| 
| Subba Rao
| subba9(_at_)home(_dot_)com
| http://members.home.net/subba9/
| 
| GPG public key ID CCB7344E
| Key fingerprint = A8DD 4CBA 1E9B D962 A55B  2B55 BAFE 92C5 CCB7 344E
| _______________________________________________
| procmail mailing list
| procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
| http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail
  ------------------------------------------------------------------ 
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>