procmail
[Top] [All Lists]

Re: autoprinting

1998-11-21 09:27:36

What is the best way for me to set up procmail to automatically
save to a file and then print all mail from a certain `From:' and
ontaining a keyword in the body.

What have you tried so far?  I don't know about the *best* way, but
here's *a* way.

This matches mail from a certain person:

  * ^From:(_dot_)*person(_at_)place(_dot_)com

This looks for a keyword in the body:

  * B ?? keyword

Combine the two with common "save to file" and "pipe to command" action
lines, and you get:

:0
* ^From:(_dot_)*person(_at_)place(_dot_)com
* B ?? keyword
{
        :0c:
        file_to_save_in

        :0
        |lpr -P printer_name
}

---
Lars Kellogg-Stedman * lars(_at_)bu(_dot_)edu * (617)353-8277
Office of Information Technology, Boston University

<Prev in Thread] Current Thread [Next in Thread>
  • autoprinting, Eric Smith
    • Re: autoprinting, Lars Kellogg-Stedman <=