procmail
[Top] [All Lists]

Sending notification of new mail

1997-10-16 11:26:26

I have a few users that want to keep mail on my machine for privacy (no
.forward file), but rarely log-on to see if they have new mail.  Instead of
getting them using a POP client to see if they have new mail, I thought I'd
set up a filter that emails a one-liner message to their corporate addresses
when they get new mail. e.g.

 You have mail on mixing from: Peter S Galbraith 
<galbraith(_at_)mixing(_dot_)qc(_dot_)dfo(_dot_)ca>

Can anybody provide a simple recipe?  I tried stuff like:

FROM='formail -x From:'
:0c
* ^TOrhogee
| mail -s "$FROM" other_account


But the 'formail' command doesn't get invoked, and I don't want to send
a copy of the mail but rather just a single line message.  
How do I:

 - Put the From: line content into a variable?
 - Invoke a command that doesn't really filter mail to send a one-line
   message containing the above variable?
 - Continue processing the message to the normal spool file even after
   matching the above condidtions?

Thanks!
--
Peter Galbraith, research scientist             
<galbraith(_at_)mixing(_dot_)qc(_dot_)dfo(_dot_)ca>
Maurice-Lamontagne Institute, Department of Fisheries and Oceans Canada
P.O. Box 1000, Mont-Joli Qc, G5H 3Z4 Canada  418-775-0852 - FAX 418-775-0546

 

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