shredmail Project Page
What is shredmail?
shredmail reads a mail message from standard input, flushing the input stream, then writes a "status=Shredded" message to syslogd via the mail facility along with the message id extracted from the first "Received:" header encountered; the logged message can include an optional user string using a command line parameter.
How do I use shredmail?
When called from a procmail delivering recipie, shredmail will remove the mail message and log it as shredded. The logged message id lets you correlate this action with other log messages.
This is equivalent to delivering to /dev/null, but it produces a more meaningful log message that can optionally indicate which procmail rule called shredmail.
When called from a procmail non-delivering recipie, procmail retains the mail message, so shredmail acts as a logging facility.
In this case, the -s option can be used to change the status from "Shredded" to a more appropriate disposition (e.g., "Delivered" or "Forwarded"), while the optional message can specify the destination (e.g., "INBOX", or "firstname.lastname@example.org").
Where can I get shredmail?
shredmail is available on github.
Is there an example?
Yes. On the shredmail wiki.