Question

Other than procmail what Unix tools can "read" an email via pipe? I have a client that wants to develop an app on a university managed (read squeamish IT dept) server. Procmail is not installed and neither is PHP's IMAP extension. What other programs or scripts can accept a piped email as input?

Was it helpful?

Solution

Unless I misunderstood the question (which, now that I reread it a few times, i may have) but....Mail files are just text files that the mail command parses and provides a front end for. You can use cat, vi, or any of the like to process the mail file:

cat /var/spool/mail/`whoami`
vi /var/spool/mail/`whoami`
grep -A10 "To: bob@bob.com"  /var/spool/mail/`whoami`
....

Check out Admin Guide - Managing the Mail

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top